<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: hand  
    $Date: 2016-5-18 下午2:09:13  
    $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="DOC_CONTRACT_TMPT_CLAUSE">
    <bm:fields>
        <bm:field name="clause_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CLAUSE_ID" prompt="DOC_CONTRACT_TMPT_CLAUSE.CLAUSE_ID"/>
        <bm:field name="tmpt_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TMPT_ID" prompt="DOC_CONTRACT_TMPT_CLAUSE.TMPT_ID"/>
        <bm:field name="contract_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_STATUS" prompt="DOC_CONTRACT_TMPT_CLAUSE.CONTRACT_STATUS"/>
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="DOC_CONTRACT_TMPT_CLAUSE.CONTRACT_ID"/>
        <bm:field name="document_table" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_TABLE" prompt="DOC_CONTRACT_TMPT_CLAUSE.DOCUMENT_TABLE"/>
        <bm:field name="ref_v01" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V01" prompt="DOC_CONTRACT_TMPT_CLAUSE.REF_V01"/>
        <bm:field name="ref_v02" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V02" prompt="DOC_CONTRACT_TMPT_CLAUSE.REF_V02"/>
        <bm:field name="ref_v03" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V03" prompt="DOC_CONTRACT_TMPT_CLAUSE.REF_V03"/>
        <bm:field name="ref_v04" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V04" prompt="DOC_CONTRACT_TMPT_CLAUSE.REF_V04"/>
        <bm:field name="ref_v05" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V05" prompt="DOC_CONTRACT_TMPT_CLAUSE.REF_V05"/>
        <bm:field name="ref_n01" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N01" prompt="DOC_CONTRACT_TMPT_CLAUSE.REF_N01"/>
        <bm:field name="ref_n02" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N02" prompt="DOC_CONTRACT_TMPT_CLAUSE.REF_N02"/>
        <bm:field name="ref_n03" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N03" prompt="DOC_CONTRACT_TMPT_CLAUSE.REF_N03"/>
        <bm:field name="ref_n04" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N04" prompt="DOC_CONTRACT_TMPT_CLAUSE.REF_N04"/>
        <bm:field name="ref_n05" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N05" prompt="DOC_CONTRACT_TMPT_CLAUSE.REF_N05"/>
        <bm:field name="ref_d01" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D01" prompt="DOC_CONTRACT_TMPT_CLAUSE.REF_D01"/>
        <bm:field name="ref_d02" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D02" prompt="DOC_CONTRACT_TMPT_CLAUSE.REF_D02"/>
        <bm:field name="ref_d03" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D03" prompt="DOC_CONTRACT_TMPT_CLAUSE.REF_D03"/>
        <bm:field name="ref_d04" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D04" prompt="DOC_CONTRACT_TMPT_CLAUSE.REF_D04"/>
        <bm:field name="ref_d05" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D05" prompt="DOC_CONTRACT_TMPT_CLAUSE.REF_D05"/>
        <bm:field name="contract_status_n" databaseType="VARCHAR2" datatype="java.lang.String" expression="(SELECT  A.code_value_name VALUE_NAME FROM SYS_CODE_VALUES_V A WHERE A.code = &apos;CON390_CONTRACT_STATUS&apos; and A.code_value=t1.contract_status)" forInsert="false" forUpdate="false"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
        <o:sequence-pk/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="clause_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field name="tmpt_id" queryExpression="t1.tmpt_id = ${@tmpt_id}"/>
    </bm:query-fields>
</bm:model>
