<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: qwm  
    $Date: 2013-12-14 下午4:31:15  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:o="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="HLS_PRICE_LIST_ASSIGN" defaultOrderBy="price_list">
    <bm:fields>
        <bm:field name="assign_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ASSIGN_ID" prompt="HLS_PRICE_LIST_ASSIGN.ASSIGN_ID"/>
        <bm:field name="price_list" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PRICE_LIST" prompt="HLS_PRICE_LIST_ASSIGN.PRICE_LIST"/>
        <bm:field name="price_list_desc" expression="(select l.description from hls_price_list l where l.price_list=t1.price_list)" forInsert="false" forUpdate="false" prompt="价目表描述"/>
        <bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="HLS_PRICE_LIST_ASSIGN.COMPANY_ID"/>
        <bm:field name="lease_organization" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_ORGANIZATION" prompt="HLS_PRICE_LIST_ASSIGN.LEASE_ORGANIZATION"/>
        <bm:field name="company_short_name" expression="(select t.company_short_name from fnd_companies_vl t where t.company_id=t1.company_id)" forInsert="false" forUpdate="false" prompt="FND_COMPANIES.COMPANY_NAME"/>
        <bm:field name="lease_organization_desc" expression="(select t.description from hls_lease_organization t where t.lease_organization=t1.lease_organization)" forInsert="false" forUpdate="false" prompt="HLS.LEASE_ORGANIZATION_NAME"/>
        <bm:field name="lease_channel" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_CHANNEL" prompt="HLS_PRICE_LIST_ASSIGN.LEASE_CHANNEL"/>
        <bm:field name="division" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DIVISION" prompt="HLS_PRICE_LIST_ASSIGN.DIVISION"/>
        <bm:field name="business_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BUSINESS_TYPE" prompt="HLS_PRICE_LIST_ASSIGN.BUSINESS_TYPE"/>
        <bm:field name="document_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_TYPE" prompt="HLS_PRICE_LIST_ASSIGN.DOCUMENT_TYPE"/>
        <bm:field name="user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="USER_ID" prompt="HLS_PRICE_LIST_ASSIGN.USER_ID"/>
        <bm:field name="priority" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PRIORITY" prompt="HLS_PRICE_LIST_ASSIGN.PRIORITY"/>
        <bm:field name="order_seq" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ORDER_SEQ" prompt="HLS_PRICE_LIST_ASSIGN.ORDER_SEQ"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="HLS_PRICE_LIST_ASSIGN.ENABLED_FLAG"/>
        <bm:field name="ref_v01" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V01" prompt="HLS_PRICE_LIST_ASSIGN.REF_V01"/>
        <bm:field name="ref_v02" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V02" prompt="HLS_PRICE_LIST_ASSIGN.REF_V02"/>
        <bm:field name="ref_v03" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V03" prompt="HLS_PRICE_LIST_ASSIGN.REF_V03"/>
        <bm:field name="ref_v04" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V04" prompt="HLS_PRICE_LIST_ASSIGN.REF_V04"/>
        <bm:field name="ref_v05" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V05" prompt="HLS_PRICE_LIST_ASSIGN.REF_V05"/>
        <bm:field name="ref_n01" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N01" prompt="HLS_PRICE_LIST_ASSIGN.REF_N01"/>
        <bm:field name="ref_n02" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N02" prompt="HLS_PRICE_LIST_ASSIGN.REF_N02"/>
        <bm:field name="ref_n03" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N03" prompt="HLS_PRICE_LIST_ASSIGN.REF_N03"/>
        <bm:field name="ref_n04" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N04" prompt="HLS_PRICE_LIST_ASSIGN.REF_N04"/>
        <bm:field name="ref_n05" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N05" prompt="HLS_PRICE_LIST_ASSIGN.REF_N05"/>
        <bm:field name="ref_d01" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D01" prompt="HLS_PRICE_LIST_ASSIGN.REF_D01"/>
        <bm:field name="ref_d02" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D02" prompt="HLS_PRICE_LIST_ASSIGN.REF_D02"/>
        <bm:field name="ref_d03" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D03" prompt="HLS_PRICE_LIST_ASSIGN.REF_D03"/>
        <bm:field name="ref_d04" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D04" prompt="HLS_PRICE_LIST_ASSIGN.REF_D04"/>
        <bm:field name="ref_d05" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D05" prompt="HLS_PRICE_LIST_ASSIGN.REF_D05"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
        <o:sequence-pk/>
    </bm:features>
    <bm:operations>
        <bm:operation name="delete">
            <bm:update-sql><![CDATA[
            begin
				delete from hls_price_list_assign h where h.price_list=${@price_list} and h.company_id=${@company_id} ;
			end;
            ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
    <bm:primary-key>
        <bm:pk-field name="assign_id"/>
    </bm:primary-key>
</bm:model>
