<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: chenlingfeng  
    $Date: 2013-4-15 下午01:13:07  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:s="leaf.plugin.script" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="HN_CHANCE_BP_V">
    <bm:fields>
        <bm:field name="chance_bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CHANCE_BP_ID" prompt="HN_CHANCE_BP_V.CHANCE_BP_ID"/>
        <bm:field name="chance_bp_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="CHANCE_BP_NAME" prompt="客户名称"/>
        <bm:field name="hn_industry_classification" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="HN_INDUSTRY_CLASSIFICATION" prompt="HN_CHANCE_BP_V.HN_INDUSTRY_CLASSIFICATION"/>
        <bm:field name="hn_industry_classification_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="HN_INDUSTRY_CLASSIFICATION_N" prompt="HN_CHANCE_BP_V.HN_INDUSTRY_CLASSIFICATION_N"/>
        <bm:field name="binary_classification" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BINARY_CLASSIFICATION" prompt="HN_CHANCE_BP_V.BINARY_CLASSIFICATION"/>
        <bm:field name="binary_classification_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BINARY_CLASSIFICATION_N" prompt="HN_CHANCE_BP_V.BINARY_CLASSIFICATION_N"/>
        <bm:field name="orgcrdno" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ORGCRDNO" prompt="HN_CHANCE_BP_V.ORGCRDNO"/>
        <bm:field name="unit_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="UNIT_ID" prompt="HN_CHANCE_BP_V.UNIT_ID"/>
        <bm:field name="contact_person" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTACT_PERSON" prompt="HN_CHANCE_BP_V.CONTACT_PERSON"/>
        <bm:field name="cell_phone" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CELL_PHONE" prompt="HN_CHANCE_BP_V.CELL_PHONE"/>
        <bm:field name="owner_user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="OWNER_USER_ID" prompt="HN_CHANCE_BP_V.OWNER_USER_ID"/>
        <bm:field name="id_card_no" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ID_CARD_NO" prompt="HN_CHANCE_BP_V.ID_CARD_NO"/>
        <bm:field name="bp_class" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CLASS" prompt="HN_CHANCE_BP_V.BP_CLASS"/>
        <bm:field name="bp_class_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_CLASS_N" prompt="HN_CHANCE_BP_V.BP_CLASS_N"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="HN_CHANCE_BP_V.ENABLED_FLAG"/>
        <bm:field name="chance_source" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CHANCE_SOURCE" prompt="HN_CHANCE_BP_V.CHANCE_SOURCE"/>
        <bm:field name="owner_user_id_n" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="OWNER_USER_ID_N" prompt="创建者"/>
        <bm:field name="creation_date_desc" databaseType="DATE" datatype="java.util.Date" physicalName="CREATION_DATE_DESC" prompt="HN_CHANCE_BP_V.CREATION_DATE_DESC"/>
        <bm:field name="unit_id_n" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" physicalName="UNIT_ID_N" prompt="业务部门"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
        <s:bm-script><![CDATA[
            var cx = Packages.leaf.javascript.Context.getCurrentContext();
            Packages.leaf.plugin.script.engine.ScriptImportor.defineExternScript(cx, this, $ctx.getData(), "aut_authority_bm_validate.js");
        ]]></s:bm-script>
    </bm:features>
    <bm:query-fields>
        <bm:query-field field="owner_user_id_n" queryOperator="like"/>
        <bm:query-field name="chance_bp_name" queryExpression="t1.chance_bp_name like ${@chance_bp_name}"/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter name="query" expression="(t1.enabled_flag=&apos;Y&apos;)"/>
    </bm:data-filters>
</bm:model>
