<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: hp  
    $Date: 2013-10-14 下午04:17:42  
    $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_ST_BORR" defaultOrderBy="order_seq">
    <bm:fields>
        <bm:field name="record_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RECORD_ID" prompt="PRJ_FSN_ST_BORR.RECORD_ID"/>
        <bm:field name="fin_statement_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FIN_STATEMENT_ID" prompt="PRJ_FSN_ST_BORR.FIN_STATEMENT_ID"/>
        <bm:field name="config_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONFIG_ID" prompt="PRJ_FSN_ST_BORR.CONFIG_ID"/>
        <bm:field name="fsn_item" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FSN_ITEM" prompt="PRJ_FSN_ST_BORR.FSN_ITEM"/>
        <bm:field name="item_detail" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ITEM_DETAIL" prompt="PRJ_FSN_ST_BORR.ITEM_DETAIL"/>
        <bm:field name="item_detail_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ITEM_DETAIL_DESC" prompt="PRJ_FSN_ST_BORR.ITEM_DETAIL_DESC"/>
        <bm:field name="order_seq" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ORDER_SEQ" prompt="PRJ_FSN_ST_BORR.ORDER_SEQ"/>
        <bm:field name="current_borrowed" databaseType="NUMBER" datatype="java.lang.Double" physicalName="CURRENT_BORROWED"/>
        <bm:field name="current_borrowed_total" databaseType="VARCHAR2" datatype="java.lang.String" expression="to_char((SELECT sum(t.current_borrowed) FROM PRJ_FSN_ST_BORR t  where t.fin_statement_id = t1.fin_statement_id),&apos;FM99,999,999,990.00&apos;)" forInsert="false" forUpdate="false"/>
        <bm:field name="current_payback" databaseType="NUMBER" datatype="java.lang.Double" physicalName="CURRENT_PAYBACK"/>
        <bm:field name="current_payback_total" databaseType="VARCHAR2" datatype="java.lang.String" expression="to_char((SELECT sum(t.current_payback) FROM PRJ_FSN_ST_BORR t  where t.fin_statement_id = t1.fin_statement_id),&apos;FM99,999,999,990.00&apos;)" forInsert="false" forUpdate="false"/>
        <bm:field name="loan_term" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LOAN_TERM"/>
        <bm:field name="loan_method" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LOAN_METHOD"/>
        <bm:field name="balance" databaseType="NUMBER" datatype="java.lang.Double" physicalName="BALANCE" prompt="PRJ_FSN_ST_BORR.BALANCE"/>
        <bm:field name="balance_total" databaseType="VARCHAR2" datatype="java.lang.String" expression="to_char((SELECT sum(t.balance) FROM PRJ_FSN_ST_BORR t  where t.fin_statement_id = t1.fin_statement_id),&apos;FM99,999,999,990.00&apos;)" forInsert="false" forUpdate="false"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="PRJ_FSN_ST_BORR.DESCRIPTION"/>
    </bm:fields>
    <bm:features>
        <o:sequence-pk/>
        <f:standard-who/>
    </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>
