<?xml version="1.0" encoding="UTF-8"?>
<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="HN_CON_PAYMENT_CONDITIONS">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
	              SELECT
                        hcpc.description, --描述
                        hcpc.condition_id,
                        hcpc.hd_id,
                        hcpc.attachment_number,
                        hcpc.confirm_flag,
                        hcpc.confirm_user_id,
                        hcpc.confirm_date,
                        hcpc.note,
                        hcpc.record_id
                    FROM
                        hn_payment_cond_change_req hpccr,
                        hn_con_payment_con_hd hcpch,
                        hn_con_payment_conditions hcpc
                    WHERE
                        hpccr.change_req_id = hcpch.hd_id AND
                        hpccr.change_req_id = hcpc.hd_id AND
                        hpccr.change_req_id = ${@change_req_id}    
	            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="condition_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONDITION_ID" prompt="HN_CON_PAYMENT_CONDITIONS.CONDITION_ID"/>
        <bm:field name="hd_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="HD_ID" prompt="HN_CON_PAYMENT_CONDITIONS.HD_ID"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="HN_CON_PAYMENT_CONDITIONS.DESCRIPTION"/>
        <bm:field name="attachment_number" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ATTACHMENT_NUMBER" prompt="HN_CON_PAYMENT_CONDITIONS.ATTACHMENT_NUMBER"/>
        <bm:field name="confirm_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONFIRM_FLAG" prompt="HN_CON_PAYMENT_CONDITIONS.CONFIRM_FLAG"/>
        <bm:field name="confirm_user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONFIRM_USER_ID" prompt="HN_CON_PAYMENT_CONDITIONS.CONFIRM_USER_ID"/>
        <bm:field name="confirm_date" databaseType="DATE" datatype="java.util.Date" physicalName="CONFIRM_DATE" prompt="HN_CON_PAYMENT_CONDITIONS.CONFIRM_DATE"/>
        <bm:field name="note" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NOTE" prompt="HN_CON_PAYMENT_CONDITIONS.NOTE"/>
        <bm:field name="record_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RECORD_ID" prompt="HN_CON_PAYMENT_CONDITIONS.RECORD_ID"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
        <o:sequence-pk/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="condition_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field name="change_req_id" queryExpression="t1.change_req_id=${@change_req_id}"/>
    </bm:query-fields>
</bm:model>
