<?xml version="1.0" encoding="utf-8"?>
<Entity 
Schema="AKUZ" 
Name="APPOINTMENTS_FREQUENCY_DICTIONARY" 
Description="Справочник периодичности назначений" 
PrimaryKey="AppointmentsFrequencyDictionaryID" 
DNAttributes="{cName}" 
DisplayName="{0}">
  <Fields>
    <Attribute Name="AppointmentsFrequencyDictionaryID" Type="guid" Description="Идентификатор" />
    <Attribute Name="Active" Type="bool" Description="Активный" Required="1" />
    <Attribute Name="TimeStart" Type="datetime" Description="Время начала приема" Required="1" />
    <Attribute Name="TimeEnd" Type="datetime" Description="Время окончания приема" Required="1" />
    <Choice Name="IntervalType" Description="Тип интервала" Required="1">
      <Item Name="День" Index="0" />
      <Item Name="Неделя" Index="1" />
      <Item Name="По графику" Index="2" />
      <Item Name="Час" Index="3" />
      <Item Name="Минута" Index="4" />
    </Choice>
    <Attribute Name="Amount" Type="int" Description="Количество" Required="1" />
    <Attribute Name="Interval" Type="int" Description="Интервал" Required="1" />
    <Choice Name="DaysOfWeek" IsFlag="1" Description="Дни недели" Required="1">
      <Item Name="Понедельник" Index="1" />
      <Item Name="Вторник" Index="2" />
      <Item Name="Среда" Index="4" />
      <Item Name="Четверг" Index="8" />
      <Item Name="Пятница" Index="16" />
      <Item Name="Суббота" Index="32" />
      <Item Name="Воскресенье" Index="64" />
    </Choice>
    <Parent Name="Users" Type="AKUZ.USERS" Description="Пользователи системы" Required="1" />
    <Parent Name="UsersMadeLastChanges" Type="AKUZ.USERS" Description="Пользователь системы, внесший последние изменения" />
    <Parent Name="Post" Type="AKUZ.POST" Description="Должность" />
  </Fields>
  <DbMapping>
    <Table name="T_APPOINTMENTS_FREQUENCY_DICTIONARY">
      <Map Name="AppointmentsFrequencyDictionaryID" Column="AppointmentsFrequencyDictionaryID" />
      <Map Name="Active" Column="Active" />
      <Map Name="TimeStart" Column="TimeStart" />
      <Map Name="TimeEnd" Column="TimeEnd" />
      <Map Name="IntervalType" Column="IntervalType" />
      <Map Name="Amount" Column="Amount" />
      <Map Name="Interval" Column="Interval" />
      <Map Name="DaysOfWeek" Column="DaysOfWeek" />
      <Map Name="Users" Column="Users" />
      <Map Name="UsersMadeLastChanges" Column="UsersMadeLastChanges" />
      <Map Name="Post" Column="Post" />
    </Table>
  </DbMapping>
  <CalculatingAttributes>
    <Attribute Name="cName" Type="string" Description="Описание" RequiredAttributes="{IntervalType};{TimeStart};{TimeEnd};{Amount};{Interval};{DaysOfWeek}" />
  </CalculatingAttributes>
</Entity>