<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                    *
                FROM
                    (SELECT
                        contract_id,
                        contract_number,
                        contract_name
                    FROM
                        con_contract
                        WHERE data_class = 'NORMAL'
                    ORDER BY
                        contract_id DESC
                    ) t #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID"/>
        <bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="200" forDisplay="true" forQuery="true" physicalName="CONTRACT_NUMBER" prompt="提款编号"/>
        <bm:field name="contract_name" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="250" forDisplay="true" forQuery="true" physicalName="CONTRACT_NAME" prompt="合同名称"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field name="contract_number" queryExpression="t.contract_number like ${@contract_number}"/>
        <bm:query-field name="contract_name" queryExpression="t.contract_name like ${@contract_name}"/>
    </bm:query-fields>
</bm:model>
