<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Hongquan.Dai  
    $Date: 2018-1-31 下午8:59:35  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:e="leaf.service.exception" xmlns:o="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="csh_tenant_bank" needAccessControl="false">
    <bm:fields>
        <bm:field name="bank_id"/>
        <bm:field name="bank_code" displayWidth="210" forDisplay="true" forQuery="true" prompt="银行账号"/>
        <bm:field name="bank_short_name" displayWidth="210" forDisplay="true" forQuery="true" prompt="银行名称"/>
        <bm:field name="bank_type"/>
        <bm:field name="bank_type_name" forInsert="false" forUpdate="false"/>
        <bm:field name="bank_full_name"/>
        <bm:field name="zero_amounts_allowed"/>
        <bm:field name="enabled_flag"/>
    </bm:fields>
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
    			select t1.bank_id,
    			       t1.bank_code,
				       t1.bank_short_name,
				       t1.bank_type,
				       t1.bank_type_name,
				       t1.bank_full_name,
				       t1.zero_amounts_allowed,
				       t1.enabled_flag
				  from csh_tenant_bank_v t1
				  #WHERE_CLAUSE#
				 order by t1.bank_code
    		]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:features>
        <f:standard-who/>
        <o:sequence-pk/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="bank_id"/>
    </bm:primary-key>
    <e:exception-descriptor-config>
        <e:exception-descriptor exception="java.sql.SQLException" handleClass="leaf.database.SQLExceptionDescriptor">
            <e:error-message code="1" message="CSH101.ERROR.BANK_CODE_REPEATED"/>
        </e:exception-descriptor>
    </e:exception-descriptor-config>
</bm:model>
