<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: mumu  
    $Date: 2013-10-17 下午04:25:11  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="con_contract_rp_hd">
    <bm:fields>
        <bm:field name="rp_agreement_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RP_AGREEMENT_ID"/>
        <bm:field name="rp_agreement_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="RP_AGREEMENT_NUMBER"/>
        <bm:field name="document_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_TYPE"/>
        <bm:field name="repurchase_date" databaseType="DATE" datatype="java.util.Date" physicalName="REPURCHASE_DATE"/>
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID"/>
        <bm:field name="rp_due_total_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="RP_DUE_TOTAL_AMOUNT"/>
        <bm:field name="rp_total_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="RP_TOTAL_AMOUNT"/>
        <bm:field name="status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="STATUS"/>
        <bm:field name="rp_status_desc" expression="(select code_value_name from sys_code_values_v where code=&apos;CON_RP_STATUS&apos; and code_value = t1.status)" forInsert="false" forUpdate="false"/>
        <bm:field name="rp_type_desc" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select a.description from hls_document_type a where a.document_type=t1.document_type)" forInsert="false" forUpdate="false"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="rp_agreement_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field name="rp_agreement_id" queryExpression="t1.rp_agreement_id = ${@rp_agreement_id}"/>
        <bm:query-field name="contract_id" queryExpression="t1.contract_id = ${@contract_id}"/>
    </bm:query-fields>
</bm:model>
