<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:o="leaf.database.local.oracle" xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="CSH_EBANK">
    <bm:fields>
        <bm:field name="ebank_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="EBANK_ID" prompt="CSH_EBANK.EBANK_ID"/>
        <bm:field name="ebank_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EBANK_CODE" prompt="CSH_EBANK.EBANK_CODE"/>
        <bm:field name="ebank_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EBANK_NAME" prompt="CSH_EBANK.EBANK_NAME"/>
        <bm:field name="ebank_province_city" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EBANK_PROVINCE_CITY" prompt="CSH_EBANK.EBANK_PROVINCE_CITY"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="CSH_EBANK.ENABLED_FLAG"/>
        <bm:field name="ebank_type_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="EBANK_TYPE_ID"/>
        <bm:field name="ebank_type_n" expression="(select             t.bank_short_name       from csh_bank_v t where t.bank_id = t1.ebank_type_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="ebank_spd_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EBANK_SPD_FLAG"/>
        <bm:field name="withhold_way" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="WITHHOLD_WAY" prompt="代扣方式"/>
        <bm:field name="seq_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SEQ_NUM" prompt="序号"/>
    </bm:fields>
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
               select 
               t1.*,
               (select t.bank_short_name from csh_bank_v t where t.bank_id = t1.ebank_type_id) ebank_type_n
               from csh_ebank t1 order by seq_num
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:features>
        <f:standard-who/>
        <o:sequence-pk/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="ebank_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field field="ebank_code" queryExpression="t1.ebank_code like &apos;%&apos; || ${@ebank_code} || &apos;%&apos;"/>
        <bm:query-field field="ebank_name" queryExpression="t1.ebank_name like &apos;%&apos; || ${@ebank_name} || &apos;%&apos;"/>
        <bm:query-field field="enabled_flag" queryOperator="="/>
    </bm:query-fields>
</bm:model>
