<?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
                    ${@hd_id}:=hn_virtual_contract_pkg.create_virtual_con_relate_hd(p_project_id  =>${@project_id},
                                        p_real_capacity_date =>to_date(${@real_capacity_date},'YYYY-MM-DD'),
                                        p_user_id            =>${/session/@user_id});
                END;
            ]]></bm:update-sql>
            <bm:parameters>
                <bm:parameter name="hd_id" output="true" outputPath="@hd_id"/>
            </bm:parameters>
        </bm:operation>
        <bm:operation name="delete">
            <bm:update-sql><![CDATA[
                BEGIN
                    hn_virtual_contract_pkg.cancel_virtual_con_relate_hd(p_hd_id  =>${@hd_id});
                END;
            ]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="execute">
            <bm:update-sql><![CDATA[
                BEGIN
                    hn_virtual_contract_pkg.submit_virtual_con_relate_hd(p_hd_id  =>${@hd_id},
                    										p_project_id  =>${@project_id},
                    										p_company_id  =>${/session/@company_id},
                    										p_user_id     =>${/session/@user_id});
                END;
            ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
