<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: wangwei  
    $Date: 2014-11-17 下午8:38:57  
    $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_INSURANCE">
    <bm:fields>
        <bm:field name="ast_car_insurance_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="AST_CAR_INSURANCE_ID" prompt="AST_CAR_INSURANCE.AST_CAR_INSURANCE_ID"/>
        <bm:field name="item_detail_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ITEM_DETAIL_ID" prompt="AST_CAR_INSURANCE.ITEM_DETAIL_ID"/>
        <bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID" prompt="AST_CAR_INSURANCE.BP_ID"/>
        <bm:field name="insurer_dis" expression="(select bp_name from hls_bp_master where bp_id = t1.bp_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="insurance_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSURANCE_NUMBER" prompt="AST_CAR_INSURANCE.INSURANCE_NUMBER"/>
        <bm:field name="insurance_description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSURANCE_DESCRIPTION" prompt="AST_CAR_INSURANCE.INSURANCE_DESCRIPTION"/>
        <bm:field name="insure_date" databaseType="DATE" datatype="java.util.Date" physicalName="INSURE_DATE" prompt="AST_CAR_INSURANCE.INSURE_DATE"/>
        <bm:field name="insurance_date_from" databaseType="DATE" datatype="java.util.Date" physicalName="INSURANCE_DATE_FROM" prompt="AST_CAR_INSURANCE.INSURANCE_DATE_FROM"/>
        <bm:field name="insurance_date_to" databaseType="DATE" datatype="java.util.Date" physicalName="INSURANCE_DATE_TO" prompt="AST_CAR_INSURANCE.INSURANCE_DATE_TO"/>
        <bm:field name="insurance_year" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INSURANCE_YEAR" prompt="AST_CAR_INSURANCE.INSURANCE_YEAR"/>
        <bm:field name="compulsory_insurance_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPULSORY_INSURANCE_AMOUNT" prompt="AST_CAR_INSURANCE.COMPULSORY_INSURANCE_AMOUNT"/>
        <bm:field name="commercial_insurance_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMMERCIAL_INSURANCE_AMOUNT" prompt="AST_CAR_INSURANCE.COMMERCIAL_INSURANCE_AMOUNT"/>
        <bm:field name="damage_insurance_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DAMAGE_INSURANCE_FLAG" prompt="AST_CAR_INSURANCE.DAMAGE_INSURANCE_FLAG"/>
        <bm:field name="third_party_insurance_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="THIRD_PARTY_INSURANCE_FLAG" prompt="AST_CAR_INSURANCE.THIRD_PARTY_INSURANCE_FLAG"/>
        <bm:field name="pilfer_insurance_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PILFER_INSURANCE_FLAG" prompt="AST_CAR_INSURANCE.PILFER_INSURANCE_FLAG"/>
        <bm:field name="basic_non_deductible_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BASIC_NON_DEDUCTIBLE_FLAG" prompt="AST_CAR_INSURANCE.BASIC_NON_DEDUCTIBLE_FLAG"/>
        <bm:field name="glass_insurance_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="GLASS_INSURANCE_FLAG" prompt="AST_CAR_INSURANCE.GLASS_INSURANCE_FLAG"/>
        <bm:field name="seat_insurance_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SEAT_INSURANCE_FLAG" prompt="AST_CAR_INSURANCE.SEAT_INSURANCE_FLAG"/>
        <bm:field name="combustion_insurance_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COMBUSTION_INSURANCE_FLAG" prompt="AST_CAR_INSURANCE.COMBUSTION_INSURANCE_FLAG"/>
        <bm:field name="add_non_deductible_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ADD_NON_DEDUCTIBLE_FLAG" prompt="AST_CAR_INSURANCE.ADD_NON_DEDUCTIBLE_FLAG"/>
        <bm:field name="ref_v01" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V01" prompt="AST_CAR_INSURANCE.REF_V01"/>
        <bm:field name="ref_v02" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V02" prompt="AST_CAR_INSURANCE.REF_V02"/>
        <bm:field name="ref_v03" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V03" prompt="AST_CAR_INSURANCE.REF_V03"/>
        <bm:field name="ref_v04" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V04" prompt="AST_CAR_INSURANCE.REF_V04"/>
        <bm:field name="ref_v05" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V05" prompt="AST_CAR_INSURANCE.REF_V05"/>
        <bm:field name="ref_n01" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N01" prompt="AST_CAR_INSURANCE.REF_N01"/>
        <bm:field name="ref_n02" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N02" prompt="AST_CAR_INSURANCE.REF_N02"/>
        <bm:field name="ref_n03" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N03" prompt="AST_CAR_INSURANCE.REF_N03"/>
        <bm:field name="ref_n04" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N04" prompt="AST_CAR_INSURANCE.REF_N04"/>
        <bm:field name="ref_n05" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N05" prompt="AST_CAR_INSURANCE.REF_N05"/>
        <bm:field name="ref_d01" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D01" prompt="AST_CAR_INSURANCE.REF_D01"/>
        <bm:field name="ref_d02" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D02" prompt="AST_CAR_INSURANCE.REF_D02"/>
        <bm:field name="ref_d03" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D03" prompt="AST_CAR_INSURANCE.REF_D03"/>
        <bm:field name="ref_d04" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D04" prompt="AST_CAR_INSURANCE.REF_D04"/>
        <bm:field name="ref_d05" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D05" prompt="AST_CAR_INSURANCE.REF_D05"/>
        <bm:field name="compulsory_rebate_rate" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPULSORY_REBATE_RATE" prompt="AST_CAR_INSURANCE.COMPULSORY_REBATE_RATE"/>
        <bm:field name="combustion_rebate_rate" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMBUSTION_REBATE_RATE" prompt="AST_CAR_INSURANCE.COMBUSTION_REBATE_RATE"/>
        <bm:field name="compulsory_rebate" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPULSORY_REBATE" prompt="AST_CAR_INSURANCE.COMPULSORY_REBATE"/>
        <bm:field name="combustion_rebate" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMBUSTION_REBATE" prompt="AST_CAR_INSURANCE.COMBUSTION_REBATE"/>
        <bm:field name="insure_place" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSURE_PLACE" prompt="AST_CAR_INSURANCE.INSURE_PLACE"/>
        <bm:field name="insure_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSURE_NAME" prompt="AST_CAR_INSURANCE.INSURE_NAME"/>
        <bm:field name="first_beneficiary" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FIRST_BENEFICIARY" prompt="AST_CAR_INSURANCE.FIRST_BENEFICIARY"/>
        <bm:field name="insurance_party" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSURANCE_PARTY" prompt="AST_CAR_INSURANCE.INSURANCE_PARTY"/>
        <bm:field name="damage_insurance_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DAMAGE_INSURANCE_AMOUNT" prompt="AST_CAR_INSURANCE.DAMAGE_INSURANCE_AMOUNT"/>
        <bm:field name="third_party_insurance_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="THIRD_PARTY_INSURANCE_AMOUNT" prompt="AST_CAR_INSURANCE.THIRD_PARTY_INSURANCE_AMOUNT"/>
        <bm:field name="basic_non_deductible_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BASIC_NON_DEDUCTIBLE_AMOUNT" prompt="AST_CAR_INSURANCE.BASIC_NON_DEDUCTIBLE_AMOUNT"/>
        <bm:field name="pilfer_insurance_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PILFER_INSURANCE_AMOUNT" prompt="AST_CAR_INSURANCE.PILFER_INSURANCE_AMOUNT"/>
        <bm:field name="commercial_insurance_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COMMERCIAL_INSURANCE_FLAG" prompt="AST_CAR_INSURANCE.COMMERCIAL_INSURANCE_FLAG"/>
        <bm:field name="document_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_STATUS" prompt="AST_CAR_INSURANCE.DOCUMENT_STATUS"/>
        <bm:field name="payment_finish_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PAYMENT_FINISH_FLAG" prompt="AST_CAR_INSURANCE.PAYMENT_FINISH_FLAG"/>
        <bm:field name="glass_insurance_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="GLASS_INSURANCE_AMOUNT" prompt="AST_CAR_INSURANCE.GLASS_INSURANCE_AMOUNT"/>
        <bm:field name="seat_insurance_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SEAT_INSURANCE_AMOUNT" prompt="AST_CAR_INSURANCE.SEAT_INSURANCE_AMOUNT"/>
        <bm:field name="combustion_insurance_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMBUSTION_INSURANCE_AMOUNT" prompt="AST_CAR_INSURANCE.COMBUSTION_INSURANCE_AMOUNT"/>
        <bm:field name="insurance_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSURANCE_TYPE" prompt="AST_CAR_INSURANCE.INSURANCE_TYPE"/>
        <bm:field name="document_status_des" expression="(select v.code_value_name from sys_code_values_v v where v.code=&apos;AST_INSURANCE_DOCUMENT_STATUS&apos; and t1.document_status=v.code_value)" forInsert="false"/>
        <bm:field name="insurance_type_des" expression="(select v.code_value_name from sys_code_values_v v where v.code=&apos;AST_INSURANCE_TYPE&apos; and t1.insurance_type=v.code_value)" forInsert="false"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="ast_car_insurance_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})"/>
    </bm:query-fields>
</bm:model>
