<?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="CON_CONTINGENT_RENTAL_REQ" defaultOrderBy="contingent_number desc">
    <bm:fields>
        <bm:field name="req_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REQ_ID" prompt="CON_CONTINGENT_RENTAL_REQ.REQ_ID"/>
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="CON_CONTINGENT_RENTAL_REQ.CONTRACT_ID"/>
        <bm:field name="contingent_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTINGENT_NUMBER" prompt="CON_CONTINGENT_RENTAL_REQ.CONTINGENT_NUMBER"/>
        <bm:field name="due_date" databaseType="DATE" datatype="java.util.Date" physicalName="DUE_DATE" prompt="CON_CONTINGENT_RENTAL_REQ.DUE_DATE"/>
        <bm:field name="due_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DUE_AMOUNT" prompt="CON_CONTINGENT_RENTAL_REQ.DUE_AMOUNT"/>
        <bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BP_ID" prompt="CON_CONTINGENT_RENTAL_REQ.BP_ID"/>
        <bm:field name="comments" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COMMENTS" prompt="CON_CONTINGENT_RENTAL_REQ.COMMENTS"/>
        <bm:field name="approval_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="APPROVAL_STATUS" prompt="CON_CONTINGENT_RENTAL_REQ.APPROVAL_STATUS"/>
        <bm:field name="approval_date" databaseType="DATE" datatype="java.util.Date" physicalName="APPROVAL_DATE" prompt="CON_CONTINGENT_RENTAL_REQ.APPROVAL_DATE"/>
        <bm:field name="bp_name" expression="(select m.bp_name from hls_bp_master m where m.bp_id = t1.bp_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="approval_status_n" expression="(select v.code_value_name from sys_code_values_v v where v.code=&apos;CON_WFL_STATUS&apos; and v.code_value = t1.approval_status and v.code_enabled_flag = &apos;Y&apos; and v.code_value_enabled_flag=&apos;Y&apos;)" forInsert="false" forUpdate="false"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
        <o:sequence-pk/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="req_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field name="req_id" queryExpression="t1.req_id = ${@req_id}"/>
        <bm:query-field name="due_date" queryExpression="t1.due_date = to_date(${@due_date},&apos;yyyy-mm-dd&apos;)"/>
        <bm:query-field name="due_amount" queryExpression="t1.due_amount = ${@due_amount}"/>
        <bm:query-field name="bp_id" queryExpression="t1.bp_id = ${@bp_id}"/>
        <bm:query-field name="approval_status" queryExpression="t1.approval_status = ${@approval_status}"/>
        <bm:query-field name="contingent_number" queryExpression="t1.contingent_number like  &apos;%&apos; || ${@contingent_number} || &apos;%&apos;"/>
    </bm:query-fields>
</bm:model>
