<?xml version="1.0" encoding="utf-8"?>
<Entity 
Schema="AKUZ" 
Name="LLO_ELECTRONIC_CERTIFICATE_APPLICATION" 
Description="Заявка на электронный сертификат ЛЛО" 
PrimaryKey="LloElectronicCertificateApplicationID">
  <Fields>
    <Attribute Name="LloElectronicCertificateApplicationID" Type="guid" Description="Идентификатор" />
    <Parent Name="RecipeGeneral" Type="AKUZ.RECIPE_GENERAL" Description="Льготный рецепт" Required="1" />
    <Attribute Name="FirstName" Type="string" Description="Имя" CharacterMaximumLength="40" Required="1" />
    <Attribute Name="LastName" Type="string" Description="Фамилия" CharacterMaximumLength="40" Required="1" />
    <Attribute Name="FatherName" Type="string" Description="Отчество" CharacterMaximumLength="40" />
    <Attribute Name="Snils" Type="string" Description="СНИЛС" CharacterMaximumLength="14" Required="1" />
    <Attribute Name="Phone" Type="string" Description="Телефон" CharacterMaximumLength="50" />
    <Attribute Name="PolicyNumber" Type="string" Description="Номер полиса" CharacterMaximumLength="32" Required="1" />
    <Attribute Name="Mir" Type="bigint" Description="Номер карты(МИР)" Required="1" />
    <Attribute Name="Adress" Type="string" Description="Адрес проживания" CharacterMaximumLength="500" Required="1" />
    <Parent Name="Users" Type="AKUZ.USERS" Description="Пользователи системы" Required="1" />
    <Parent Name="Post" Type="AKUZ.POST" Description="Должность" Required="1" />
    <Choice Name="Status" Description="Статус" Required="1">
      <Item Name="Требует рассмотрения" Index="0" />
      <Item Name="Одобрена" Index="1" />
      <Item Name="Получен номер ЭС" Index="2" />
      <Item Name="Отклонена" Index="3" />
    </Choice>
    <Attribute Name="RefusalReason" Type="string" Description="Причина отказа" CharacterMaximumLength="300" />
    <Link Name="LloElectronicFile" Type="AKUZ.LLO_ELECTRONIC_FILE" Description="Отсканированное заявление на электронный сертификат" LinkAttribute="LloElectronicCertificateApplication" />
    <Attribute Name="ApplicationDate" Type="date" Description="Дата оформления" Required="1" />
    <Attribute Name="SignaData" Type="text" Description="Подписанные данные" />
  </Fields>
  <DbMapping>
    <Table name="T_LLO_ELECTRONIC_CERTIFICATE_APPLICATION">
      <Map Name="LloElectronicCertificateApplicationID" Column="LloElectronicCertificateApplicationID" />
      <Map Name="RecipeGeneral" Column="RecipeGeneral" />
      <Map Name="FirstName" Column="FirstName" />
      <Map Name="LastName" Column="LastName" />
      <Map Name="FatherName" Column="FatherName" />
      <Map Name="Snils" Column="Snils" />
      <Map Name="Phone" Column="Phone" />
      <Map Name="PolicyNumber" Column="PolicyNumber" />
      <Map Name="Mir" Column="Mir" />
      <Map Name="Adress" Column="Adress" />
      <Map Name="Users" Column="Users" />
      <Map Name="Post" Column="Post" />
      <Map Name="Status" Column="Status" />
      <Map Name="RefusalReason" Column="RefusalReason" />
      <Map Name="ApplicationDate" Column="ApplicationDate" />
      <Map Name="SignaData" Column="SignaData" />
    </Table>
  </DbMapping>
</Entity>