<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2013-11-20 下午01:25:12  
    $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_LV">
    <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_LV.CONTRACT_LEASE_ITEM_ID"/>
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="CON_CONTRACT_LEASE_ITEM_LV.CONTRACT_ID"/>
        <bm:field name="lease_item_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LEASE_ITEM_ID" prompt="CON_CONTRACT_LEASE_ITEM_LV.LEASE_ITEM_ID"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="CON_CONTRACT_LEASE_ITEM_LV.ENABLED_FLAG"/>
        <bm:field name="short_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SHORT_NAME" prompt="CON_CONTRACT_LEASE_ITEM_LV.SHORT_NAME"/>
        <bm:field name="lease_item_id_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_ITEM_ID_N" prompt="CON_CONTRACT_LEASE_ITEM_LV.LEASE_ITEM_ID_N"/>
        <bm:field name="serial_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SERIAL_NUMBER" prompt="CON_CONTRACT_LEASE_ITEM_LV.SERIAL_NUMBER"/>
        <bm:field name="pattern" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PATTERN" prompt="CON_CONTRACT_LEASE_ITEM_LV.PATTERN"/>
        <bm:field name="specification" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SPECIFICATION" prompt="CON_CONTRACT_LEASE_ITEM_LV.SPECIFICATION"/>
        <bm:field name="quantity" databaseType="NUMBER" datatype="java.lang.Long" physicalName="QUANTITY" prompt="CON_CONTRACT_LEASE_ITEM_LV.QUANTITY"/>
        <bm:field name="uom" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="UOM" prompt="CON_CONTRACT_LEASE_ITEM_LV.UOM"/>
        <bm:field name="currency" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CURRENCY" prompt="CON_CONTRACT_LEASE_ITEM_LV.CURRENCY"/>
        <bm:field name="currency_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CURRENCY_N" prompt="CON_CONTRACT_LEASE_ITEM_LV.CURRENCY_N"/>
        <bm:field name="price" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PRICE" prompt="CON_CONTRACT_LEASE_ITEM_LV.PRICE"/>
        <bm:field name="vender_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VENDER_NAME" prompt="CON_CONTRACT_LEASE_ITEM_LV.VENDER_NAME"/>
        <bm:field name="manufacturer_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="MANUFACTURER_NAME" prompt="CON_CONTRACT_LEASE_ITEM_LV.MANUFACTURER_NAME"/>
        <bm:field name="manufacturing_date" databaseType="NUMBER" datatype="java.lang.Long" physicalName="MANUFACTURING_DATE" prompt="CON_CONTRACT_LEASE_ITEM_LV.MANUFACTURING_DATE"/>
        <bm:field name="installation_site" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSTALLATION_SITE" prompt="CON_CONTRACT_LEASE_ITEM_LV.INSTALLATION_SITE"/>
        <bm:field name="fixed_assets_site" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FIXED_ASSETS_SITE" prompt="CON_CONTRACT_LEASE_ITEM_LV.FIXED_ASSETS_SITE"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="CON_CONTRACT_LEASE_ITEM_LV.DESCRIPTION"/>
        <bm:field name="lease_item_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LEASE_ITEM_AMOUNT" prompt="CON_CONTRACT_LEASE_ITEM_LV.LEASE_ITEM_AMOUNT"/>
        <bm:field name="ref_v01" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V01" prompt="CON_CONTRACT_LEASE_ITEM_LV.REF_V01"/>
        <bm:field name="ref_v02" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V02" prompt="CON_CONTRACT_LEASE_ITEM_LV.REF_V02"/>
        <bm:field name="ref_v03" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V03" prompt="CON_CONTRACT_LEASE_ITEM_LV.REF_V03"/>
        <bm:field name="ref_v04" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V04" prompt="CON_CONTRACT_LEASE_ITEM_LV.REF_V04"/>
        <bm:field name="ref_v05" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V05" prompt="CON_CONTRACT_LEASE_ITEM_LV.REF_V05"/>
        <bm:field name="ref_n01" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N01" prompt="CON_CONTRACT_LEASE_ITEM_LV.REF_N01"/>
        <bm:field name="ref_n02" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N02" prompt="CON_CONTRACT_LEASE_ITEM_LV.REF_N02"/>
        <bm:field name="ref_n03" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N03" prompt="CON_CONTRACT_LEASE_ITEM_LV.REF_N03"/>
        <bm:field name="ref_n04" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N04" prompt="CON_CONTRACT_LEASE_ITEM_LV.REF_N04"/>
        <bm:field name="ref_n05" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N05" prompt="CON_CONTRACT_LEASE_ITEM_LV.REF_N05"/>
        <bm:field name="ref_d01" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D01" prompt="CON_CONTRACT_LEASE_ITEM_LV.REF_D01"/>
        <bm:field name="ref_d02" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D02" prompt="CON_CONTRACT_LEASE_ITEM_LV.REF_D02"/>
        <bm:field name="ref_d03" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D03" prompt="CON_CONTRACT_LEASE_ITEM_LV.REF_D03"/>
        <bm:field name="ref_d04" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D04" prompt="CON_CONTRACT_LEASE_ITEM_LV.REF_D04"/>
        <bm:field name="ref_d05" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D05" prompt="CON_CONTRACT_LEASE_ITEM_LV.REF_D05"/>
    </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>
