<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang 
    $Date: 2014-11-10 下午04:32:59  
    $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_LEASE_ITEM_V">
    <bm:fields>
        <bm:field name="contract_lease_item_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_LEASE_ITEM_ID" prompt="CON_CONTRACT_LEASE_ITEM_V.CONTRACT_LEASE_ITEM_ID"/>
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="CON_CONTRACT_LEASE_ITEM_V.CONTRACT_ID"/>
        <bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER" prompt="CON_CONTRACT_LEASE_ITEM_V.CONTRACT_NUMBER"/>
        <bm:field name="contract_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_ID_N" prompt="CON_CONTRACT_LEASE_ITEM_V.CONTRACT_ID_N"/>
        <bm:field name="lease_item_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LEASE_ITEM_ID" prompt="CON_CONTRACT_LEASE_ITEM_V.LEASE_ITEM_ID"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="CON_CONTRACT_LEASE_ITEM_V.ENABLED_FLAG"/>
        <bm:field name="price" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PRICE" prompt="CON_CONTRACT_LEASE_ITEM_V.PRICE"/>
        <bm:field name="lease_item_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_ITEM_ID_N" prompt="CON_CONTRACT_LEASE_ITEM_V.LEASE_ITEM_ID_N"/>
        <bm:field name="color_of_apprearance" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLOR_OF_APPREARANCE" prompt="CON_CONTRACT_LEASE_ITEM_V.COLOR_OF_APPREARANCE"/>
        <bm:field name="quantity" databaseType="NUMBER" datatype="java.lang.Long" physicalName="QUANTITY" prompt="CON_CONTRACT_LEASE_ITEM_V.QUANTITY"/>
        <bm:field name="brand" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BRAND" prompt="CON_CONTRACT_LEASE_ITEM_V.BRAND"/>
        <bm:field name="brand_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BRAND_ID" prompt="CON_CONTRACT_LEASE_ITEM_V.BRAND_ID"/>
        <bm:field name="brand_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BRAND_ID_N" prompt="CON_CONTRACT_LEASE_ITEM_V.BRAND_ID_N"/>
        <bm:field name="model_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="MODEL_ID" prompt="CON_CONTRACT_LEASE_ITEM_V.MODEL_ID"/>
        <bm:field name="model_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="MODEL_ID_N" prompt="CON_CONTRACT_LEASE_ITEM_V.MODEL_ID_N"/>
        <bm:field name="series_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SERIES_ID" prompt="CON_CONTRACT_LEASE_ITEM_V.SERIES_ID"/>
        <bm:field name="series_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SERIES_ID_N" prompt="CON_CONTRACT_LEASE_ITEM_V.SERIES_ID_N"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="CON_CONTRACT_LEASE_ITEM_V.DESCRIPTION"/>
        <bm:field name="invoice_price" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INVOICE_PRICE" prompt="CON_CONTRACT_LEASE_ITEM_V.INVOICE_PRICE"/>
        <bm:field name="guide_price" databaseType="NUMBER" datatype="java.lang.Long" physicalName="GUIDE_PRICE" prompt="CON_CONTRACT_LEASE_ITEM_V.GUIDE_PRICE"/>
        <bm:field name="purchase_tax" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PURCHASE_TAX" prompt="CON_CONTRACT_LEASE_ITEM_V.PURCHASE_TAX"/>
        <bm:field name="insurance_price" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INSURANCE_PRICE" prompt="CON_CONTRACT_LEASE_ITEM_V.INSURANCE_PRICE"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:query-fields>
        <bm:query-field name="contract_id" queryExpression="t1.contract_id=${@contract_id}"/>
        <bm:query-field name="change_req_contract_id" queryExpression="t1.contract_id=(nvl((select t.to_pk_id   from hls_document_history_ref t  where t.table_name = &apos;CON_CONTRACT&apos;  and t.from_pk_id=${@change_req_contract_id}),${@nomal_contract_contract_id}))"/>
    </bm:query-fields>
</bm:model>
