<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: jack  
    $Date: 2014-11-17 下午7:35:26  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="AST_CAR_LICENSE">
    <bm:fields>
        <bm:field name="ast_car_license_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="AST_CAR_LICENSE_ID" prompt="AST_CAR_LICENSE.AST_CAR_LICENSE_ID"/>
        <bm:field name="item_detail_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ITEM_DETAIL_ID" prompt="AST_CAR_LICENSE.ITEM_DETAIL_ID"/>
        <bm:field name="license_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LICENSE_NUMBER" prompt="AST_CAR_LICENSE.LICENSE_NUMBER"/>
        <bm:field name="on_car_date" databaseType="DATE" datatype="java.util.Date" physicalName="ON_CAR_DATE" prompt="AST_CAR_LICENSE.ON_CAR_DATE"/>
        <bm:field name="license_fee" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LICENSE_FEE" prompt="AST_CAR_LICENSE.LICENSE_FEE"/>
        <bm:field name="license_attach_fee" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LICENSE_ATTACH_FEE" prompt="AST_CAR_LICENSE.LICENSE_ATTACH_FEE"/>
        <bm:field name="shh_license_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SHH_LICENSE_FLAG" prompt="AST_CAR_LICENSE.SHH_LICENSE_FLAG"/>
        <bm:field name="ref_v01" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V01" prompt="AST_CAR_LICENSE.REF_V01"/>
        <bm:field name="ref_v02" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V02" prompt="AST_CAR_LICENSE.REF_V02"/>
        <bm:field name="ref_v03" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V03" prompt="AST_CAR_LICENSE.REF_V03"/>
        <bm:field name="ref_v04" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V04" prompt="AST_CAR_LICENSE.REF_V04"/>
        <bm:field name="ref_v05" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V05" prompt="AST_CAR_LICENSE.REF_V05"/>
        <bm:field name="ref_n01" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N01" prompt="AST_CAR_LICENSE.REF_N01"/>
        <bm:field name="ref_n02" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N02" prompt="AST_CAR_LICENSE.REF_N02"/>
        <bm:field name="ref_n03" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N03" prompt="AST_CAR_LICENSE.REF_N03"/>
        <bm:field name="ref_n04" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N04" prompt="AST_CAR_LICENSE.REF_N04"/>
        <bm:field name="ref_n05" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N05" prompt="AST_CAR_LICENSE.REF_N05"/>
        <bm:field name="ref_d01" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D01" prompt="AST_CAR_LICENSE.REF_D01"/>
        <bm:field name="ref_d02" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D02" prompt="AST_CAR_LICENSE.REF_D02"/>
        <bm:field name="ref_d03" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D03" prompt="AST_CAR_LICENSE.REF_D03"/>
        <bm:field name="ref_d04" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D04" prompt="AST_CAR_LICENSE.REF_D04"/>
        <bm:field name="ref_d05" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D05" prompt="AST_CAR_LICENSE.REF_D05"/>
        <bm:field name="purchase_date" databaseType="DATE" datatype="java.util.Date" physicalName="PURCHASE_DATE" prompt="AST_CAR_LICENSE.PURCHASE_DATE"/>
        <bm:field name="purchase_price" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PURCHASE_PRICE" prompt="AST_CAR_LICENSE.PURCHASE_PRICE"/>
        <bm:field name="license_end_date" databaseType="DATE" datatype="java.util.Date" physicalName="LICENSE_END_DATE" prompt="AST_CAR_LICENSE.LICENSE_END_DATE"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="AST_CAR_LICENSE.ENABLED_FLAG"/>
        <bm:field name="mortgage_date" databaseType="DATE" datatype="java.util.Date" physicalName="MORTGAGE_DATE" prompt="AST_CAR_LICENSE.MORTGAGE_DATE"/>
        <bm:field name="license_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LICENSE_FLAG" prompt="AST_CAR_LICENSE.LICENSE_FLAG"/>
        <bm:field name="license_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LICENSE_TYPE" prompt="AST_CAR_LICENSE.LICENSE_TYPE"/>
        <bm:field name="mortgage_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="MORTGAGE_FLAG" prompt="AST_CAR_LICENSE.MORTGAGE_FLAG"/>
        <bm:field name="license_end_transfer_fee" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LICENSE_END_TRANSFER_FEE" prompt="AST_CAR_LICENSE.LICENSE_END_TRANSFER_FEE"/>
        <bm:field name="relieve_mortgage_date" databaseType="DATE" datatype="java.util.Date" physicalName="RELIEVE_MORTGAGE_DATE" prompt="AST_CAR_LICENSE.RELIEVE_MORTGAGE_DATE"/>
        <bm:field name="relieve_mortgage_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="RELIEVE_MORTGAGE_FLAG" prompt="AST_CAR_LICENSE.RELIEVE_MORTGAGE_FLAG"/>
        <bm:field name="mortgage_by" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="MORTGAGE_BY" prompt="AST_CAR_LICENSE.MORTGAGE_BY"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="ast_car_license_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field name="contract_id" queryExpression="t1.item_detail_id=(SELECT b.item_detail_id FROM con_contract_lease_item  a, con_contract_item_detail b WHERE a.contract_lease_item_id = b.contract_lease_item_id and a.contract_id=${@contract_id}) and t1.mortgage_flag=&apos;Y&apos;"/>
    </bm:query-fields>
</bm:model>
