<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: WangYu  
    $Date: 2014-4-23 上午10:43:08  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="CWL_SALEMAN_DEFINE" needAccessControl="fales">
    <bm:fields>
        <bm:field name="sale_conselor_id" databaseType="NUMBER" datatype="java.lang.Long" forInsert="true" insertExpression="exp_employees_s.nextval" physicalName="SALE_CONSELOR_ID" prompt="CWL_SALEMAN_DEFINE.SALE_CONSELOR_ID"/>
        <bm:field name="unit_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="UNIT_ID" prompt="CWL_SALEMAN_DEFINE.UNIT_ID"/>
        <bm:field name="unit_name" expression="(select DESCRIPTION from exp_org_unit_vl t where t.unit_id = t1.unit_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="saleman_code" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="SALEMAN_CODE" prompt="代码"/>
        <bm:field name="identified_card" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="IDENTIFIED_CARD" prompt="身份证号"/>
        <bm:field name="saleman_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forInsert="true" forQuery="true" physicalName="SALEMAN_NAME" prompt="名称"/>
        <bm:field name="enable_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLE_FLAG" prompt="CWL_SALEMAN_DEFINE.ENABLE_FLAG"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:query-fields>
        <bm:query-field field="saleman_code" queryOperator="="/>
        <bm:query-field field="saleman_name" queryOperator="like"/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="t1.enable_flag = &apos;Y&apos;"/>
    </bm:data-filters>
    <bm:primary-key>
        <bm:pk-field name="sale_conselor_id"/>
    </bm:primary-key>
</bm:model>