<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: qianming  
    $Date: 2015-9-3 下午3:19:06  
    $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_BP_TYPE_INPUT_AUTHORITY">
    <bm:fields>
        <bm:field name="authority_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="AUTHORITY_ID" prompt="HLS_BP_TYPE_INPUT_AUTHORITY.AUTHORITY_ID"/>
        <bm:field name="bp_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_TYPE" prompt="HLS_BP_TYPE_INPUT_AUTHORITY.BP_TYPE"/>
        <bm:field name="description" expression="(select description from hls_bp_type where bp_type = t1.bp_type)" forInsert="false" forUpdate="false"/>
        <bm:field name="role_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ROLE_ID" prompt="HLS_BP_TYPE_INPUT_AUTHORITY.ROLE_ID"/>
        <bm:field name="role_name" expression="(select role_name from sys_role_vl where role_id = t1.role_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="unit_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="UNIT_ID" prompt="HLS_BP_TYPE_INPUT_AUTHORITY.UNIT_ID"/>
        <bm:field name="unit_name" expression="(select unit_name from exp_org_unit_v where unit_id = t1.unit_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="position_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="POSITION_ID" prompt="HLS_BP_TYPE_INPUT_AUTHORITY.POSITION_ID"/>
        <bm:field name="position_name" expression="(select description from exp_org_position_vl where position_id = t1.position_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="USER_ID" prompt="HLS_BP_TYPE_INPUT_AUTHORITY.USER_ID"/>
        <bm:field name="user_name" expression="(select description from sys_user where user_id = t1.user_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="HLS_BP_TYPE_INPUT_AUTHORITY.ENABLED_FLAG"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
        <o:sequence-pk/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="authority_id"/>
    </bm:primary-key>
    <bm:data-filters>
        <bm:data-filter name="1" enforceOperations="query" expression="t1.bp_type = ${@bp_type}"/>
    </bm:data-filters>
</bm:model>
