<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="PRJ_CON_SIGN_LV">
    <bm:fields>
        <bm:field name="project_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PROJECT_ID" prompt="PRJ_CON_SIGN_LV.PROJECT_ID"/>
        <bm:field name="project_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROJECT_NUMBER" prompt="PRJ_CON_SIGN_LV.PROJECT_NUMBER"/>
        <bm:field name="project_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROJECT_NAME" prompt="PRJ_CON_SIGN_LV.PROJECT_NAME"/>
        <bm:field name="project_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROJECT_STATUS" prompt="PRJ_CON_SIGN_LV.PROJECT_STATUS"/>
        <bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER" prompt="PRJ_CON_SIGN_LV.CONTRACT_NUMBER"/>
        <bm:field name="contract_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NAME" prompt="PRJ_CON_SIGN_LV.CONTRACT_NAME"/>
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="PRJ_CON_SIGN_LV.CONTRACT_ID"/>
        <bm:field name="contract_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_STATUS" prompt="PRJ_CON_SIGN_LV.CONTRACT_STATUS"/>
        <bm:field name="business_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BUSINESS_TYPE" prompt="PRJ_CON_SIGN_LV.BUSINESS_TYPE"/>
        <bm:field name="cdd_list_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CDD_LIST_ID" prompt="PRJ_CON_SIGN_LV.CDD_LIST_ID"/>
        <bm:field name="business_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BUSINESS_TYPE_N" prompt="PRJ_CON_SIGN_LV.BUSINESS_TYPE_N"/>
        <bm:field name="document_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_TYPE" prompt="PRJ_CON_SIGN_LV.DOCUMENT_TYPE"/>
        <bm:field name="document_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_TYPE_N" prompt="PRJ_CON_SIGN_LV.DOCUMENT_TYPE_N"/>
        <bm:field name="document_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_CATEGORY" prompt="PRJ_CON_SIGN_LV.DOCUMENT_CATEGORY"/>
        <bm:field name="document_category_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_CATEGORY_N" prompt="PRJ_CON_SIGN_LV.DOCUMENT_CATEGORY_N"/>
        <bm:field name="project_id_c" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROJECT_ID_C" prompt="PRJ_CON_SIGN_LV.PROJECT_ID_C"/>
        <bm:field name="project_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROJECT_ID_N" prompt="PRJ_CON_SIGN_LV.PROJECT_ID_N"/>
        <bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="PRJ_CON_SIGN_LV.COMPANY_ID"/>
        <bm:field name="company_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COMPANY_ID_N" prompt="PRJ_CON_SIGN_LV.COMPANY_ID_N"/>
        <bm:field name="lease_organization" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_ORGANIZATION" prompt="PRJ_CON_SIGN_LV.LEASE_ORGANIZATION"/>
        <bm:field name="lease_organization_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_ORGANIZATION_N" prompt="PRJ_CON_SIGN_LV.LEASE_ORGANIZATION_N"/>
        <bm:field name="lease_channel" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_CHANNEL" prompt="PRJ_CON_SIGN_LV.LEASE_CHANNEL"/>
        <bm:field name="lease_channel_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_CHANNEL_N" prompt="PRJ_CON_SIGN_LV.LEASE_CHANNEL_N"/>
        <bm:field name="division" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DIVISION" prompt="PRJ_CON_SIGN_LV.DIVISION"/>
        <bm:field name="division_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DIVISION_N" prompt="PRJ_CON_SIGN_LV.DIVISION_N"/>
        <bm:field name="bp_id_tenant" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID_TENANT" prompt="PRJ_CON_SIGN_LV.BP_ID_TENANT"/>
        <bm:field name="bp_id_tenant_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_ID_TENANT_N" prompt="PRJ_CON_SIGN_LV.BP_ID_TENANT_N"/>
        <bm:field name="owner_user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="OWNER_USER_ID" prompt="PRJ_CON_SIGN_LV.OWNER_USER_ID"/>
        <bm:field name="employee_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="EMPLOYEE_ID" prompt="PRJ_CON_SIGN_LV.EMPLOYEE_ID"/>
        <bm:field name="employee_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EMPLOYEE_ID_N" prompt="PRJ_CON_SIGN_LV.EMPLOYEE_ID_N"/>
        <bm:field name="employee_id_of_manager" databaseType="NUMBER" datatype="java.lang.Long" physicalName="EMPLOYEE_ID_OF_MANAGER" prompt="PRJ_CON_SIGN_LV.EMPLOYEE_ID_OF_MANAGER"/>
        <bm:field name="employee_id_of_manager_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EMPLOYEE_ID_OF_MANAGER_N" prompt="PRJ_CON_SIGN_LV.EMPLOYEE_ID_OF_MANAGER_N"/>
        <bm:field name="down_payment" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DOWN_PAYMENT" prompt="PRJ_CON_SIGN_LV.DOWN_PAYMENT"/>
        <bm:field name="lease_item_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LEASE_ITEM_AMOUNT" prompt="PRJ_CON_SIGN_LV.LEASE_ITEM_AMOUNT"/>
        <bm:field name="finance_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FINANCE_AMOUNT" prompt="PRJ_CON_SIGN_LV.FINANCE_AMOUNT"/>
        <bm:field name="data_class" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DATA_CLASS" prompt="PRJ_CON_SIGN_LV.DATA_CLASS"/>
        <bm:field name="document_number" expression="nvl(contract_number,project_number)"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:query-fields>
        <bm:query-field name="document_id" queryExpression="((${@document_table}=&apos;PRJ_PROJECT&apos; and project_id=${@document_id}) or (${@document_table}=&apos;CON_CONTRACT&apos; and contract_id=${@document_id}))"/>
    </bm:query-fields>
</bm:model>
