<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Feng  
    $Date: 2013-10-14 下午4:12:36  
    $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="FRS_REPORTS_LINES" defaultOrderBy="line_num">
    <bm:fields>
        <bm:field name="line_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LINE_ID" prompt="FRS_REPORTS_LINES.LINE_ID"/>
        <bm:field name="report_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REPORT_ID" prompt="FRS_REPORTS_LINES.REPORT_ID"/>
        <bm:field name="line_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LINE_NUM" prompt="FRS_REPORTS_LINES.LINE_NUM"/>
        <bm:field name="description_id" databaseType="NUMBER" datatype="java.lang.Long" multiLanguage="true" multiLanguageDescField="description" physicalName="DESCRIPTION_ID" prompt="FRS_REPORTS_LINES.DESCRIPTION_ID"/>
        <bm:field name="account_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ACCOUNT_ID" prompt="FRS_REPORTS_LINES.ACCOUNT_ID"/>
        <bm:field name="invisible_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVISIBLE_FLAG" prompt="FRS_REPORTS_LINES.INVISIBLE_FLAG"/>
        <bm:field name="currency_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CURRENCY_CODE" prompt="FRS_REPORTS_LINES.CURRENCY_CODE"/>
        <bm:field name="functional_balances_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FUNCTIONAL_BALANCES_FLAG" prompt="FRS_REPORTS_LINES.FUNCTIONAL_BALANCES_FLAG"/>
        <bm:field name="print_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PRINT_NUM" prompt="FRS_REPORTS_LINES.PRINT_NUM"/>
        <bm:field name="oppositional_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="OPPOSITIONAL_FLAG" prompt="FRS_REPORTS_LINES.OPPOSITIONAL_FLAG"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" forInsert="false" forUpdate="false" prompt="FRS_REPORTS_LINES.DESCRIPTION"/>
        <bm:field name="account_code" expression="(select account_code from gld_accounts_vl where account_id = t1.account_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="account_description" expression="(select description from gld_accounts_vl where account_id = t1.account_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="currency_name" expression="(select currency_name from gld_currency_vl where enabled_flag = &apos;Y&apos; and currency_code = t1.currency_code)" forInsert="false" forUpdate="false"/>
    </bm:fields>
    <bm:features>
        <f:multi-language-storage/>
        <f:standard-who/>
        <o:sequence-pk/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="line_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field field="report_id" queryOperator="="/>
    </bm:query-fields>
</bm:model>
