<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="CON_CONTRACT_CHANGE_REQ_LV" defaultOrderBy="t1.req_date desc,t1.change_req_number desc">
    <bm:fields>
        <bm:field name="change_req_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CHANGE_REQ_ID" prompt="CON_CONTRACT_CHANGE_REQ_LV.CHANGE_REQ_ID"/>
        <bm:field name="batch_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BATCH_ID" prompt="CON_CONTRACT_CHANGE_REQ_LV.BATCH_ID"/>
        <bm:field name="change_quotation" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CHANGE_QUOTATION" prompt="CON_CONTRACT_CHANGE_REQ_LV.CHANGE_QUOTATION"/>
        <bm:field name="change_lease_item" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CHANGE_LEASE_ITEM" prompt="CON_CONTRACT_CHANGE_REQ_LV.CHANGE_LEASE_ITEM"/>
        <bm:field name="change_bp" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CHANGE_BP" prompt="CON_CONTRACT_CHANGE_REQ_LV.CHANGE_BP"/>
        <bm:field name="change_req_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CHANGE_REQ_NUMBER" prompt="CON_CONTRACT_CHANGE_REQ_LV.CHANGE_REQ_NUMBER"/>
        <bm:field name="document_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_TYPE" prompt="CON_CONTRACT_CHANGE_REQ_LV.DOCUMENT_TYPE"/>
        <bm:field name="document_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_TYPE_N" prompt="CON_CONTRACT_CHANGE_REQ_LV.DOCUMENT_TYPE_N"/>
        <bm:field name="document_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_CATEGORY" prompt="CON_CONTRACT_CHANGE_REQ_LV.DOCUMENT_CATEGORY"/>
        <bm:field name="business_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BUSINESS_TYPE" prompt="CON_CONTRACT_CHANGE_REQ_LV.BUSINESS_TYPE"/>
        <bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="CON_CONTRACT_CHANGE_REQ_LV.COMPANY_ID"/>
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="CON_CONTRACT_CHANGE_REQ_LV.CONTRACT_ID"/>
        <bm:field name="req_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REQ_STATUS" prompt="CON_CONTRACT_CHANGE_REQ_LV.REQ_STATUS"/>
        <bm:field name="req_status_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REQ_STATUS_N" prompt="CON_CONTRACT_CHANGE_REQ_LV.REQ_STATUS_N"/>
        <bm:field name="req_date" databaseType="DATE" datatype="java.util.Date" physicalName="REQ_DATE" prompt="CON_CONTRACT_CHANGE_REQ_LV.REQ_DATE"/>
        <bm:field name="inception_of_lease" databaseType="DATE" datatype="java.util.Date" physicalName="INCEPTION_OF_LEASE" prompt="CON_CONTRACT_CHANGE_REQ_LV.INCEPTION_OF_LEASE"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="CON_CONTRACT_CHANGE_REQ_LV.DESCRIPTION"/>
        <bm:field name="wfl_instance_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WFL_INSTANCE_ID" prompt="CON_CONTRACT_CHANGE_REQ_LV.WFL_INSTANCE_ID"/>
        <bm:field name="calc_session_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CALC_SESSION_ID" prompt="CON_CONTRACT_CHANGE_REQ_LV.CALC_SESSION_ID"/>
        <bm:field name="owner_user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="OWNER_USER_ID" prompt="CON_CONTRACT_CHANGE_REQ_LV.OWNER_USER_ID"/>
        <bm:field name="submit_date" databaseType="DATE" datatype="java.util.Date" physicalName="SUBMIT_DATE" prompt="CON_CONTRACT_CHANGE_REQ_LV.SUBMIT_DATE"/>
        <bm:field name="approved_date" databaseType="DATE" datatype="java.util.Date" physicalName="APPROVED_DATE" prompt="CON_CONTRACT_CHANGE_REQ_LV.APPROVED_DATE"/>
        <bm:field name="ccr_price_list" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CCR_PRICE_LIST" prompt="CON_CONTRACT_CHANGE_REQ_LV.CCR_PRICE_LIST"/>
        <bm:field name="ccr_calc_session_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CCR_CALC_SESSION_ID" prompt="CON_CONTRACT_CHANGE_REQ_LV.CCR_CALC_SESSION_ID"/>
        <bm:field name="simulation_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SIMULATION_FLAG" prompt="CON_CONTRACT_CHANGE_REQ_LV.SIMULATION_FLAG"/>
        <bm:field name="simulation_flag_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SIMULATION_FLAG_N" prompt="CON_CONTRACT_CHANGE_REQ_LV.SIMULATION_FLAG_N"/>
        <bm:field name="reschedule_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="RESCHEDULE_FLAG" prompt="CON_CONTRACT_CHANGE_REQ_LV.RESCHEDULE_FLAG"/>
        <bm:field name="reschedule_flag_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="RESCHEDULE_FLAG_N" prompt="CON_CONTRACT_CHANGE_REQ_LV.RESCHEDULE_FLAG_N"/>
        <bm:field name="et_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ET_FLAG" prompt="CON_CONTRACT_CHANGE_REQ_LV.ET_FLAG"/>
        <bm:field name="et_flag_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ET_FLAG_N" prompt="CON_CONTRACT_CHANGE_REQ_LV.ET_FLAG_N"/>
        <bm:field name="tenant_change_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TENANT_CHANGE_FLAG" prompt="CON_CONTRACT_CHANGE_REQ_LV.TENANT_CHANGE_FLAG"/>
        <bm:field name="tenant_change_flag_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TENANT_CHANGE_FLAG_N" prompt="CON_CONTRACT_CHANGE_REQ_LV.TENANT_CHANGE_FLAG_N"/>
        <bm:field name="bank_acc_change_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_ACC_CHANGE_FLAG" prompt="CON_CONTRACT_CHANGE_REQ_LV.BANK_ACC_CHANGE_FLAG"/>
        <bm:field name="bank_acc_change_flag_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_ACC_CHANGE_FLAG_N" prompt="CON_CONTRACT_CHANGE_REQ_LV.BANK_ACC_CHANGE_FLAG_N"/>
        <bm:field name="lease_item_change_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_ITEM_CHANGE_FLAG" prompt="CON_CONTRACT_CHANGE_REQ_LV.LEASE_ITEM_CHANGE_FLAG"/>
        <bm:field name="lease_item_change_flag_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_ITEM_CHANGE_FLAG_N" prompt="CON_CONTRACT_CHANGE_REQ_LV.LEASE_ITEM_CHANGE_FLAG_N"/>
        <bm:field name="mortgage_change_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="MORTGAGE_CHANGE_FLAG" prompt="CON_CONTRACT_CHANGE_REQ_LV.MORTGAGE_CHANGE_FLAG"/>
        <bm:field name="mortgage_change_flag_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="MORTGAGE_CHANGE_FLAG_N" prompt="CON_CONTRACT_CHANGE_REQ_LV.MORTGAGE_CHANGE_FLAG_N"/>
        <bm:field name="guarantor_change_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="GUARANTOR_CHANGE_FLAG" prompt="CON_CONTRACT_CHANGE_REQ_LV.GUARANTOR_CHANGE_FLAG"/>
        <bm:field name="guarantor_change_flag_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="GUARANTOR_CHANGE_FLAG_N" prompt="CON_CONTRACT_CHANGE_REQ_LV.GUARANTOR_CHANGE_FLAG_N"/>
        <bm:field name="contract_cancel_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_CANCEL_FLAG" prompt="CON_CONTRACT_CHANGE_REQ_LV.CONTRACT_CANCEL_FLAG"/>
        <bm:field name="contract_cancel_flag_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_CANCEL_FLAG_N" prompt="CON_CONTRACT_CHANGE_REQ_LV.CONTRACT_CANCEL_FLAG_N"/>
        <bm:field name="cashflow_change_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CASHFLOW_CHANGE_FLAG" prompt="CON_CONTRACT_CHANGE_REQ_LV.CASHFLOW_CHANGE_FLAG"/>
        <bm:field name="cashflow_change_flag_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CASHFLOW_CHANGE_FLAG_N" prompt="CON_CONTRACT_CHANGE_REQ_LV.CASHFLOW_CHANGE_FLAG_N"/>
        <bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER" prompt="CON_CONTRACT_CHANGE_REQ_LV.CONTRACT_NUMBER"/>
        <bm:field name="contract_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NAME" prompt="CON_CONTRACT_CHANGE_REQ_LV.CONTRACT_NAME"/>
        <bm:field name="bp_id_tenant" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID_TENANT" prompt="CON_CONTRACT_CHANGE_REQ_LV.BP_ID_TENANT"/>
        <bm:field name="bp_id_tenant_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_ID_TENANT_N" prompt="CON_CONTRACT_CHANGE_REQ_LV.BP_ID_TENANT_N"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:data-filters>
        <bm:data-filter name="req_status" enforceOperations="query" expression="t1.document_category = &apos;CHANGE_REQUEST&apos;    and t1.business_type = &apos;CON_CHANGE&apos;    and t1.req_status in (&apos;NEW&apos;, &apos;REJECT&apos;)  and t1.simulation_flag=&apos;N&apos;    "/>
    </bm:data-filters>
    <bm:query-fields>
        <bm:query-field name="contract_number" queryexpression="t1.contract_number like &apos;%&apos;||${@contract_number}||&apos;%&apos;"/>
        <bm:query-field name="contract_name" queryexpression="t1.contract_name like &apos;%&apos;||${@contract_name}||&apos;%&apos;"/>
        <bm:query-field name="bp_name" queryexpression="t1.bp_id_tenant_n like &apos;%&apos;||${@bp_name}||&apos;%&apos;"/>
        <bm:query-field name="date_from" queryexpression="t1.inception_of_lease &gt;= ${@date_from}"/>
        <bm:query-field name="date_to" queryexpression="t1.inception_of_lease &lt;= ${@date_from}"/>
    </bm:query-fields>
</bm:model>
