<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:fields>
        <bm:field name="contract_id" displayWidth="200" prompt="合同ID"/>
        <bm:field name="search_term_1" displayWidth="200" forDisplay="true" forQuery="true" prompt="合同号"/>
        <bm:field name="contract_name" displayWidth="200" forDisplay="true" forQuery="true" prompt="合同名"/>
        <bm:field name="contract_number" displayWidth="200" forDisplay="true" forQuery="true" prompt="合同序号"/>
    </bm:fields>
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                    *
                FROM
                    (SELECT
                        a.contract_id,
                        a.contract_number,
                        a.search_term_1,
                        a.contract_name
                    FROM
                        con_contract a
                    WHERE
                        a.data_class = 'NORMAL'
                    ORDER BY
                        a.contract_number
                    ) #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:query-fields>
        <bm:query-field field="search_term_1" queryOperator="like"/>
        <bm:query-field field="contract_name" queryOperator="like"/>
        <bm:query-field field="contract_id" queryOperator="like"/>
        <bm:query-field field="contract_number" queryOperator="like"/>
    </bm:query-fields>
</bm:model>
