<?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.Document" table="document" catalog="prase">
        <id name="id" type="string">
            <column name="id" length="36" />
            <generator class="assigned"></generator>
        </id>
        <property name="path" type="string" not-null="true">
            <column name="path" length="250" />
        </property>
        <property name="documentType" column="document_type" not-null="true">
            <type name="org.hibernate.type.EnumType">
                <param name="enumClass">com.arrebol.taxiservicios.model.enums.DocumentType</param>
                <param name="useNamed">true</param>
            </type>
        </property>
        <property name="fileName" type="string" not-null="true">
            <column name="file_name" length="50" />
        </property>
        <property name="content" type="binary" not-null="true">
            <column name="document"/>
        </property>
        <many-to-one name="person" class="com.arrebol.taxiservicios.model.core.Person" not-null="true" fetch="select">
            <column name="person_id" length="36" not-null="true"/>
        </many-to-one>
        <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>
    </class>
</hibernate-mapping>