<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Icon  
    $Date: 2014-12-1 上午10:19:04  
    $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="YONDA_FIN_INSTITUTE" defaultOrderBy="bank_code asc">
    <bm:fields>
        <bm:field name="record_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RECORD_ID" prompt="YONDA_FIN_INSTITUTE.RECORD_ID"/>
        <bm:field name="bank_code" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="BANK_CODE" prompt="金融机构代码"/>
        <bm:field name="bank_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="BANK_NAME" prompt="金融机构名称"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="YONDA_FIN_INSTITUTE.ENABLED_FLAG"/>
        <bm:field name="csh_bank_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CSH_BANK_ID" prompt="YONDA_FIN_INSTITUTE.CSH_BANK_ID"/>
        <bm:field name="bank_short_name" 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:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
    		select * from (
    			select t.record_id,t.bank_code,t.bank_name,t.enabled_flag,t.csh_bank_id,(select t2.bank_short_name from csh_bank t2 where t2.bank_id=t.csh_bank_id ) bank_short_name from YONDA_FIN_INSTITUTE t order by bank_code asc) t1 #WHERE_CLAUSE#
    		]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:query-fields>
        <bm:query-field field="bank_code" queryOperator="="/>
        <bm:query-field field="bank_name" queryOperator="like"/>
        <bm:query-field field="enabled_flag" queryOperator="="/>
    </bm:query-fields>
</bm:model>
