<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2014-6-10 下午07:15:35  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="PRJ_CDD_ITEM_TEMPLET" defaultOrderBy="t1.order_seq">
    <bm:fields>
        <bm:field name="cdd_item" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="250" forDisplay="true" forQuery="true" physicalName="CDD_ITEM" prompt="PRJ_CDD_ITEM_TEMPLET.CDD_ITEM"/>
        <bm:field name="templet_head_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TEMPLET_HEAD_ID" prompt="PRJ_CDD_ITEM_TEMPLET.TEMPLET_HEAD_ID"/>
        <bm:field name="templet_head_name" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select h.templet_name from prj_cdd_item_templet_hd h where h.templet_head_id=t1.templet_head_id)"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="250" forDisplay="true" forQuery="true" physicalName="DESCRIPTION" prompt="PRJ_CDD_ITEM_TEMPLET.DESCRIPTION"/>
        <bm:field name="order_seq" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ORDER_SEQ" prompt="PRJ_CDD_ITEM_TEMPLET.ORDER_SEQ"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="PRJ_CDD_ITEM_TEMPLET.ENABLED_FLAG"/>
        <bm:field name="chance_required_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CHANCE_REQUIRED_FLAG" prompt="PRJ_CDD_ITEM_TEMPLET.CHANCE_REQUIRED_FLAG"/>
        <bm:field name="chance_display_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CHANCE_DISPLAY_FLAG" prompt="PRJ_CDD_ITEM_TEMPLET.CHANCE_DISPLAY_FLAG"/>
        <bm:field name="project_required_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROJECT_REQUIRED_FLAG" prompt="PRJ_CDD_ITEM_TEMPLET.PROJECT_REQUIRED_FLAG"/>
        <bm:field name="project_display_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROJECT_DISPLAY_FLAG" prompt="PRJ_CDD_ITEM_TEMPLET.PROJECT_DISPLAY_FLAG"/>
        <bm:field name="contract_required_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_REQUIRED_FLAG" prompt="PRJ_CDD_ITEM_TEMPLET.CONTRACT_REQUIRED_FLAG"/>
        <bm:field name="contract_display_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_DISPLAY_FLAG" prompt="PRJ_CDD_ITEM_TEMPLET.CONTRACT_DISPLAY_FLAG"/>
        <bm:field name="sign_required_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SIGN_REQUIRED_FLAG" prompt="PRJ_CDD_ITEM_TEMPLET.SIGN_REQUIRED_FLAG"/>
        <bm:field name="sign_display_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SIGN_DISPLAY_FLAG" prompt="PRJ_CDD_ITEM_TEMPLET.SIGN_DISPLAY_FLAG"/>
        <bm:field name="incept_required_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INCEPT_REQUIRED_FLAG" prompt="PRJ_CDD_ITEM_TEMPLET.INCEPT_REQUIRED_FLAG"/>
        <bm:field name="incept_display_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INCEPT_DISPLAY_FLAG" prompt="PRJ_CDD_ITEM_TEMPLET.INCEPT_DISPLAY_FLAG"/>
        <bm:field name="lender_required_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LENDER_REQUIRED_FLAG" prompt="PRJ_CDD_ITEM_TEMPLET.LENDER_REQUIRED_FLAG"/>
        <bm:field name="lender_display_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LENDER_DISPLAY_FLAG" prompt="PRJ_CDD_ITEM_TEMPLET.LENDER_DISPLAY_FLAG"/>
        <bm:field name="chance_tab_group" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CHANCE_TAB_GROUP" prompt="PRJ_CDD_ITEM_TEMPLET.CHANCE_TAB_GROUP"/>
        <bm:field name="project_tab_group" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROJECT_TAB_GROUP" prompt="PRJ_CDD_ITEM_TEMPLET.PROJECT_TAB_GROUP"/>
        <bm:field name="contract_tab_group" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_TAB_GROUP" prompt="PRJ_CDD_ITEM_TEMPLET.CONTRACT_TAB_GROUP"/>
        <bm:field name="sign_tab_group" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SIGN_TAB_GROUP" prompt="PRJ_CDD_ITEM_TEMPLET.SIGN_TAB_GROUP"/>
        <bm:field name="incept_tab_group" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INCEPT_TAB_GROUP" prompt="PRJ_CDD_ITEM_TEMPLET.INCEPT_TAB_GROUP"/>
        <bm:field name="lender_tab_group" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LENDER_TAB_GROUP" prompt="PRJ_CDD_ITEM_TEMPLET.LENDER_TAB_GROUP"/>
        <bm:field name="line_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LINE_TYPE" prompt="PRJ_CDD_ITEM_TEMPLET.LINE_TYPE"/>
        <bm:field name="show_seq" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SHOW_SEQ" prompt="PRJ_CDD_ITEM_TEMPLET.SHOW_SEQ"/>
        <bm:field name="cdd_class" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CDD_CLASS" prompt="PRJ_CDD_ITEM_TEMPLET.CDD_CLASS"/>
        <bm:field name="required_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REQUIRED_FLAG" prompt="PRJ_CDD_ITEM_TEMPLET.REQUIRED_FLAG"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="cdd_item"/>
        <bm:pk-field name="templet_head_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field field="cdd_item" queryOperator="="/>
        <bm:query-field field="description" queryOperator="="/>
        <bm:query-field field="templet_head_id" queryOperator="="/>
    </bm:query-fields>
</bm:model>
