<?xml version="1.0" encoding="utf-8"?>
<Entity 
Schema="VCLib" 
Name="ROLES" 
Description="Роли пользователей в системе" 
version="2" 
UnrestrictedAccess="1" 
PrimaryKey="RoleID" 
DNAttributes="{RoleName}" 
DisplayName="{0}">
  <Customs>
    <Custom Name="uniqueness" Value="(RoleName)" />
  </Customs>
  <Fields>
    <Attribute Name="RoleID" Index="90001" Type="guid" Description="Идентификатор роли" />
    <Attribute Name="RoleName" Index="90002" Type="string" Description="Наименование" Required="1" />
    <Attribute Name="RoleDesc" Index="90003" Type="string" Description="Описание" />
    <Attribute Name="DivisionsLevel" Index="90008" Type="int" Description="Уровень подразделения" Required="1" />
    <Parent Name="Departament" Index="90004" Type="VCLib.ENUMS" Description="Отдел" EnumType="Departament" />
    <Child Name="ROLE_USERS" Index="90005" Type="VCLib.USERS_ROLES" Description="Пользователи" ChildAttribute="RoleID" />
    <Child Name="ROLE_ACCESS" Index="90006" Type="VCLib.BAE_ROLES" Description="Права" ChildAttribute="RoleID" />
    <Child Name="ROLE_MODULES" Index="90007" Type="VCLib.ROLE_CLIENT_MODULES" Description="Модули" ChildAttribute="RoleID" />
  </Fields>
  <DbMapping>
    <Table name="T_ROLES">
      <Map Name="RoleID" Column="RoleID" />
      <Map Name="RoleName" Column="RoleName" />
      <Map Name="RoleDesc" Column="RoleDesc" />
      <Map Name="DivisionsLevel" Column="DivisionsLevel" />
      <Map Name="Departament" Column="Departament" />
    </Table>
  </DbMapping>
</Entity>