<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: hp  
    $Date: 2014-11-25 下午2:12:34  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="INS_PRJ_INSURANCE_POLICY_LV" needAccessControl="false">
    <bm:fields>
        <bm:field name="project_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROJECT_NUMBER" prompt="INS_PRJ_INSURANCE_POLICY_LV.PROJECT_NUMBER"/>
        <bm:field name="project_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PROJECT_ID" prompt="INS_PRJ_INSURANCE_POLICY_LV.PROJECT_ID"/>
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="INS_PRJ_INSURANCE_POLICY_LV.CONTRACT_ID"/>
        <bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER" prompt="INS_PRJ_INSURANCE_POLICY_LV.CONTRACT_NUMBER"/>
        <bm:field name="policy_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="POLICY_ID" prompt="INS_PRJ_INSURANCE_POLICY_LV.POLICY_ID"/>
        <bm:field name="policy_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="POLICY_NUMBER" prompt="INS_PRJ_INSURANCE_POLICY_LV.POLICY_NUMBER"/>
        <bm:field name="valid_from" expression="to_char(t1.valid_from,&apos;yyyy-mm-dd&apos;)" physicalName="VALID_FROM" prompt="INS_PRJ_INSURANCE_POLICY_LV.VALID_FROM"/>
        <bm:field name="valid_to" expression="to_char(t1.valid_to,&apos;yyyy-mm-dd&apos;)" physicalName="VALID_TO" prompt="INS_PRJ_INSURANCE_POLICY_LV.VALID_TO"/>
        <bm:field name="insured_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSURED_FLAG" prompt="INS_PRJ_INSURANCE_POLICY_LV.INSURED_FLAG"/>
        <bm:field name="insured_flag_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSURED_FLAG_N" prompt="INS_PRJ_INSURANCE_POLICY_LV.INSURED_FLAG_N"/>
        <bm:field name="endorsement_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENDORSEMENT_DESC" prompt="INS_PRJ_INSURANCE_POLICY_LV.ENDORSEMENT_DESC"/>
        <bm:field name="surrender_date" databaseType="DATE" datatype="java.util.Date" physicalName="SURRENDER_DATE" prompt="INS_PRJ_INSURANCE_POLICY_LV.SURRENDER_DATE"/>
        <bm:field name="surrender_value" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SURRENDER_VALUE" prompt="INS_PRJ_INSURANCE_POLICY_LV.SURRENDER_VALUE"/>
        <bm:field name="surrender_account" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SURRENDER_ACCOUNT" prompt="INS_PRJ_INSURANCE_POLICY_LV.SURRENDER_ACCOUNT"/>
        <bm:field name="surrender_account_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SURRENDER_ACCOUNT_N" prompt="INS_PRJ_INSURANCE_POLICY_LV.SURRENDER_ACCOUNT_N"/>
        <bm:field name="note" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NOTE" prompt="INS_PRJ_INSURANCE_POLICY_LV.NOTE"/>
        <bm:field name="insurance_year" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSURANCE_YEAR" prompt="INS_PRJ_INSURANCE_POLICY_LV.INSURANCE_YEAR"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="INS_PRJ_INSURANCE_POLICY_LV.ENABLED_FLAG"/>
        <bm:field name="insure_date" databaseType="DATE" datatype="java.util.Date" physicalName="INSURE_DATE" prompt="INS_PRJ_INSURANCE_POLICY_LV.INSURE_DATE"/>
        <bm:field name="compulsory_insurance_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPULSORY_INSURANCE_AMOUNT" prompt="INS_PRJ_INSURANCE_POLICY_LV.COMPULSORY_INSURANCE_AMOUNT"/>
        <bm:field name="commercial_insurance_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMMERCIAL_INSURANCE_AMOUNT" prompt="INS_PRJ_INSURANCE_POLICY_LV.COMMERCIAL_INSURANCE_AMOUNT"/>
        <bm:field name="damage_insurance_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DAMAGE_INSURANCE_FLAG" prompt="INS_PRJ_INSURANCE_POLICY_LV.DAMAGE_INSURANCE_FLAG"/>
        <bm:field name="third_party_insurance_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="THIRD_PARTY_INSURANCE_FLAG" prompt="INS_PRJ_INSURANCE_POLICY_LV.THIRD_PARTY_INSURANCE_FLAG"/>
        <bm:field name="third_party_insurance_note" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="THIRD_PARTY_INSURANCE_NOTE" prompt="INS_PRJ_INSURANCE_POLICY_LV.THIRD_PARTY_INSURANCE_NOTE"/>
        <bm:field name="pilfer_insurance_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PILFER_INSURANCE_FLAG" prompt="INS_PRJ_INSURANCE_POLICY_LV.PILFER_INSURANCE_FLAG"/>
        <bm:field name="basic_non_deductible_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BASIC_NON_DEDUCTIBLE_FLAG" prompt="INS_PRJ_INSURANCE_POLICY_LV.BASIC_NON_DEDUCTIBLE_FLAG"/>
        <bm:field name="glass_insurance_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="GLASS_INSURANCE_FLAG" prompt="INS_PRJ_INSURANCE_POLICY_LV.GLASS_INSURANCE_FLAG"/>
        <bm:field name="seat_insurance_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SEAT_INSURANCE_FLAG" prompt="INS_PRJ_INSURANCE_POLICY_LV.SEAT_INSURANCE_FLAG"/>
        <bm:field name="combustion_insurance_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COMBUSTION_INSURANCE_FLAG" prompt="INS_PRJ_INSURANCE_POLICY_LV.COMBUSTION_INSURANCE_FLAG"/>
        <bm:field name="add_non_deductible_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ADD_NON_DEDUCTIBLE_FLAG" prompt="INS_PRJ_INSURANCE_POLICY_LV.ADD_NON_DEDUCTIBLE_FLAG"/>
        <bm:field name="compulsory_rebate_rate" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPULSORY_REBATE_RATE" prompt="INS_PRJ_INSURANCE_POLICY_LV.COMPULSORY_REBATE_RATE"/>
        <bm:field name="combustion_rebate_rate" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMBUSTION_REBATE_RATE" prompt="INS_PRJ_INSURANCE_POLICY_LV.COMBUSTION_REBATE_RATE"/>
        <bm:field name="compulsory_rebate" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPULSORY_REBATE" prompt="INS_PRJ_INSURANCE_POLICY_LV.COMPULSORY_REBATE"/>
        <bm:field name="combustion_rebate" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMBUSTION_REBATE" prompt="INS_PRJ_INSURANCE_POLICY_LV.COMBUSTION_REBATE"/>
        <bm:field name="insure_place" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSURE_PLACE" prompt="INS_PRJ_INSURANCE_POLICY_LV.INSURE_PLACE"/>
        <bm:field name="policy_holder" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="POLICY_HOLDER" prompt="INS_PRJ_INSURANCE_POLICY_LV.POLICY_HOLDER"/>
        <bm:field name="first_beneficiary" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FIRST_BENEFICIARY" prompt="INS_PRJ_INSURANCE_POLICY_LV.FIRST_BENEFICIARY"/>
        <bm:field name="first_beneficiary_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FIRST_BENEFICIARY_N" prompt="INS_PRJ_INSURANCE_POLICY_LV.FIRST_BENEFICIARY_N"/>
        <bm:field name="insurance_party" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSURANCE_PARTY" prompt="INS_PRJ_INSURANCE_POLICY_LV.INSURANCE_PARTY"/>
        <bm:field name="insurance_bp_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSURANCE_BP_CODE" prompt="INS_PRJ_INSURANCE_POLICY_LV.INSURANCE_BP_CODE"/>
        <bm:field name="insurance_auto_fee" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INSURANCE_AUTO_FEE" prompt="INS_PRJ_INSURANCE_POLICY_LV.INSURANCE_AUTO_FEE"/>
        <bm:field name="insurance_purchase_pattern" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSURANCE_PURCHASE_PATTERN" prompt="INS_PRJ_INSURANCE_POLICY_LV.INSURANCE_PURCHASE_PATTERN"/>
        <bm:field name="insurance_purchase_pattern_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSURANCE_PURCHASE_PATTERN_N" prompt="INS_PRJ_INSURANCE_POLICY_LV.INSURANCE_PURCHASE_PATTERN_N"/>
        <bm:field name="insurance_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSURANCE_TYPE" prompt="INS_PRJ_INSURANCE_POLICY_LV.INSURANCE_TYPE"/>
        <bm:field name="insurance_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSURANCE_TYPE_N" prompt="INS_PRJ_INSURANCE_POLICY_LV.INSURANCE_TYPE_N"/>
        <bm:field name="insurance_bp_code_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INSURANCE_BP_CODE_N" prompt="INS_PRJ_INSURANCE_POLICY_LV.INSURANCE_BP_CODE_N"/>
        <bm:field name="bp_id_tenant" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID_TENANT" prompt="INS_PRJ_INSURANCE_POLICY_LV.BP_ID_TENANT"/>
        <bm:field name="bp_id_tenant_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_ID_TENANT_N" prompt="INS_PRJ_INSURANCE_POLICY_LV.BP_ID_TENANT_N"/>
        <bm:field name="engine_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENGINE_NUMBER" prompt="INS_PRJ_INSURANCE_POLICY_LV.ENGINE_NUMBER"/>
        <bm:field name="machine_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="MACHINE_NUMBER" prompt="INS_PRJ_INSURANCE_POLICY_LV.MACHINE_NUMBER"/>
        <bm:field name="pattern" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PATTERN" prompt="INS_PRJ_INSURANCE_POLICY_LV.PATTERN"/>
        <bm:field name="project_lease_item_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PROJECT_LEASE_ITEM_ID" prompt="INS_PRJ_INSURANCE_POLICY_LV.PROJECT_LEASE_ITEM_ID"/>
        <bm:field name="specification"/>
        <bm:field name="division" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DIVISION" prompt="INS_PRJ_INSURANCE_POLICY_LV.DIVISION"/>
        <bm:field name="lessor_name"/>
        <bm:field name="lessor_id"/>
        <bm:field name="bp_id_insure_n"/>
        <bm:field name="bp_id_machine_n"/>
        <bm:field name="lessor_id_n"/>
        <bm:field name="insurance_fee" expression="to_char(nvl(t1.insurance_fee, 0), &apos;FM999,999,999,990.00&apos;)"/>
        <bm:field name="price" expression="to_char(nvl(t1.price, 0), &apos;FM999,999,999,990.00&apos;)"/>
        <bm:field name="single_price" expression="to_char(nvl(t1.single_price, 0), &apos;FM999,999,999,990.00&apos;)"/>
        <bm:field name="cus_pay_insurance_amount" expression="to_char(nvl(t1.cus_pay_insurance_amount, 0), &apos;FM999,999,999,990.00&apos;)"/>
        <bm:field name="cusfl_pay_insurance_amount" expression="to_char(nvl(t1.cusfl_pay_insurance_amount, 0), &apos;FM999,999,999,990.00&apos;)"/>
        <bm:field name="cuntom_pay_insurance_amount" expression="to_char(nvl(t1.cuntom_pay_insurance_amount, 0), &apos;FM999,999,999,990.00&apos;)"/>
        <bm:field name="insurance_rate" expression="to_char(nvl(t1.insurance_rate*100, 0), &apos;FM999,999,999,990.000&apos;)"/>
        <bm:field name="bp_id_tenant_ci_phone"/>
        <bm:field name="bp_id_tenant_ci_name"/>
        <bm:field name="lease_times"/>
        <bm:field name="quantity"/>
        <bm:field name="serial_number"/>
        <bm:field name="full_name"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:query-fields>
        <!-- <bm:query-field field="project_lease_item_id" queryOperator="="/> -->
        <bm:query-field name="project_lease_item_id" queryExpression="(${@project_lease_item_id} is null or (t1.project_lease_item_id=${@project_lease_item_id}))"/>
        <bm:query-field field="project_id" queryOperator="="/>
        <bm:query-field field="policy_id" queryOperator="="/>
        <!-- <bm:query-field name="policy_id" queryOperator="${@policy_id} is null or (t1.policy_id=${@policy_id}))"/> -->
        <bm:query-field name="contract_id" queryExpression="(${@contract_id} is null or (t1.contract_id=${@contract_id}))"/>
    </bm:query-fields>
</bm:model>
