<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                    t1.record_id,
                    t1.sign_user_id,
                    t1.sign_id,
                    e.employee_code,
                    e.employee_name,
                    e.unit_id,
                    e.unit_code,
                    e.unit_name,
                    e.position_name,
                    e.company_short_name
                FROM
                    hn_payment_cond_sign_user t1,
                    exp_emp_assign_e_v e
                WHERE
                    e.primary_position_flag = 'Y' AND
                    t1.sign_user_id         = e.user_id AND
                    t1.sign_id              = ${@sign_id}
            ]]></bm:query-sql>
        </bm:operation>
        <bm:operation name="delete">
            <bm:update-sql><![CDATA[
                DELETE
                FROM
                    hn_payment_cond_sign_user t1
                WHERE
                    t1.record_id = ${@record_id}
            ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="record_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RECORD_ID"/>
        <bm:field name="sign_user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SIGN_USER_ID"/>
        <bm:field name="sign_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SIGN_ID"/>
        <bm:field name="employee_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EMPLOYEE_CODE"/>
        <bm:field name="employee_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EMPLOYEE_NAME"/>
        <bm:field name="unit_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="UNIT_ID"/>
        <bm:field name="unit_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="UNIT_CODE"/>
        <bm:field name="unit_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="UNIT_NAME"/>
        <bm:field name="position_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="POSITION_NAME"/>
        <bm:field name="company_short_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COMPANY_SHORT_NAME"/>
    </bm:fields>
</bm:model>
