<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: hp  
    $Date: 2013-10-12 下午01:44:13  
    $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="PRJ_FSN_OTHER_REC" defaultOrderBy="order_seq">
    <bm:fields>
        <bm:field name="record_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RECORD_ID" prompt="PRJ_FSN_OTHER_REC.RECORD_ID"/>
        <bm:field name="fin_statement_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FIN_STATEMENT_ID" prompt="PRJ_FSN_OTHER_REC.FIN_STATEMENT_ID"/>
        <bm:field name="config_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONFIG_ID" prompt="PRJ_FSN_OTHER_REC.CONFIG_ID"/>
        <bm:field name="fsn_item" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FSN_ITEM" prompt="PRJ_FSN_OTHER_REC.FSN_ITEM"/>
        <bm:field name="item_detail" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ITEM_DETAIL" prompt="PRJ_FSN_OTHER_REC.ITEM_DETAIL"/>
        <bm:field name="item_detail_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ITEM_DETAIL_DESC" prompt="PRJ_FSN_OTHER_REC.ITEM_DETAIL_DESC"/>
        <bm:field name="order_seq" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ORDER_SEQ"/>
        <bm:field name="related_flag" databaseType="CHAR" datatype="java.lang.String" lookupCode="PRJ509_RELATED_FLAG" lookupField="related_flag_desc" physicalName="RELATED_FLAG" prompt="PRJ_FSN_OTHER_REC.RELATED_FLAG"/>
        <bm:field name="related_flag_desc" databaseType="VARCHAR2" datatype="java.lang.String" forInsert="false" forUpdate="false"/>
        <bm:field name="aging_1year" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AGING_1YEAR" prompt="PRJ_FSN_OTHER_REC.AGING_1YEAR"/>
        <bm:field name="aging_1_2years" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AGING_1_2YEARS" prompt="PRJ_FSN_OTHER_REC.AGING_1_2YEARS"/>
        <bm:field name="aging_2_3years" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AGING_2_3YEARS" prompt="PRJ_FSN_OTHER_REC.AGING_2_3YEARS"/>
        <bm:field name="aging_3years" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AGING_3YEARS" prompt="PRJ_FSN_OTHER_REC.AGING_3YEARS"/>
        <bm:field name="balance" databaseType="NUMBER" datatype="java.lang.Double" physicalName="BALANCE" prompt="PRJ_FSN_OTHER_REC.BALANCE"/>
        <bm:field name="balance_total" expression="(sum(t1.balance) over(partition by fin_statement_id))" forInsert="false" forUpdate="false"/>
        <bm:field name="aging_1year_total" expression="(sum(t1.aging_1year) over(partition by fin_statement_id))" forInsert="false" forUpdate="false"/>
        <bm:field name="aging_1_2years_total" expression="(sum(t1.aging_1_2years) over(partition by fin_statement_id))" forInsert="false" forUpdate="false"/>
        <bm:field name="aging_2_3years_total" expression="(sum(t1.aging_2_3years) over(partition by fin_statement_id))" forInsert="false" forUpdate="false"/>
        <bm:field name="aging_3years_total" expression="(sum(t1.aging_3years) over(partition by fin_statement_id))" forInsert="false" forUpdate="false"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
        <o:sequence-pk/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="record_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field field="config_id" queryOperator="="/>
    </bm:query-fields>
</bm:model>
