<?xml version="1.0" encoding="utf-8"?>
<Entity 
Schema="VCLib" 
Name="JOB_SCHEDULE" 
Description="Расписание исполнения задания" 
PrimaryKey="ScheduleID">
  <Fields>
    <Attribute Name="ScheduleID" Index="650001" Type="guid" Description="Идентификатор" />
    <Choice Name="Mask" Index="650004" IsFlag="1" Description="Маска" >
      <Item Name="Пн" Index="2" />
      <Item Name="Вт" Index="4" />
      <Item Name="Ср" Index="8" />
      <Item Name="Чт" Index="16" />
      <Item Name="Пт" Index="32" />
      <Item Name="Сб" Index="64" />
      <Item Name="Вс" Index="1" />
    </Choice>
    <Attribute Name="StartDate" Index="650005" Type="date" Description="Начальная дата" Required="1" />
    <Attribute Name="EndDate" Index="650006" Type="date" Description="Конечная дата" />
    <Attribute Name="Recurs" Index="650008" Type="int" Description="Повтор" />
    <Attribute Name="StartTime" Index="650009" Type="datetime" Description="Время старта" DefaultFormat="{0:HH:mm}" />
    <Attribute Name="Enabled" Index="650010" Type="bool" Description="Активно" DefaultValue="1" Required="1" />
    <Parent Name="Job" Index="650002" Type="VCLib.JOB" Description="Задание планировщика" Required="1" />
    <Parent Name="Servers" Index="650011" Type="VCLib.SERVERS" Description="Сервер" />
    <Choice Name="Type" Index="650003" Description="Тип исполнения" Required="1">
      <Item Name="Старт сервера" Index="0" />
      <Item Name="Одноразово" Index="1" />
      <Item Name="Периодически" Index="2" />
    </Choice>
    <Choice Name="Occurs" Index="650007" Description="Тип периодичности">
      <Item Name="Ежедневно" Index="0" />
      <Item Name="Еженедельно" Index="1" />
      <Item Name="Ежемесячно" Index="2" />
    </Choice>
  </Fields>
  <DbMapping>
    <Table name="T_JOB_SCHEDULE">
      <Map Name="ScheduleID" Column="ScheduleID" />
      <Map Name="Job" Column="Job" />
      <Map Name="Type" Column="Type" />
      <Map Name="Mask" Column="Mask" />
      <Map Name="StartDate" Column="StartDate" />
      <Map Name="EndDate" Column="EndDate" />
      <Map Name="Occurs" Column="Occurs" />
      <Map Name="Recurs" Column="Recurs" />
      <Map Name="StartTime" Column="StartTime" />
      <Map Name="Enabled" Column="Enabled" />
      <Map Name="Servers" Column="Servers" />
    </Table>
  </DbMapping>
</Entity>