<?xml version="1.0" encoding="utf-8"?>
<Entity 
Schema="RDS" 
Name="TRU_TYPE" 
Description="Справочник видов ТРУ" 
PrimaryKey="TruTypeID" 
DNAttributes="{Code};{Name}" 
DisplayName="{0} - {1}">
  <Fields>
    <Attribute Name="TruTypeID" Type="int" Description="Идентификатор" />
    <Attribute Name="Name" Type="string" Description="Наименование вида ТРУ" CharacterMaximumLength="2000" Required="1" />
    <Attribute Name="Code" Type="string" Description="Код вида ТРУ" CharacterMaximumLength="50" Required="1" />
    <Attribute Name="DepartmentalCode" Type="string" Description="Ведомственный код" CharacterMaximumLength="50" />
    <Choice Name="Type" Description="Тип" Required="1">
      <Item Name="ЛС" Index="0" />
      <Item Name="Мед изделия" Index="1" />
      <Item Name="Спец питание" Index="2" />
    </Choice>
    <Attribute Name="Active" Type="bool" Description="Активная запись" Required="1" />
  </Fields>
  <DbMapping>
    <Table name="T_TRU_TYPE">
      <Map Name="TruTypeID" Column="TruTypeID" />
      <Map Name="Name" Column="Name" />
      <Map Name="Code" Column="Code" />
      <Map Name="DepartmentalCode" Column="DepartmentalCode" />
      <Map Name="Type" Column="Type" />
      <Map Name="Active" Column="Active" />
    </Table>
  </DbMapping>
</Entity>