<?xml version="1.0" encoding="UTF-8"?>
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://axelor.com/xml/ns/domain-models
  https://axelor.com/xml/ns/domain-models/domain-models_6.0.xsd">

  <module name="human-resource" package="com.axelor.apps.hr.db" />

  <entity name="Authorization">

      <many-to-one name="employee" ref="com.axelor.apps.hr.db.Employee"/>
      <date name="requisitionDate" title="Requisition Date" required="true"/>
      <string name="description" title="Description" large="true"/>
      <integer name="authorizationType" title="Authorization Type" selection="hr.type.absence.authorization.selection"/>
      <integer name="statusSelect" title="Status" selection="hrs.leave.request.status.select" default="1" readonly="true"/>


      <many-to-one name="validatedByEmployee" ref="com.axelor.apps.hr.db.Employee" title="Validated by" readonly="true"/>
      <many-to-one name="refusedByEmployee" ref="com.axelor.apps.hr.db.Employee" title="Refused By" readonly="true"/>

      <date name="validationDate" title="Validation Date" readonly="true"/>
      <date name="refusalDate" title="Refusal Date" readonly="true"/>
      <integer name="ticketId" readonly="true" required="true"/>
      <string name="ticket" title="My Sophal Ticket" readonly="true" required="true"/>
      
      <time name="heureAuthorization" title="Authorized Absence Hours"/>

      <many-to-one name="dailyReport" ref="com.axelor.apps.hr.db.DailyReport" mappedBy="dailyReportList"/>
      <unique-constraint columns="ticketId"/>
  </entity>

</domain-models>