<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:db="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="pp" baseTable="ZJ_WFL_WORKFLOW_TYPE_PARAMETER" defaultOrderBy="sequence_num">
    <bm:fields>
        <bm:field name="workflow_type_para_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WORKFLOW_TYPE_PARA_ID" prompt="ZJ_WFL_WORKFLOW_TYPE_PARAMETER.WORKFLOW_TYPE_PARA_ID"/>
        <bm:field name="workflow_type_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WORKFLOW_TYPE_ID" prompt="ZJ_WFL_WORKFLOW_TYPE_PARAMETER.WORKFLOW_TYPE_ID"/>
        <bm:field name="sequence_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SEQUENCE_NUM" prompt="ZJ_WFL_WORKFLOW_TYPE_PARAMETER.SEQUENCE_NUM"/>
        <bm:field name="parameter_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PARAMETER_CODE" prompt="ZJ_WFL_WORKFLOW_TYPE_PARAMETER.PARAMETER_CODE"/>
        <bm:field name="parameter_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PARAMETER_DESC" prompt="ZJ_WFL_WORKFLOW_TYPE_PARAMETER.PARAMETER_DESC"/>
        <bm:field name="required_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REQUIRED_FLAG" prompt="ZJ_WFL_WORKFLOW_TYPE_PARAMETER.REQUIRED_FLAG"/>
        <bm:field name="dsiplay_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DSIPLAY_FLAG" prompt="ZJ_WFL_WORKFLOW_TYPE_PARAMETER.DSIPLAY_FLAG"/>
        <bm:field name="doc_number_field" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOC_NUMBER_FIELD" prompt="ZJ_WFL_WORKFLOW_TYPE_PARAMETER.DOC_NUMBER_FIELD"/>
        <bm:field name="submitted_by_field" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SUBMITTED_BY_FIELD" prompt="ZJ_WFL_WORKFLOW_TYPE_PARAMETER.SUBMITTED_BY_FIELD"/>
    </bm:fields>
    <bm:features>
        <db:sequence-pk sequenceName="zj_wfl_workflow_type_para_s"/>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="workflow_type_para_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field name="workflow_type_id" queryExpression="pp.workflow_type_id = ${/parameter/@workflow_type_id}"/>
    </bm:query-fields>
    <bm:operations>
        <bm:operation name="delete">
            <bm:update-sql><![CDATA[
            begin
				zj_wfl_workflow_pkg.delete_wfl_type_para
				(
					p_workflow_type_para_id   => ${@workflow_type_para_id},					
					p_user_id                 => ${/session/@user_id}
				);
			end;
			]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="execute">
            <bm:update-sql><![CDATA[
            begin
				zj_wfl_workflow_pkg.check_type_para
				(
					p_workflow_type_id   	  => ${@workflow_type_id},			
					p_user_id                 => ${/session/@user_id}
				);
			end;
			]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
