<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang 
    $Date: 2014-10-27 上午09:19:03  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="CON_DEBT_EXEMPTION_REQ_V">
    <bm:fields>
        <bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER" prompt="CON_DEBT_EXEMPTION_REQ_V.CONTRACT_NUMBER"/>
        <bm:field name="search_term_1" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SEARCH_TERM_1" prompt="CON_DEBT_EXEMPTION_REQ_V.SEARCH_TERM_1"/>
        <bm:field name="bp_id_tenant" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID_TENANT" prompt="CON_DEBT_EXEMPTION_REQ_V.BP_ID_TENANT"/>
        <bm:field name="bp_id_tenant_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_ID_TENANT_N" prompt="CON_DEBT_EXEMPTION_REQ_V.BP_ID_TENANT_N"/>
        <bm:field name="employee_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EMPLOYEE_ID_N" prompt="CON_DEBT_EXEMPTION_REQ_V.EMPLOYEE_ID_N"/>
        <bm:field name="lease_channel_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_CHANNEL_N" prompt="CON_DEBT_EXEMPTION_REQ_V.LEASE_CHANNEL_N"/>
        <bm:field name="lease_organization_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_ORGANIZATION_N" prompt="CON_DEBT_EXEMPTION_REQ_V.LEASE_ORGANIZATION_N"/>
        <bm:field name="division_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DIVISION_N" prompt="CON_DEBT_EXEMPTION_REQ_V.DIVISION_N"/>
        <bm:field name="contract_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NAME" prompt="CON_DEBT_EXEMPTION_REQ_V.CONTRACT_NAME"/>
        <bm:field name="change_req_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CHANGE_REQ_ID" prompt="CON_DEBT_EXEMPTION_REQ_V.CHANGE_REQ_ID"/>
        <bm:field name="change_req_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CHANGE_REQ_NUMBER" prompt="CON_DEBT_EXEMPTION_REQ_V.CHANGE_REQ_NUMBER"/>
        <bm:field name="batch_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BATCH_ID" prompt="CON_DEBT_EXEMPTION_REQ_V.BATCH_ID"/>
        <bm:field name="document_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_TYPE" prompt="CON_DEBT_EXEMPTION_REQ_V.DOCUMENT_TYPE"/>
        <bm:field name="document_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_CATEGORY" prompt="CON_DEBT_EXEMPTION_REQ_V.DOCUMENT_CATEGORY"/>
        <bm:field name="business_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BUSINESS_TYPE" prompt="CON_DEBT_EXEMPTION_REQ_V.BUSINESS_TYPE"/>
        <bm:field name="business_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BUSINESS_TYPE_N" prompt="CON_DEBT_EXEMPTION_REQ_V.BUSINESS_TYPE_N"/>
        <bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="CON_DEBT_EXEMPTION_REQ_V.COMPANY_ID"/>
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="CON_DEBT_EXEMPTION_REQ_V.CONTRACT_ID"/>
        <bm:field name="total_exemption_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TOTAL_EXEMPTION_AMOUNT" prompt="CON_DEBT_EXEMPTION_REQ_V.TOTAL_EXEMPTION_AMOUNT"/>
        <bm:field name="req_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REQ_STATUS" prompt="CON_DEBT_EXEMPTION_REQ_V.REQ_STATUS"/>
        <bm:field name="req_status_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REQ_STATUS_N" prompt="CON_DEBT_EXEMPTION_REQ_V.REQ_STATUS_N"/>
        <bm:field name="req_date" databaseType="DATE" datatype="java.util.Date" physicalName="REQ_DATE" prompt="CON_DEBT_EXEMPTION_REQ_V.REQ_DATE"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="CON_DEBT_EXEMPTION_REQ_V.DESCRIPTION"/>
        <bm:field name="owner_user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="OWNER_USER_ID" prompt="CON_DEBT_EXEMPTION_REQ_V.OWNER_USER_ID"/>
        <bm:field name="submit_date" databaseType="DATE" datatype="java.util.Date" physicalName="SUBMIT_DATE" prompt="CON_DEBT_EXEMPTION_REQ_V.SUBMIT_DATE"/>
        <bm:field name="approved_date" databaseType="DATE" datatype="java.util.Date" physicalName="APPROVED_DATE" prompt="CON_DEBT_EXEMPTION_REQ_V.APPROVED_DATE"/>
        <bm:field name="total_exemption_amt_legal" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TOTAL_EXEMPTION_AMT_LEGAL" prompt="CON_DEBT_EXEMPTION_REQ_V.TOTAL_EXEMPTION_AMT_LEGAL"/>
        <bm:field name="alloc_exemption_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="ALLOC_EXEMPTION_AMOUNT" prompt="CON_DEBT_EXEMPTION_REQ_V.ALLOC_EXEMPTION_AMOUNT"/>
        <bm:field name="alloc_exemption_amount_legal" databaseType="NUMBER" datatype="java.lang.Double" physicalName="ALLOC_EXEMPTION_AMOUNT_LEGAL" prompt="CON_DEBT_EXEMPTION_REQ_V.ALLOC_EXEMPTION_AMOUNT_LEGAL"/>
        <bm:field name="owner_user_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="OWNER_USER_ID_N" prompt="CON_DEBT_EXEMPTION_REQ_V.OWNER_USER_ID_N"/>
        <bm:field name="old_contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="OLD_CONTRACT_ID" prompt="CON_DEBT_EXEMPTION_REQ_V.OLD_CONTRACT_ID"/>
        <bm:field name="create_user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CREATE_USER_ID" prompt="CON_DEBT_EXEMPTION_REQ_V.CREATE_USER_ID"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:data-filters>
        <bm:data-filter name="req_status" enforceOperations="query" expression="t1.req_status in (&apos;NEW&apos;,&apos;REJECT&apos;)"/>
        <bm:data-filter name="create_user_id" enforceOperations="query" expression="t1.create_user_id=${/session/@user_id}"/>
        <bm:data-filter name="company_id" enforceOperations="query" expression="t1.company_id=${/session/@company_id}"/>
    </bm:data-filters>
</bm:model>
