<?xml version="1.0" encoding="utf-8"?>
<Entity 
Schema="AKUZ" 
Name="DEVICE_SCHEDULE_LIST" 
Description="Список с расписанием аппаратов" 
PrimaryKey="DeviceScheduleListID">
  <Fields>
    <Attribute Name="DateBegin" Type="date" Description="Дата начала" Required="1" />
    <Attribute Name="DateEnd" Type="date" Description="Дата окончания" Required="1" />
    <Attribute Name="DeviceScheduleListID" Type="guid" Description="Идентификатор" />
    <Choice Name="DayType" IsFlag="1" Description="Тип дня" Required="1">
      <Item Name="Нечетные" Index="1" />
      <Item Name="Четные" Index="2" />
    </Choice>
    <Choice Name="WeekType" IsFlag="1" Description="Тип недели" Required="1">
      <Item Name="Нечетные" Index="1" />
      <Item Name="Четные" Index="2" />
    </Choice>
    <Child Name="DeviceSchedules" Type="AKUZ.DEVICE_SCHEDULE" Description="Расписание работы аппарата" ChildAttribute="DeviceScheduleList" />
    <Parent Name="MedicalServicePrgDeviceLink" Type="AKUZ.MEDICAL_SERVICE_PRG_DEVICE_LINK" Description="Связка услуги с аппаратом" Required="1" />
  </Fields>
  <DbMapping>
    <Table name="T_DEVICE_SCHEDULE_LIST">
      <Map Name="DateBegin" Column="DateBegin" />
      <Map Name="DateEnd" Column="DateEnd" />
      <Map Name="DeviceScheduleListID" Column="DeviceScheduleListID" />
      <Map Name="DayType" Column="DayType" />
      <Map Name="WeekType" Column="WeekType" />
      <Map Name="MedicalServicePrgDeviceLink" Column="MedicalServicePrgDeviceLink" />
    </Table>
  </DbMapping>
</Entity>