<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Feng  
    $Date: 2013-10-25 上午9:46:06  
    $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_HEADERS_VL">
    <bm:fields>
        <bm:field name="report_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REPORT_ID" prompt="FRS_REPORTS_HEADERS_VL.REPORT_ID"/>
        <bm:field name="report_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="REPORT_NAME" prompt="报表编号"/>
        <bm:field name="report_description" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="REPORT_DESCRIPTION" prompt="报表名称"/>
        <bm:field name="amount_uom_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="AMOUNT_UOM_CODE" prompt="FRS_REPORTS_HEADERS_VL.AMOUNT_UOM_CODE"/>
        <bm:field name="format_mask_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FORMAT_MASK_CODE" prompt="FRS_REPORTS_HEADERS_VL.FORMAT_MASK_CODE"/>
        <bm:field name="set_of_books_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SET_OF_BOOKS_ID" prompt="FRS_REPORTS_HEADERS_VL.SET_OF_BOOKS_ID"/>
        <bm:field name="currency_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CURRENCY_CODE" prompt="FRS_REPORTS_HEADERS_VL.CURRENCY_CODE"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="FRS_REPORTS_HEADERS_VL.ENABLED_FLAG"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:query-fields>
        <bm:query-field field="report_name" queryOperator="like"/>
        <bm:query-field field="report_description" queryOperator="like"/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="exists (select 1 from FRS_REPORTS_CONTROL where company_id = ${/session/@company_id} and role_id = ${/session/@role_id} and report_id = t1.report_id)"/>
        <bm:data-filter enforceOperations="query" expression="t1.enabled_flag = &apos;Y&apos;"/>
    </bm:data-filters>
</bm:model>
