<?xml version="1.0" encoding="utf-8"?>
<Entity 
Schema="VCLib" 
Name="DTO_ITEM" 
Description="Элемент модели объекта передачи данных" 
PrimaryKey="DtoItemID" 
DNAttributes="{Name}" 
DisplayName="{0}">
  <Customs>
    <Custom Name="uniqueness" Value="(DtoModel;Name)" />
  </Customs>
  <Fields>
    <Attribute Name="DtoItemID" Type="guid" Description="Идентификатор" />
    <Attribute Name="Name" Type="string" Description="Наименование" CharacterMaximumLength="255" Required="1" />
    <Attribute Name="ItemLexem" Type="text" Description="Лексема значения" Required="1" />
    <Choice Name="DataType" Description="Тип данных" Required="1">
      <Item Name="String" Index="1" />
      <Item Name="Int32" Index="2" />
      <Item Name="Guid" Index="3" />
      <Item Name="Boolean" Index="4" />
      <Item Name="Decimal" Index="5" />
      <Item Name="DateTime" Index="6" />
      <Item Name="Int64" Index="8" />
      <Item Name="Binary" Index="9" />
      <Item Name="Byte" Index="10" />
      <Item Name="Choice" Index="13" />
      <Item Name="DTO" Index="99" />
    </Choice>
    <Choice Name="Multiplicity" Description="Множественность" Required="1">
      <Item Name="0..1" Index="0" />
      <Item Name="1..1" Index="1" />
      <Item Name="0..*" Index="2" />
      <Item Name="1..*" Index="3" />
    </Choice>
    <Parent Name="DtoModel" Type="VCLib.DTO_MODEL" Description="Модель объекта передачи данных" Required="1" />
    <Parent Name="ItemDtoModel" Type="VCLib.DTO_MODEL" Description="Модель значения" />
    <Attribute Name="StringFormat" Type="string" Description="Формат" />
    <Attribute Name="IsInvariantCulture" Type="bool" Description="Международный формат" Required="1" />
    <Attribute Name="Postion" Type="int" Description="Позиция" Required="1" />
    <Attribute Name="PathsAttributes" Type="string" Description="Пути до коллекции" CharacterMaximumLength="100000000" />
    <Attribute Name="Descr" Type="string" Description="Описание" CharacterMaximumLength="1000" />
    <Choice Name="BindingType" IsFlag="1" Description="Тип привязки" Required="1">
      <Item Name="Чтение (Get)" Index="1" />
      <Item Name="Изменение (Set)" Index="2" />
      <Item Name="Фильтрация" Index="4" />
      <Item Name="Сортировка" Index="8" />
      <Item Name="Группировка" Index="16" />
    </Choice>
    <Attribute Name="InputValueLexem" Type="string" Description="Лексема для входного значения" CharacterMaximumLength="100000000" />
    <Attribute Name="ChoiceData" Type="string" Description="Описание вариантов значений" CharacterMaximumLength="2000" />
  </Fields>
  <DbMapping>
    <Table name="T_DTO_ITEM">
      <Map Name="DtoItemID" Column="DtoItemID" />
      <Map Name="Name" Column="Name" />
      <Map Name="ItemLexem" Column="ItemLexem" />
      <Map Name="DataType" Column="DataType" />
      <Map Name="Multiplicity" Column="Multiplicity" />
      <Map Name="DtoModel" Column="DtoModel" />
      <Map Name="ItemDtoModel" Column="ItemDtoModel" />
      <Map Name="StringFormat" Column="StringFormat" />
      <Map Name="IsInvariantCulture" Column="IsInvariantCulture" />
      <Map Name="Postion" Column="Postion" />
      <Map Name="PathsAttributes" Column="PathsAttributes" />
      <Map Name="Descr" Column="Descr" />
      <Map Name="BindingType" Column="BindingType" />
      <Map Name="InputValueLexem" Column="InputValueLexem" />
      <Map Name="ChoiceData" Column="ChoiceData" />
    </Table>
  </DbMapping>
  <CalculatingAttributes>
    <Attribute Name="ItemLexemStr" Type="string" Description="Строка лексемы значения" RequiredAttributes="{ItemLexem}" />
  </CalculatingAttributes>
</Entity>