<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2014-6-10 下午06:05:43  
    $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="PRJ_CDD_ITEM_TPLT_TAB_GROUP" defaultOrderBy="t1.seq_num asc">
    <bm:fields>
        <bm:field name="cdd_item" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CDD_ITEM" prompt="PRJ_CDD_ITEM_TPLT_TAB_GROUP.CDD_ITEM"/>
        <bm:field name="cdd_item_desc" expression="(select description from prj_cdd_item_templet c where c.cdd_item=t1.cdd_item and c.templet_head_id=t1.templet_header_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="templet_header_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TEMPLET_HEADER_ID" prompt="PRJ_CDD_ITEM_TPLT_TAB_GROUP.TEMPLET_HEADER_ID"/>
        <bm:field name="tab_group_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TAB_GROUP_ID" prompt="PRJ_CDD_ITEM_TPLT_TAB_GROUP.TAB_GROUP_ID"/>
        <bm:field name="seq_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SEQ_NUM"/>
        <bm:field name="important_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="IMPORTANT_FLAG"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="PRJ_CDD_ITEM_TPLT_TAB_GROUP.ENABLED_FLAG"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="tab_group_id"/>
        <bm:pk-field name="templet_header_id"/>
        <bm:pk-field name="cdd_item"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field field="tab_group_id" queryOperator="="/>
        <bm:query-field field="templet_header_id" queryOperator="="/>
    </bm:query-fields>
    <e:exception-descriptor-config>
        <e:exception-descriptor exception="java.sql.SQLException" handleClass="leaf.database.SQLExceptionDescriptor">
            <e:error-message code="1" message="HLS220.TAB_GROUP_UNIQUE_ERROR"/>
        </e:exception-descriptor>
    </e:exception-descriptor-config>
</bm:model>
