<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: qwm 
    $Date: 2013-4-12 上午10:34:20  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="HLS_BP_MASTER_ADDRESS_V">
    <bm:fields>
        <bm:field name="address_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ADDRESS_ID" prompt="HLS_BP_MASTER_ADDRESS.ADDRESS_ID"/>
        <bm:field name="address_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ADDRESS_TYPE" prompt="HLS_BP_MASTER_ADDRESS.ADDRESS_TYPE"/>
        <bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID" prompt="HLS_BP_MASTER_ADDRESS.BP_ID"/>
        <bm:field name="country_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COUNTRY_ID" prompt="HLS_BP_MASTER_ADDRESS.COUNTRY"/>
        <bm:field name="province_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PROVINCE_ID" prompt="HLS_BP_MASTER_ADDRESS.PROVINCE"/>
        <bm:field name="city_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CITY_ID" prompt="HLS_BP_MASTER_ADDRESS.CITY"/>
        <bm:field name="district_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DISTRICT_ID" prompt="HLS_BP_MASTER_ADDRESS.DISTRICT"/>
        <bm:field name="street" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="STREET" prompt="HLS_BP_MASTER_ADDRESS.STREET"/>
        <bm:field name="address" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ADDRESS" prompt="HLS_BP_MASTER_ADDRESS.ADDRESS"/>
        <bm:field name="zipcode" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ZIPCODE" prompt="HLS_BP_MASTER_ADDRESS.ZIPCODE"/>
        <bm:field name="contact_person" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTACT_PERSON" prompt="HLS_BP_MASTER_ADDRESS.CONTACT_PERSON"/>
        <bm:field name="position" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="POSITION" prompt="HLS_BP_MASTER_ADDRESS.POSITION"/>
        <bm:field name="phone" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PHONE" prompt="HLS_BP_MASTER_ADDRESS.PHONE"/>
        <bm:field name="phone_extra" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PHONE_EXTRA" prompt="HLS_BP_MASTER_ADDRESS.PHONE_EXTRA"/>
        <bm:field name="fax" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FAX" prompt="HLS_BP_MASTER_ADDRESS.FAX"/>
        <bm:field name="cell_phone" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CELL_PHONE" prompt="HLS_BP_MASTER_ADDRESS.CELL_PHONE"/>
        <bm:field name="email" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EMAIL" prompt="HLS_BP_MASTER_ADDRESS.EMAIL"/>
        <bm:field name="contact_person_text" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTACT_PERSON_TEXT" prompt="HLS_BP_MASTER_ADDRESS.CONTACT_PERSON_TEXT"/>
        <bm:field name="contact_person_2" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTACT_PERSON_2" prompt="HLS_BP_MASTER_ADDRESS.CONTACT_PERSON_2"/>
        <bm:field name="position_2" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="POSITION_2" prompt="HLS_BP_MASTER_ADDRESS.POSITION_2"/>
        <bm:field name="phone_2" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PHONE_2" prompt="HLS_BP_MASTER_ADDRESS.PHONE_2"/>
        <bm:field name="phone_extra_2" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PHONE_EXTRA_2" prompt="HLS_BP_MASTER_ADDRESS.PHONE_EXTRA_2"/>
        <bm:field name="fax_2" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FAX_2" prompt="HLS_BP_MASTER_ADDRESS.FAX_2"/>
        <bm:field name="cell_phone_2" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CELL_PHONE_2" prompt="HLS_BP_MASTER_ADDRESS.CELL_PHONE_2"/>
        <bm:field name="email_2" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EMAIL_2" prompt="HLS_BP_MASTER_ADDRESS.EMAIL_2"/>
        <bm:field name="contact_person_text_2" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTACT_PERSON_TEXT_2" prompt="HLS_BP_MASTER_ADDRESS.CONTACT_PERSON_TEXT_2"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="HLS.ENABLED_FLAG"/>
        <bm:field name="ref_v01" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V01" prompt="HLS_BP_MASTER_ADDRESS.REF_V01"/>
        <bm:field name="ref_v02" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V02" prompt="HLS_BP_MASTER_ADDRESS.REF_V02"/>
        <bm:field name="ref_v03" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V03" prompt="HLS_BP_MASTER_ADDRESS.REF_V03"/>
        <bm:field name="ref_v04" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V04" prompt="HLS_BP_MASTER_ADDRESS.REF_V04"/>
        <bm:field name="ref_v05" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V05" prompt="HLS_BP_MASTER_ADDRESS.REF_V05"/>
        <bm:field name="ref_n01" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N01" prompt="HLS_BP_MASTER_ADDRESS.REF_N01"/>
        <bm:field name="ref_n02" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N02" prompt="HLS_BP_MASTER_ADDRESS.REF_N02"/>
        <bm:field name="ref_n03" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N03" prompt="HLS_BP_MASTER_ADDRESS.REF_N03"/>
        <bm:field name="ref_n04" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N04" prompt="HLS_BP_MASTER_ADDRESS.REF_N04"/>
        <bm:field name="ref_n05" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N05" prompt="HLS_BP_MASTER_ADDRESS.REF_N05"/>
        <bm:field name="ref_d01" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D01" prompt="HLS_BP_MASTER_ADDRESS.REF_D01"/>
        <bm:field name="ref_d02" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D02" prompt="HLS_BP_MASTER_ADDRESS.REF_D02"/>
        <bm:field name="ref_d03" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D03" prompt="HLS_BP_MASTER_ADDRESS.REF_D03"/>
        <bm:field name="ref_d04" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D04" prompt="HLS_BP_MASTER_ADDRESS.REF_D04"/>
        <bm:field name="ref_d05" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D05" prompt="HLS_BP_MASTER_ADDRESS.REF_D05"/>
        <bm:field name="address_type_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ADDRESS_TYPE_NAME" prompt="HLS_BP_MASTER_ADDRESS_V.ADDRESS_TYPE_NAME"/>
        <bm:field name="country_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COUNTRY_NAME" prompt="HLS_BP_MASTER_ADDRESS_V.COUNTRY_NAME"/>
        <bm:field name="province_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROVINCE_NAME" prompt="HLS_BP_MASTER_ADDRESS_V.PROVINCE_NAME"/>
        <bm:field name="city_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CITY_NAME" prompt="HLS_BP_MASTER_ADDRESS_V.CITY_NAME"/>
        <bm:field name="district_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DISTRICT_NAME" prompt="HLS_BP_MASTER_ADDRESS_V.DISTRICT_NAME"/>
        <bm:field name="default_address" expression=" decode(t1.province_name,t1.city_name,t1.province_name,t1.province_name||t1.city_name)||t1.district_name||t1.street||t1.address" forInsert="false" forUpdate="false"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <!-- <bm:query-fields>
        <bm:query-field field="address_id" queryOperator="="/>
        <bm:query-field field="bp_id" queryOperator="="/>
        <bm:query-field field="address_type" queryOperator="="/>
    </bm:query-fields> -->
</bm:model>
