<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: hp  
    $Date: 2014-11-10 下午12:55:15  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="INS_INSURANCE_POLICY">
    <bm:fields>
        <bm:field name="policy_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="POLICY_ID" prompt="INS_INSURANCE_POLICY.POLICY_ID"/>
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="INS_INSURANCE_POLICY.CONTRACT_ID"/>
        <bm:field name="policy_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="POLICY_NUMBER" prompt="INS_INSURANCE_POLICY.POLICY_NUMBER"/>
        <bm:field name="valid_from" databaseType="DATE" datatype="java.util.Date" physicalName="VALID_FROM" prompt="INS_INSURANCE_POLICY.VALID_FROM"/>
        <bm:field name="valid_to" databaseType="DATE" datatype="java.util.Date" physicalName="VALID_TO" prompt="INS_INSURANCE_POLICY.VALID_TO"/>
        <bm:field name="insured_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSURED_FLAG" prompt="INS_INSURANCE_POLICY.INSURED_FLAG"/>
        <bm:field name="endorsement_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENDORSEMENT_DESC" prompt="INS_INSURANCE_POLICY.ENDORSEMENT_DESC"/>
        <bm:field name="surrender_date" databaseType="DATE" datatype="java.util.Date" physicalName="SURRENDER_DATE" prompt="INS_INSURANCE_POLICY.SURRENDER_DATE"/>
        <bm:field name="surrender_value" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SURRENDER_VALUE" prompt="INS_INSURANCE_POLICY.SURRENDER_VALUE"/>
        <bm:field name="surrender_account" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SURRENDER_ACCOUNT" prompt="INS_INSURANCE_POLICY.SURRENDER_ACCOUNT"/>
        <bm:field name="note" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NOTE" prompt="INS_INSURANCE_POLICY.NOTE"/>
        <bm:field name="last_update_login" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LAST_UPDATE_LOGIN" prompt="INS_INSURANCE_POLICY.LAST_UPDATE_LOGIN"/>
        <bm:field name="item_detail_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ITEM_DETAIL_ID" prompt="INS_INSURANCE_POLICY.ITEM_DETAIL_ID"/>
        <bm:field name="insurance_bp_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSURANCE_BP_CODE" prompt="INS_INSURANCE_POLICY.INSURANCE_BP_CODE"/>
        <bm:field name="insurance_bp_code_n" expression="(SELECT h.bp_name  FROM hls_bp_master h WHERE h.bp_type = &apos;INSURER&apos; AND h.bp_category = &apos;INSURER&apos; AND h.bp_code = t1.insurance_bp_code)"/>
        <bm:field name="insure_date" databaseType="DATE" datatype="java.util.Date" physicalName="INSURE_DATE" prompt="INS_INSURANCE_POLICY.INSURE_DATE"/>
        <bm:field name="compulsory_insurance_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPULSORY_INSURANCE_AMOUNT" prompt="INS_INSURANCE_POLICY.COMPULSORY_INSURANCE_AMOUNT"/>
        <bm:field name="commercial_insurance_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMMERCIAL_INSURANCE_AMOUNT" prompt="INS_INSURANCE_POLICY.COMMERCIAL_INSURANCE_AMOUNT"/>
        <bm:field name="damage_insurance_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DAMAGE_INSURANCE_FLAG" prompt="INS_INSURANCE_POLICY.DAMAGE_INSURANCE_FLAG"/>
        <bm:field name="third_party_insurance_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="THIRD_PARTY_INSURANCE_FLAG" prompt="INS_INSURANCE_POLICY.THIRD_PARTY_INSURANCE_FLAG"/>
        <bm:field name="third_party_insurance_note" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="THIRD_PARTY_INSURANCE_NOTE" prompt="INS_INSURANCE_POLICY.THIRD_PARTY_INSURANCE_NOTE"/>
        <bm:field name="pilfer_insurance_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PILFER_INSURANCE_FLAG" prompt="INS_INSURANCE_POLICY.PILFER_INSURANCE_FLAG"/>
        <bm:field name="basic_non_deductible_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BASIC_NON_DEDUCTIBLE_FLAG" prompt="INS_INSURANCE_POLICY.BASIC_NON_DEDUCTIBLE_FLAG"/>
        <bm:field name="glass_insurance_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="GLASS_INSURANCE_FLAG" prompt="INS_INSURANCE_POLICY.GLASS_INSURANCE_FLAG"/>
        <bm:field name="seat_insurance_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SEAT_INSURANCE_FLAG" prompt="INS_INSURANCE_POLICY.SEAT_INSURANCE_FLAG"/>
        <bm:field name="combustion_insurance_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COMBUSTION_INSURANCE_FLAG" prompt="INS_INSURANCE_POLICY.COMBUSTION_INSURANCE_FLAG"/>
        <bm:field name="add_non_deductible_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ADD_NON_DEDUCTIBLE_FLAG" prompt="INS_INSURANCE_POLICY.ADD_NON_DEDUCTIBLE_FLAG"/>
        <bm:field name="compulsory_rebate_rate" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPULSORY_REBATE_RATE" prompt="INS_INSURANCE_POLICY.COMPULSORY_REBATE_RATE"/>
        <bm:field name="combustion_rebate_rate" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMBUSTION_REBATE_RATE" prompt="INS_INSURANCE_POLICY.COMBUSTION_REBATE_RATE"/>
        <bm:field name="compulsory_rebate" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPULSORY_REBATE" prompt="INS_INSURANCE_POLICY.COMPULSORY_REBATE"/>
        <bm:field name="combustion_rebate" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMBUSTION_REBATE" prompt="INS_INSURANCE_POLICY.COMBUSTION_REBATE"/>
        <bm:field name="insure_place" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSURE_PLACE" prompt="INS_INSURANCE_POLICY.INSURE_PLACE"/>
        <bm:field name="policy_holder" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="POLICY_HOLDER" prompt="INS_INSURANCE_POLICY.POLICY_HOLDER"/>
        <bm:field name="first_beneficiary" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FIRST_BENEFICIARY" prompt="INS_INSURANCE_POLICY.FIRST_BENEFICIARY"/>
        <bm:field name="insurance_party" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSURANCE_PARTY" prompt="INS_INSURANCE_POLICY.INSURANCE_PARTY"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="INS_INSURANCE_POLICY.ENABLED_FLAG"/>
        <bm:field name="insurance_year"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="policy_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field field="policy_id" queryOperator="="/>
        <bm:query-field field="contract_id" queryOperator="="/>
    </bm:query-fields>
</bm:model>