<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: chenlingfeng
    $Date: 2019-06-03 15:20:54
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[
            	begin
            		con_contract_content_pkg.csh_payment_content_create(
            			p_contract_id =>${@contract_id},
            			p_user_id     =>${/session/@user_id},
            			p_content_id  => ${@content_id}
            		);
            		
            	end;
            ]]></bm:update-sql>
            <bm:parameters>
                <bm:parameter name="content_id" input="false" output="true" outputPath="@content_id"/>
            </bm:parameters>
        </bm:operation>
        <bm:operation name="execute">
            <bm:update-sql><![CDATA[
        	begin
  			-- Call the procedure
  			con_collection_tool_pkg.con_contract_content_update(p_content_id => ${@content_id},
                                                      			p_file_path => ${@file_path},
                                                      			p_user_id => ${/session/@user_id});
			end;
        	 ]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[

            select contract_status from con_contract t
            where t.contract_id = ${@contract_id}
]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
