<?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
                    *
                FROM
                    (SELECT
                        t.project_id,
                        t.virtual_con_number,
                        t.virtual_con_name,
                        t.con_document_type,
                        t.con_document_type_n,
                        t.bp_id_tenant,
                        t.bp_id_tenant_n,
                        t.finance_amount,
                        t.division,
                        t.division_n,
                        t.employee_id,
                        t.employee_id_n,
                        t.employee_id_of_manager,
                        t.employee_id_of_manager_n,
                        t.lease_organization,
                        t.lease_organization_n,
                        t.hn_industry_classification,
                        t.hn_industry_classification_n,
                        (select hac.description from hn_atm_complement hac,hn_atm_complement_config hacc
                        where document_id = t.project_id
                        and hac.config_id=hacc.config_id
                        and hac.record_id = ${@record_id}
                        and hacc.function_code='CONTENT_CHANGE') description,
                        t.cdd_list_id
                    FROM
                        prj_project_virtual_con_lv t
                    ) t1 #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="project_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PROJECT_ID" required="true"/>
        <bm:field name="virtual_con_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VIRTUAL_CON_NUMBER"/>
        <bm:field name="virtual_con_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VIRTUAL_CON_NAME"/>
        <bm:field name="con_document_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CON_DOCUMENT_TYPE"/>
        <bm:field name="con_document_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CON_DOCUMENT_TYPE_N"/>
        <bm:field name="bp_id_tenant" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID_TENANT"/>
        <bm:field name="bp_id_tenant_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_ID_TENANT_N"/>
        <bm:field name="finance_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="FINANCE_AMOUNT"/>
        <bm:field name="division" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DIVISION" required="true"/>
        <bm:field name="division_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DIVISION_N"/>
        <bm:field name="employee_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="EMPLOYEE_ID"/>
        <bm:field name="employee_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EMPLOYEE_ID_N"/>
        <bm:field name="employee_id_of_manager" databaseType="NUMBER" datatype="java.lang.Long" physicalName="EMPLOYEE_ID_OF_MANAGER"/>
        <bm:field name="employee_id_of_manager_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EMPLOYEE_ID_OF_MANAGER_N"/>
        <bm:field name="lease_organization" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_ORGANIZATION" required="true"/>
        <bm:field name="lease_organization_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_ORGANIZATION_N"/>
        <bm:field name="hn_industry_classification"/>
        <bm:field name="hn_industry_classification_n"/>
        <bm:field name="description"/>
        <bm:field name="cdd_list_id"/>
    </bm:fields>
</bm:model>
