<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
    <class name="com.arrebol.taxiservicios.model.admin.ExpenseCompany" table="expense_company" catalog="prase">
        <id name="id" type="string">
            <column name="id" length="36" />
            <generator class="assigned"></generator>
        </id>        
        <property name="amount" type="big_decimal" not-null="true">
            <column name="amount"/>
        </property>
        <property name="description" type="string">
            <column name="description" length="200" />
        </property>
        <property name="expenseCompanyType" column="expense_company_type" not-null="true">
            <type name="org.hibernate.type.EnumType">
                <param name="enumClass">com.arrebol.taxiservicios.model.enums.ExpenseCompanyType</param>
                <param name="useNamed">true</param>
            </type>
        </property>
        <property name="activeStatus" column="active_status" not-null="true">
            <type name="org.hibernate.type.EnumType">
                <param name="enumClass">com.arrebol.taxiservicios.model.enums.BasicType</param>
                <param name="useNamed">true</param>
            </type>
        </property>
        <many-to-one name="createdBy" class="com.arrebol.taxiservicios.model.core.User" not-null="true" fetch="select">
            <column name="created_by" length="36" not-null="true"/>
        </many-to-one>
        <property name="createdOn" type="timestamp">
            <column length="19" name="created_on"/>
        </property>
        <many-to-one name="lastUpdatedBy" class="com.arrebol.taxiservicios.model.core.User" fetch="select">
            <column name="last_updated_by" length="36"/>
        </many-to-one>
        <property name="lastUpdatedOn" type="timestamp">
            <column length="19" name="last_updated_on" />
        </property>
        <many-to-one class="com.arrebol.taxiservicios.model.catalog.Location" fetch="select" name="location">
            <column length="36" name="id_location" not-null="false"/>
        </many-to-one>
        
        <property name="print" type="java.lang.Boolean">
            <column name="active" sql-type="TINYINT"/>
        </property>
        
        <many-to-one class="com.arrebol.taxiservicios.model.catalog.ExpenseIncomeCatalog" fetch="select" name="idExpenseType">
            <column length="36" name="id_expense_type" not-null="false"/>
        </many-to-one>
        <many-to-one class="com.arrebol.taxiservicios.model.catalog.BankCard" fetch="select" name="bankCard">
            <column length="36" name="id_bank_card" not-null="false"/>
        </many-to-one>
        
        
        <many-to-one class="com.arrebol.taxiservicios.model.admin.StableGeneralBox" fetch="select" name="stableGeneralBox">
            <column length="36" name="id_general_box" not-null="false"/>
        </many-to-one>
        
        <property name="depositStatus" column="deposit_status" not-null="true">
            <type name="org.hibernate.type.EnumType">
                <param name="enumClass">com.arrebol.taxiservicios.model.enums.ExpenseStatusType</param>
                <param name="useNamed">true</param>
            </type>
        </property>

    </class>
</hibernate-mapping>