<?xml version="1.0" encoding="UTF-8"?>
<ns1:model xmlns:ns1="http://www.leaf-framework.org/schema/bm" alias="t1" extend="zjwfl.ZJWFL1090.zj_sys_notify_template" extendMode="reference">
    <ns1:fields>
        <ns1:field name="notify_template_id"/>
        <ns1:field name="notify_template_code" forDisplay="true" forQuery="true" prompt="模板代码"/>
        <ns1:field name="notify_template_desc" forDisplay="true" forQuery="true" prompt="模板描述"/>
    </ns1:fields>
    <ns1:operations>
        <ns1:operation name="query">
            <ns1:query-sql><![CDATA[
    			select t1.notify_template_id,
				       t1.notify_template_code,
				       t1.description as notify_template_desc
				  from zj_sys_notify_template_v t1
				  #WHERE_CLAUSE#
    		]]></ns1:query-sql>
        </ns1:operation>
    </ns1:operations>
    <ns1:query-fields>
        <ns1:query-field field="notify_template_code" queryOperator="like"/>
        <ns1:query-field name="notify_template_desc" queryExpression="t1.description like ${@notify_template_desc}"/>
    </ns1:query-fields>
    <ns1:data-filters>
        <ns1:data-filter enforceOperations="query" expression="exists (select 1 from zj_wfl_workflow w where w.workflow_type_id = t1.workflow_type_id and w.workflow_id = ${@workflow_id})"/>
        <ns1:data-filter enforceOperations="query" expression="t1.notify_type=${@notify_type}"/>
    </ns1:data-filters>
</ns1:model>
