<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang  
    $Date: 2014-3-28 下午05:47:54  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:e="leaf.service.exception" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="AUT_TRX_USER_AUTHORIZE">
    <bm:fields>
        <bm:field name="user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="USER_ID" prompt="AUT_TRX_USER_AUTHORIZE.USER_ID"/>
        <bm:field name="user_desc" expression="(select description from sys_user_v a where a.user_id=t1.user_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="user_employee_name" expression="(select employee_name from sys_user_v a where a.user_id=t1.user_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="trx_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TRX_CATEGORY" prompt="AUT_TRX_USER_AUTHORIZE.TRX_CATEGORY"/>
        <bm:field name="trx_category_desc" expression="(select v.trx_category_desc from aut_trx_category_v v where v.trx_category=t1.trx_category)" forInsert="false" forUpdate="false"/>
        <bm:field name="trx_id" databaseType="NUMBER" datatype="java.lang.Long" insertExpression="${../../@report_header_id}" physicalName="TRX_ID" prompt="AUT_TRX_USER_AUTHORIZE.TRX_ID"/>
        <bm:field name="start_date" databaseType="DATE" datatype="java.util.Date" physicalName="START_DATE" prompt="AUT_TRX_USER_AUTHORIZE.START_DATE"/>
        <bm:field name="end_date" databaseType="DATE" datatype="java.util.Date" physicalName="END_DATE" prompt="AUT_TRX_USER_AUTHORIZE.END_DATE"/>
        <bm:field name="ref_v01" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V01" prompt="AUT_TRX_USER_AUTHORIZE.REF_V01"/>
        <bm:field name="ref_v02" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V02" prompt="AUT_TRX_USER_AUTHORIZE.REF_V02"/>
        <bm:field name="ref_v03" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V03" prompt="AUT_TRX_USER_AUTHORIZE.REF_V03"/>
        <bm:field name="ref_v04" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V04" prompt="AUT_TRX_USER_AUTHORIZE.REF_V04"/>
        <bm:field name="ref_v05" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V05" prompt="AUT_TRX_USER_AUTHORIZE.REF_V05"/>
        <bm:field name="ref_n01" databaseType="NUMBER" datatype="java.lang.Double" physicalName="REF_N01" prompt="AUT_TRX_USER_AUTHORIZE.REF_N01"/>
        <bm:field name="ref_n02" databaseType="NUMBER" datatype="java.lang.Double" physicalName="REF_N02" prompt="AUT_TRX_USER_AUTHORIZE.REF_N02"/>
        <bm:field name="ref_n03" databaseType="NUMBER" datatype="java.lang.Double" physicalName="REF_N03" prompt="AUT_TRX_USER_AUTHORIZE.REF_N03"/>
        <bm:field name="ref_n04" databaseType="NUMBER" datatype="java.lang.Double" physicalName="REF_N04" prompt="AUT_TRX_USER_AUTHORIZE.REF_N04"/>
        <bm:field name="ref_n05" databaseType="NUMBER" datatype="java.lang.Double" physicalName="REF_N05" prompt="AUT_TRX_USER_AUTHORIZE.REF_N05"/>
        <bm:field name="ref_d01" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D01" prompt="AUT_TRX_USER_AUTHORIZE.REF_D01"/>
        <bm:field name="ref_d02" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D02" prompt="AUT_TRX_USER_AUTHORIZE.REF_D02"/>
        <bm:field name="ref_d03" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D03" prompt="AUT_TRX_USER_AUTHORIZE.REF_D03"/>
        <bm:field name="ref_d04" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D04" prompt="AUT_TRX_USER_AUTHORIZE.REF_D04"/>
        <bm:field name="ref_d05" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D05" prompt="AUT_TRX_USER_AUTHORIZE.REF_D05"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="trx_category"/>
        <bm:pk-field name="trx_id"/>
        <bm:pk-field name="user_id"/>
    </bm:primary-key>
    <e:exception-descriptor-config>
        <e:exception-descriptor exception="java.sql.SQLException" handleClass="leaf.database.SQLExceptionDescriptor">
            <e:error-message code="1" message="AUT103_UNIQUE_ERROR"/>
        </e:exception-descriptor>
    </e:exception-descriptor-config>
</bm:model>
