<?xml version="1.0" encoding="utf-8"?>
<Entity 
Schema="STOR" 
Name="STORAGE" 
Description="Склад" 
PrimaryKey="StorageID" 
DNAttributes="{Name};{Number}" 
DisplayName="{0} №{1}">
  <Fields>
    <Attribute Name="StorageID" Index="19000004" Type="guid" Description="Идентификатор" />
    <Attribute Name="Name" Index="19000005" Type="string" Description="Наименование" Required="1" />
    <Attribute Name="Number" Index="19000006" Type="string" Description="Номер" Required="1" />
    <Attribute Name="AutomaticWritingOff" Index="19000010" Type="bool" Description="Автоматическая проводка накладных списания" Required="1" />
    <Parent Name="IssuePlace" Index="19000001" Type="STOR.ISSUE_PLACE" Description="Место выдачи товара" LinkAttribute="Storage" />
    <Child Name="Suppliers" Index="19000002" Type="STOR.SUPPLIER" Description="Поставщики(склады)" ChildAttribute="Storage" />
    <Child Name="Consumers" Index="19000003" Type="STOR.CONSUMER" Description="Потребители(склады)" ChildAttribute="Storage" />
    <Child Name="Remainss" Index="19000007" Type="STOR.REMAINS" Description="Остатки на складе" ChildAttribute="Storage" />
    <Child Name="GroupedRemainss" Index="19000008" Type="STOR.GROUPED_REMAINS" Description="Сгруппированные остатки по складу" ChildAttribute="Storage" />
    <Child Name="UserStorageLinks" Index="19000009" Type="STOR.USER_STORAGE_LINK" Description="Связь пользователя со складом" ChildAttribute="Storage" Required="1" />
    <Attribute Name="Mark" Index="19000013" Type="bool" Description="Маркировка" Required="1" />
    <Attribute Name="MarkID" Type="string" Description="Идентификатор в ИС Маркировка" CharacterMaximumLength="14" />
    <Attribute Name="Inn" Type="string" Description="ИНН" CharacterMaximumLength="12" />
    <Attribute Name="Kpp" Type="string" Description="КПП" CharacterMaximumLength="9" />
    <Parent Name="AccountingSystem" Type="STOR.ACCOUNTING_SYSTEM" Description="Учетная система" />
    <Choice Name="WriteOffType" Description="Тип интеграции при списании" Required="1">
      <Item Name="Без интеграции" Index="0" />
      <Item Name="Интеграция с МДЛП" Index="1" />
      <Item Name="Интеграция с РВ" Index="2" />
    </Choice>
    <Parent Name="WriteOffRegistratorsDictionary" Type="STOR.WRITE_OFF_REGISTRATORS_DICTIONARY" Description="Справочник регистраторов выбытия" />
    <Attribute Name="CombineMarkProduct" Type="bool" Description="Обьединять маркированный товар" Required="1" />
    <Attribute Name="CashMachine" Type="bool" Description="Использовать кассу при списании" Required="1" />
    <Child Name="KkmSettingss" Type="STOR.KKM_SETTINGS" Description="Настройки ККМ склада" ChildAttribute="Storage" />
    <Child Name="StorageResponsiblePersonLinks" Type="STOR.STORAGE_RESPONSIBLE_PERSON_LINK" Description="Связка склада и ответственного лица" ChildAttribute="Storage" />
    <Child Name="WorkSchedules" Type="STOR.STORAGE_WORK_SCHEDULE" Description="График работы склада" ChildAttribute="Storage" />
    <Child Name="StorageRooms" Type="STOR.STORAGE_ROOM" Description="Места хранения" ChildAttribute="Storage" />
  </Fields>
  <DbMapping>
    <Table name="T_STORAGE">
      <Map Name="StorageID" Column="StorageID" />
      <Map Name="Name" Column="Name" />
      <Map Name="Number" Column="Number" />
      <Map Name="AutomaticWritingOff" Column="AutomaticWritingOff" />
      <Map Name="IssuePlace" Column="IssuePlace" />
      <Map Name="Mark" Column="Mark" />
      <Map Name="MarkID" Column="MarkID" />
      <Map Name="Inn" Column="Inn" />
      <Map Name="Kpp" Column="Kpp" />
      <Map Name="AccountingSystem" Column="AccountingSystem" />
      <Map Name="WriteOffType" Column="WriteOffType" />
      <Map Name="WriteOffRegistratorsDictionary" Column="WriteOffRegistratorsDictionary" />
      <Map Name="CombineMarkProduct" Column="CombineMarkProduct" />
      <Map Name="CashMachine" Column="CashMachine" />
    </Table>
  </DbMapping>
</Entity>