<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Feng  
    $Date: 2013-10-14 下午2:38:35  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="FRS_REPORTS_CONTROL">
    <bm:fields>
        <bm:field name="report_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REPORT_ID" prompt="FRS_REPORTS_CONTROL.REPORT_ID"/>
        <bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="FRS_REPORTS_CONTROL.COMPANY_ID"/>
        <bm:field name="role_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ROLE_ID" prompt="FRS_REPORTS_CONTROL.ROLE_ID"/>
        <bm:field name="company_code" expression="(select company_code from fnd_companies_vl where company_id = t1.company_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="role_code" expression="(select role_code from sys_role_vl where role_id = t1.role_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="company_name" expression="(select company_short_name from fnd_companies_vl where company_id = t1.company_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="role_name" expression="(select role_name from sys_role_vl where role_id = t1.role_id)" forInsert="false" forUpdate="false"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="company_id"/>
        <bm:pk-field name="report_id"/>
        <bm:pk-field name="role_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field field="report_id" queryOperator="="/>
    </bm:query-fields>
</bm:model>
