<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2014-7-4 下午03:16:52  
    $Revision: 1.0  
    $Purpose: 融资租赁合同
-->
<bm:model xmlns:o="leaf.database.local.oracle" xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="TRE_LOAN_FINANCE_CONTRACT" needAccessControl="false">
    <bm:fields>
        <bm:field name="fin_contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FIN_CONTRACT_ID" prompt="TRE_LOAN_FINANCE_CONTRACT.FIN_CONTRACT_ID"/>
        <bm:field name="loan_contract_id" databaseType="NUMBER" datatype="java.lang.Long" insertExpression="${../../@loan_contract_id}" physicalName="LOAN_CONTRACT_ID" prompt="TRE_LOAN_FINANCE_CONTRACT.LOAN_CONTRACT_ID"/>
        <bm:field name="finance_contract_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FINANCE_CONTRACT_TYPE" prompt="TRE_LOAN_FINANCE_CONTRACT.FINANCE_CONTRACT_TYPE"/>
        <bm:field name="finance_contract_type_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code=&apos;FINANCING_CONTRACT_TYPE&apos; and v.code_value=t1.finance_contract_type )" forInsert="false" forUpdate="false"/>
        <bm:field name="finance_contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FINANCE_CONTRACT_NUMBER" prompt="TRE_LOAN_FINANCE_CONTRACT.FINANCE_CONTRACT_NUMBER"/>
        <bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_NAME" prompt="TRE_LOAN_FINANCE_CONTRACT.BP_NAME"/>
        <bm:field name="bp_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CATEGORY" prompt="TRE_LOAN_FINANCE_CONTRACT.BP_CATEGORY"/>
        <bm:field name="bp_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_TYPE" prompt="TRE_LOAN_FINANCE_CONTRACT.BP_TYPE"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="TRE_LOAN_FINANCE_CONTRACT.DESCRIPTION"/>
        <bm:field name="ref_v01" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V01" prompt="TRE_LOAN_FINANCE_CONTRACT.REF_V01"/>
        <bm:field name="ref_v02" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V02" prompt="TRE_LOAN_FINANCE_CONTRACT.REF_V02"/>
        <bm:field name="ref_v03" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V03" prompt="TRE_LOAN_FINANCE_CONTRACT.REF_V03"/>
        <bm:field name="ref_v04" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V04" prompt="TRE_LOAN_FINANCE_CONTRACT.REF_V04"/>
        <bm:field name="ref_v05" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V05" prompt="TRE_LOAN_FINANCE_CONTRACT.REF_V05"/>
        <bm:field name="ref_n01" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N01" prompt="TRE_LOAN_FINANCE_CONTRACT.REF_N01"/>
        <bm:field name="ref_n02" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N02" prompt="TRE_LOAN_FINANCE_CONTRACT.REF_N02"/>
        <bm:field name="ref_n03" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N03" prompt="TRE_LOAN_FINANCE_CONTRACT.REF_N03"/>
        <bm:field name="ref_n04" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N04" prompt="TRE_LOAN_FINANCE_CONTRACT.REF_N04"/>
        <bm:field name="ref_n05" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N05" prompt="TRE_LOAN_FINANCE_CONTRACT.REF_N05"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
        <o:sequence-pk/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="fin_contract_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field field="loan_contract_id" queryOperator="="/>
    </bm:query-fields>
</bm:model>
