<?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.core.User" table="car_driver_user" catalog="prase" >
        <id name="id" type="string">
            <column name="id" length="36" />
            <generator class="assigned"></generator>
        </id>
        <many-to-one class="com.arrebol.taxiservicios.model.core.Person" fetch="select" name="person">
            <column length="36" name="person_id" not-null="true"/>
        </many-to-one>
        <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="userName" type="string">
            <column length="100" name="username" not-null="true"/>
        </property>
        <property name="password" type="string">
            <column length="100" name="password" not-null="true"/>
        </property>
        <property name="active" type="java.lang.Boolean">
            <column name="active" sql-type="TINYINT" not-null="true"/>
        </property>
        <property name="root" type="java.lang.Boolean">
            <column name="root" sql-type="TINYINT"/>
        </property>
        <property name="userStatusType" column="user_status_type" not-null="true">
            <type name="org.hibernate.type.EnumType">
                <param name="enumClass">com.arrebol.taxiservicios.model.enums.UserStatusType</param>
                <param name="useNamed">true</param>
            </type>
        </property>
        <property name="createdBy" type="string">
            <column name="created_by" length="36" not-null="true"/>
        </property>
        <property name="createdOn" type="date">
            <column name="created_on" length="10" />
        </property>
        <property name="lastUpdatedBy" type="string">
            <column name="last_updated_by" length="36" />
        </property>
        <property name="lastUpdatedOn" type="date">
            <column name="last_updated_on" length="10" />
        </property>
        <property name="ajustador" type="java.lang.Boolean">
            <column name="ajustador" sql-type="TINYINT"/>
        </property>
        <set fetch="select" inverse="true" lazy="true" name="userHasPermissions" table="USER_HAS_PERMISSION">
            <key>
                <column length="36" name="id_user" not-null="true"/>
            </key>
            <one-to-many class="com.arrebol.taxiservicios.model.core.UserHasPermission"/>
        </set>
  
            
    </class>
</hibernate-mapping>
