<?xml version="1.0" encoding="UTF-8"?>
<!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.GeneralPublic" table="general_public" catalog="crov_spa">
        <id name="id" type="string">
            <column name="id" length="36" />
            <generator class="assigned"></generator>
        </id>
        <property name="firstName" type="string">
            <column name="first_name" length="25" not-null="true" />
        </property>
        <property name="secondName" type="string">
            <column name="second_name" length="25" />
        </property>
        <property name="lastName" type="string">
            <column name="last_name" length="25" />
        </property>
        <property name="middleName" type="string">
            <column name="middle_name" length="25" />
        </property>
        <property name="phone" type="string">
            <column name="phone" length="25"/>
        </property>
        <property name="placas" type="string">
            <column name="placas" length="50"/>
        </property>
        <many-to-one name="vehicle" class="com.arrebol.taxiservicios.model.catalog.Vehicle" fetch="select">
            <column name="vehicle_id" length="36"/>
        </many-to-one>
        <many-to-one name="color" class="com.arrebol.taxiservicios.model.catalog.Color" fetch="select">
            <column name="color_id" length="36"/>
        </many-to-one>

        <property name="km" type="float">
            <column name="km" />
        </property>
        <property name="kmMaintenance" type="float">
            <column name="km_maintenance" />
        </property>
        <property name="limitCredit" type="double">
            <column name="limit_credit" />
        </property>
        <property name="adeudo" type="double">
            <column name="adeudo" />
        </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"/>
        </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>
        
        
    </class>
</hibernate-mapping>
