<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Foreinyel  
    $Date: 2014-6-24 下午3:26:31  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="HLS_EBANK_CCB_DOCUMENT" defaultOrderBy="t1.document_id desc">
    <bm:fields>
        <bm:field name="document_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DOCUMENT_ID" prompt="HLS_EBANK_CCB_DOCUMENT.DOCUMENT_ID"/>
        <bm:field name="document_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_NUMBER" prompt="HLS_EBANK_CCB_DOCUMENT.DOCUMENT_NUMBER"/>
        <bm:field name="seq_no" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SEQ_NO" prompt="HLS_EBANK_CCB_DOCUMENT.SEQ_NO"/>
        <bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="HLS_EBANK_CCB_DOCUMENT.COMPANY_ID"/>
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="HLS_EBANK_CCB_DOCUMENT.CONTRACT_ID"/>
        <bm:field name="receivable_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RECEIVABLE_AMOUNT" prompt="HLS_EBANK_CCB_DOCUMENT.RECEIVABLE_AMOUNT"/>
        <bm:field name="real_revenue" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REAL_REVENUE" prompt="HLS_EBANK_CCB_DOCUMENT.REAL_REVENUE"/>
        <bm:field name="currency_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CURRENCY_CODE" prompt="HLS_EBANK_CCB_DOCUMENT.CURRENCY_CODE"/>
        <bm:field name="transaction_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TRANSACTION_ID" prompt="HLS_EBANK_CCB_DOCUMENT.TRANSACTION_ID"/>
        <bm:field name="customer_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CUSTOMER_ID" prompt="HLS_EBANK_CCB_DOCUMENT.CUSTOMER_ID"/>
        <bm:field name="customer_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CUSTOMER_NAME" prompt="HLS_EBANK_CCB_DOCUMENT.CUSTOMER_NAME"/>
        <bm:field name="cus_bank_account" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CUS_BANK_ACCOUNT" prompt="HLS_EBANK_CCB_DOCUMENT.CUS_BANK_ACCOUNT"/>
        <bm:field name="cus_bank_acc_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CUS_BANK_ACC_NAME" prompt="HLS_EBANK_CCB_DOCUMENT.CUS_BANK_ACC_NAME"/>
        <bm:field name="cus_id_card_no" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CUS_ID_CARD_NO" prompt="HLS_EBANK_CCB_DOCUMENT.CUS_ID_CARD_NO"/>
        <bm:field name="status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="STATUS" prompt="HLS_EBANK_CCB_DOCUMENT.STATUS"/>
        <bm:field name="new_date" physicalName="NEW_DATE" prompt="HLS_EBANK_CCB_DOCUMENT.NEW_DATE" queryExpression="(to_char(t1.new_date,&apos;yyyy-mm-dd hh:m2:ss&apos;))"/>
        <bm:field name="deal_date" physicalName="DEAL_DATE" prompt="HLS_EBANK_CCB_DOCUMENT.DEAL_DATE" queryExpression="(to_char(t1.deal_date,&apos;yyyy-mm-dd hh:m2:ss&apos;))"/>
        <bm:field name="success_date" physicalName="SUCCESS_DATE" prompt="HLS_EBANK_CCB_DOCUMENT.SUCCESS_DATE" queryExpression="(to_char(t1.success_date,&apos;yyyy-mm-dd hh:m2:ss&apos;))"/>
        <bm:field name="fail_date" physicalName="FAIL_DATE" prompt="HLS_EBANK_CCB_DOCUMENT.FAIL_DATE" queryExpression="(to_char(t1.fail_date,&apos;yyyy-mm-dd hh:m2:ss&apos;))"/>
        <bm:field name="reverse_date" physicalName="REVERSE_DATE" prompt="HLS_EBANK_CCB_DOCUMENT.REVERSE_DATE" queryExpression="(to_char(t1.reverse_date,&apos;yyyy-mm-dd hh:m2:ss&apos;))"/>
        <bm:field name="acr_date" physicalName="ACR_DATE" prompt="HLS_EBANK_CCB_DOCUMENT.ACR_DATE" queryExpression="(to_char(t1.acr_date,&apos;yyyy-mm-dd hh:m2:ss&apos;))"/>
        <bm:field name="note" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NOTE" prompt="HLS_EBANK_CCB_DOCUMENT.NOTE"/>
        <bm:field name="ref_v1" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V1" prompt="HLS_EBANK_CCB_DOCUMENT.REF_V1"/>
        <bm:field name="ref_v2" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V2" prompt="HLS_EBANK_CCB_DOCUMENT.REF_V2"/>
        <bm:field name="ref_v3" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V3" prompt="HLS_EBANK_CCB_DOCUMENT.REF_V3"/>
        <bm:field name="ref_n1" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N1" prompt="HLS_EBANK_CCB_DOCUMENT.REF_N1"/>
        <bm:field name="ref_n2" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N2" prompt="HLS_EBANK_CCB_DOCUMENT.REF_N2"/>
        <bm:field name="ref_n3" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N3" prompt="HLS_EBANK_CCB_DOCUMENT.REF_N3"/>
        <bm:field name="transaction_number" expression="(select transaction_number from hls_ebank_ccb_transaction where transaction_id = t1.transaction_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="status_disp" expression="(select v.code_value_name from sys_code_values_v v where v.code = &apos;HLS_EBANK_CCB_DOCUMENT_STATUS&apos; and v.code_value = t1.status)"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field field="document_number" queryOperator="="/>
        <bm:query-field name="status" queryExpression="(t1.status = ${@status})"/>
        <bm:query-field field="customer_name" queryOperator="like"/>
    </bm:query-fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="document_id"/>
    </bm:primary-key>
</bm:model>
