<?xml version="1.0" encoding="utf-8"?>
<Entity 
Schema="VCLib" 
Name="ENTITIES" 
Description="Сущности метаданных" 
version="2" 
UnrestrictedAccess="1" 
PrimaryKey="EntityID" 
DNAttributes="{EntName}" 
DisplayName="{0}" 
IsTree="1">
  <Customs>
    <Custom Name="uniqueness" Value="(EntName;Schema)" />
  </Customs>
  <Fields>
    <Attribute Name="EntityID" Index="10001" Type="int" Description="Идентификатор" />
    <Attribute Name="EntName" Index="10002" Type="string" Description="Наименование" Required="1" />
    <Attribute Name="EntDesc" Index="10003" Type="string" Description="Описание сущности данных" />
    <Attribute Name="ServerName" Index="10004" Type="string" Description="Сервер БД" />
    <Attribute Name="XML" Index="10005" Type="text" Description="XML-описание сущности" />
    <Attribute Name="NeedHistory" Index="10006" Type="bool" Description="Необходимость ведения истории изменений" />
    <Attribute Name="ObjectDisplayName" Index="10012" Type="string" Description="Отображаемое имя" />
    <Attribute Name="DNAttributes" Index="10013" Type="string" Description="Атрибуты отображения" />
    <Attribute Name="IsAdditional" Index="10016" Type="bool" Description="Добавленная" DefaultValue="0" Required="1" />
    <Attribute Name="Version" Index="10017" Type="int" Description="Версия" DefaultValue="0" Required="1" />
    <Attribute Name="PrimaryKeyName" Index="10018" Type="string" Description="Первичный ключ" CharacterMaximumLength="255" />
    <Attribute Name="IsTree" Index="10019" Type="bool" Description="Древовидная" DefaultValue="0" Required="1" />
    <Attribute Name="UnrestrictedAccess" Index="10020" Type="bool" Description="Неограниченный доступ" DefaultValue="0" Required="1" />
    <Attribute Name="Customs" Index="10021" Type="string" Description="Настройки" CharacterMaximumLength="8000" />
    <Attribute Name="Sortings" Index="10022" Type="string" Description="Сортировка" CharacterMaximumLength="8000" />
    <Attribute Name="CanGroupInTreeListBy" Index="10023" Type="string" Description="Группировка" CharacterMaximumLength="8000" />
    <Attribute Name="BaseEntityName" Index="10024" Type="string" Description="Наименование базовой сущности" CharacterMaximumLength="255" />
    <Attribute Name="LeftIndex" Type="int" Description="Левый индекс" />
    <Attribute Name="RightIndex" Type="int" Description="Правый индекс" />
    <Attribute Name="TreeLevel" Type="int" Description="Уровень дерева" />
    <Parent Name="ParentID" Type="VCLib.ENTITIES" Description="Родительская сущность" />
    <Parent Name="BaseEntity" Index="10011" Type="VCLib.ENTITIES" Description="Базовая сущность" />
    <Parent Name="Schema" Index="10014" Type="VCLib.SCHEMA" Description="Схема" CharacterMaximumLength="32" Required="1" />
    <Child Name="USER_SEARCH_ENTITY" Index="10008" Type="VCLib.USER_SEARCHES" Description="Сохраненные фильтры" ChildAttribute="EntityID" />
    <Child Name="HiddenAttributes" Index="10009" Type="VCLib.HIDDEN_ATTRIBUTE" Description="Скрытые Атрибуты" ChildAttribute="Entities" />
    <Child Name="EntitiesAttributess" Index="10015" Type="VCLib.ENTITIES_ATTRIBUTES" Description="Атрибуты" ChildAttribute="EntityID" />
    <Attribute Name="Timestamped" Type="bool" Description="С отметкой времени" />
  </Fields>
  <DbMapping>
    <Table name="T_ENTITIES">
      <Map Name="EntityID" Column="EntityID" />
      <Map Name="EntName" Column="EntName" />
      <Map Name="EntDesc" Column="EntDesc" />
      <Map Name="ServerName" Column="ServerName" />
      <Map Name="XML" Column="XML" />
      <Map Name="NeedHistory" Column="NeedHistory" />
      <Map Name="ObjectDisplayName" Column="DisplayName" />
      <Map Name="DNAttributes" Column="DNAttributes" />
      <Map Name="IsAdditional" Column="IsAdditional" />
      <Map Name="Version" Column="Version" />
      <Map Name="PrimaryKeyName" Column="PrimaryKeyName" />
      <Map Name="IsTree" Column="IsTree" />
      <Map Name="UnrestrictedAccess" Column="UnrestrictedAccess" />
      <Map Name="Customs" Column="Customs" />
      <Map Name="Sortings" Column="Sortings" />
      <Map Name="CanGroupInTreeListBy" Column="CanGroupInTreeListBy" />
      <Map Name="BaseEntityName" Column="BaseEntityName" />
      <Map Name="LeftIndex" Column="LeftIndex" />
      <Map Name="RightIndex" Column="RightIndex" />
      <Map Name="TreeLevel" Column="TreeLevel" />
      <Map Name="ParentID" Column="BaseEntity" />
      <Map Name="BaseEntity" Column="BaseEntity" />
      <Map Name="Schema" Column="Schema" />
      <Map Name="Timestamped" Column="Timestamped" />
    </Table>
  </DbMapping>
</Entity>