<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: qianming  
    $Date: 2015-7-15 下午1:47:05  
    $Revision: 1.0  
    $Purpose: 国资-付款先决条件
-->
<bm:model xmlns:o="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="BGFL_CSH_PAYMENT_CONDITIONS" defaultOrderBy="condition_code">
    <bm:fields>
        <bm:field name="condition_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONDITION_ID"/>
        <bm:field name="project_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PROJECT_ID"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="描述"/>
        <bm:field name="attachment_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTACHMENT_NUMBER" prompt="附件数量"/>
        <bm:field name="original_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ORIGINAL_FLAG" prompt="附件含原件"/>
        <bm:field name="hard_copy_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="HARD_COPY_FLAG" prompt="附件含复印件"/>
        <bm:field name="confirm_flag" databaseType="VARCHAR2" datatype="java.lang.String" forUpdate="false" lookupCode="YES_NO" lookupField="confirm_flag_desc" physicalName="CONFIRM_FLAG"/>
        <bm:field name="confirm_flag_desc" forInsert="false" forUpdate="false" prompt="是否落实"/>
        <bm:field name="confirm_user_id" databaseType="NUMBER" datatype="java.lang.Long" forInsert="false" forUpdate="false" physicalName="CONFIRM_USER_ID"/>
        <bm:field name="confirm_user_name" expression="(select description from sys_user where user_id = t1.confirm_user_id)" forInsert="false" forUpdate="false" prompt="落实人"/>
        <bm:field name="confirm_date" databaseType="DATE" datatype="java.util.Date" forInsert="false" forUpdate="false" physicalName="CONFIRM_DATE" prompt="落实时间"/>
        <bm:field name="note" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NOTE" prompt="备注"/>
        <bm:field name="original_flag_n" expression="(select  decode(t1.original_flag,&apos;Y&apos;,&apos;是&apos;,&apos;N&apos;,&apos;否&apos;) from   dual  )" forInsert="false" forUpdate="false"/>
        <bm:field name="hard_copy_flag_n" expression="(select  decode(t1.hard_copy_flag,&apos;Y&apos;,&apos;是&apos;,&apos;N&apos;,&apos;否&apos;) from   dual  )" forInsert="false" forUpdate="false"/>
        <bm:field name="owner_id" expression="t1.created_by" forInsert="false" forUpdate="false"/>
        <bm:field name="record_id"/>
        <bm:field name="condition_code" expression="(select condition_code from hn_csh_payment_cond_define h where h.record_id = t1.record_id)" forInsert="false" forUpdate="false"/>
    </bm:fields>
    <bm:features>
        <o:sequence-pk/>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="condition_id"/>
    </bm:primary-key>
    <bm:order-by>
        <bm:order-field name="condition_code"/>
    </bm:order-by>
    <bm:data-filters>
        <bm:data-filter name="1" enforceOperations="query" expression="t1.project_id = ${@project_id}"/>
    </bm:data-filters>
</bm:model>
