<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="CSH_TRX_BATCH_INTERFACE" defaultOrderBy="transaction_date desc,batch_id desc">
    <bm:fields>
        <bm:field name="batch_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BATCH_ID" prompt="CSH_TRX_BATCH_INTERFACE.BATCH_ID"/>
        <bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="CSH_TRX_BATCH_INTERFACE.COMPANY_ID"/>
        <bm:field name="file_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_NAME" prompt="CSH_TRX_BATCH_INTERFACE.FILE_NAME"/>
        <bm:field name="batch_class" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BATCH_CLASS" prompt="CSH_TRX_BATCH_INTERFACE.BATCH_CLASS"/>
        <bm:field name="batch_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BATCH_STATUS" prompt="CSH_TRX_BATCH_INTERFACE.BATCH_STATUS"/>
        <bm:field name="transaction_date" databaseType="DATE" datatype="java.util.Date" physicalName="TRANSACTION_DATE" prompt="CSH_TRX_BATCH_INTERFACE.TRANSACTION_DATE"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="CSH_TRX_BATCH_INTERFACE.DESCRIPTION"/>
        <bm:field name="bank_account_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BANK_ACCOUNT_ID" prompt="CSH_TRX_BATCH_INTERFACE.BANK_ACCOUNT_ID"/>
        <bm:field name="bank_account_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_ACCOUNT_NUM" prompt="CSH_TRX_BATCH_INTERFACE.BANK_ACCOUNT_NUM"/>
        <bm:field name="bank_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BANK_ID" prompt="CSH_TRX_BATCH_INTERFACE.BANK_ID"/>
        <bm:field name="currency_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CURRENCY_CODE" prompt="CSH_TRX_BATCH_INTERFACE.CURRENCY_CODE"/>
        <bm:field name="created_by_n" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select su.description from sys_user su where su.user_id = t1.created_by)" forInsert="false" forUpdate="false"/>
    </bm:fields>
    <bm:primary-key>
        <bm:pk-field name="batch_id"/>
    </bm:primary-key>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:query-fields>
        <bm:query-field field="batch_id" queryOperator="="/>
        <bm:query-field field="transaction_date" queryOperator="="/>
        <bm:query-field field="batch_status" queryOperator="="/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="t1.company_id = ${/session/@company_id}"/>
        <bm:data-filter enforceOperations="query" expression="t1.batch_class = &apos;TT&apos;"/>
    </bm:data-filters>
</bm:model>
