<?xml version="1.0" encoding="utf-8"?>
<Entity 
Schema="STOR" 
Name="STORAGE_SHELF" 
Description="Полка" 
PrimaryKey="StorageShelfID" 
DNAttributes="{StorageRack/StorageRoom/Number};{StorageRack/Number};{Number}" 
DisplayName="Помещение №{0} Стеллаж №{1} Полка №{2}">
  <Fields>
    <Attribute Name="StorageShelfID" Type="guid" Description="Идентификатор" />
    <Attribute Name="Number" Type="int" Description="Номер" Required="1" />
    <Attribute Name="Name" Type="string" Description="Наименование" />
    <Attribute Name="Specification" Type="string" Description="Описание" CharacterMaximumLength="512" />
    <Parent Name="StorageRack" Type="STOR.STORAGE_RACK" Description="Стеллаж" Required="1" />
    <Child Name="Remains" Type="STOR.REMAINS" Description="Остатки на складе" ChildAttribute="StorageShelf" />
    <Child Name="InvoiceItems" Type="STOR.INVOICE_ITEM" Description="Элемент медицинской накладной" ChildAttribute="StorageShelf" />
  </Fields>
  <DbMapping>
    <Table name="T_STORAGE_SHELF">
      <Map Name="StorageShelfID" Column="StorageShelfID" />
      <Map Name="Number" Column="Number" />
      <Map Name="Name" Column="Name" />
      <Map Name="Specification" Column="Specification" />
      <Map Name="StorageRack" Column="StorageRack" />
    </Table>
  </DbMapping>
</Entity>