<?xml version="1.0" encoding="UTF-8"?>
<!--
Arrebol Consultancy copyright.

This code belongs to Arrebol Consultancy
its use, redistribution or modification are prohibited 
without written authorization from Arrebol Consultancy.
-->
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
    <class catalog="crov_spa" name="com.arrebol.taxiservicios.model.admin.FeeByDriver" table="fee_by_driver">
        <id name="id" type="string">
            <column length="36" name="id"/>
            <generator class="assigned"/>
        </id>
        <many-to-one class="com.arrebol.taxiservicios.model.core.Person" fetch="select" name="driver" not-null="true">
            <column length="36" name="driver_id"/>
        </many-to-one>
        <property name="feeDate" type="timestamp">
            <column length="19" name="fee_date" not-null="true"/>
        </property>
        <property name="amount" type="double">
            <column name="amount"/>
        </property>
        <property name="comment" type="string">
            <column name="comments" length="250"/>
        </property> 
        <property name="status" column="fee_status" not-null="true">
            <type name="org.hibernate.type.EnumType">
                <param name="enumClass">com.arrebol.taxiservicios.model.enums.FeeType</param>
                <param name="useNamed">true</param>
            </type>
        </property>
        <many-to-one class="com.arrebol.taxiservicios.model.core.User" fetch="select" name="createdBy" not-null="true">
            <column length="36" name="created_by"/>
        </many-to-one>
        <property name="createdOn" type="timestamp">
            <column length="19" name="created_on"/>
        </property>
        <many-to-one class="com.arrebol.taxiservicios.model.core.User" fetch="select" name="lastUpdatedBy">
            <column length="36" name="last_updated_by"/>
        </many-to-one>
        <property name="lastUpdatedOn" type="timestamp">
            <column length="19" name="last_updated_on"/>
        </property>
    </class>
</hibernate-mapping>
