<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="insert">
            <bm:update-sql><![CDATA[
                BEGIN
                    ${@change_req_id}:=hn_intermediary_hired_req_pkg.create_hired_req_change(p_hired_req_id =>${@hired_req_id},
                                   p_req_date     =>to_date(${@req_date},'YYYY-MM-DD'),
                                   p_user_id      =>${/session/@user_id});
                END;
            ]]></bm:update-sql>
            <bm:parameters>
                <bm:parameter name="change_req_id" output="true" outputPath="@change_req_id"/>
            </bm:parameters>
        </bm:operation>
        <bm:operation name="delete">
            <bm:update-sql><![CDATA[
            	BEGIN
                    hn_intermediary_hired_req_pkg.delete_hired_req_change(p_change_req_id =>${@change_req_id},
                                   p_user_id      =>${/session/@user_id});
                END;
            ]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="execute">
            <bm:update-sql><![CDATA[
            	BEGIN
                    hn_intermediary_hired_req_pkg.submit_hired_req_change(p_change_req_id =>${@change_req_id},
                                    p_company_id    =>${/session/@company_id},
                                    p_user_id       =>${/session/@user_id});
                END;
            ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
