<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="CON_CONTRACT_LEASE_TEMP" defaultOrderBy="t1.con_contract_lease_temp_id" needAccessControl="false">
    <bm:fields>
        <bm:field name="con_contract_lease_temp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CON_CONTRACT_LEASE_TEMP_ID" prompt="CON_CONTRACT_LEASE_TEMP.CON_CONTRACT_LEASE_TEMP_ID"/>
        <bm:field name="batch_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BATCH_ID" prompt="CON_CONTRACT_LEASE_TEMP.BATCH_ID"/>
        <bm:field name="invoice_agent_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INVOICE_AGENT_ID" prompt="CON_CONTRACT_LEASE_TEMP.INVOICE_AGENT_ID"/>
        <bm:field name="invoice_agent_id_n" expression="(SELECT a.bp_name FROM hls_bp_master a WHERE a.bp_category = &apos;AGENT&apos; AND a.bp_id = t1.invoice_agent_id)"/>
        <bm:field name="lease_item_seq" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LEASE_ITEM_SEQ" prompt="CON_CONTRACT_LEASE_TEMP.LEASE_ITEM_SEQ"/>
        <bm:field name="treasury_date" databaseType="DATE" datatype="java.util.Date" physicalName="TREASURY_DATE" prompt="CON_CONTRACT_LEASE_TEMP.TREASURY_DATE"/>
        <bm:field name="lease_start_date" databaseType="DATE" datatype="java.util.Date" physicalName="LEASE_START_DATE" prompt="CON_CONTRACT_LEASE_TEMP.LEASE_START_DATE"/>
        <bm:field name="vehicle_storage_place" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VEHICLE_STORAGE_PLACE" prompt="CON_CONTRACT_LEASE_TEMP.VEHICLE_STORAGE_PLACE"/>
        <bm:field name="vehicle_storage_place_n" expression="(SELECT scv.code_value_name FROM sys_code_values_v scv WHERE scv.code = &apos;VEHICLE_STORAGE_PLACE&apos; AND scv.code_value = t1.vehicle_storage_place)"/>
        <bm:field name="vehicle_check" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VEHICLE_CHECK" prompt="CON_CONTRACT_LEASE_TEMP.VEHICLE_CHECK"/>
        <bm:field name="license_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LICENSE_FLAG" prompt="CON_CONTRACT_LEASE_TEMP.LICENSE_FLAG"/>
        <bm:field name="license_flag_n" expression="(SELECT scv.code_value_name FROM sys_code_values_v scv WHERE scv.code = &apos;YES_NO&apos; AND scv.code_value = t1.license_flag)"/>
        <bm:field name="mention_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="MENTION_FLAG" prompt="CON_CONTRACT_LEASE_TEMP.MENTION_FLAG"/>
        <bm:field name="mention_flag_n" expression="(SELECT scv.code_value_name FROM sys_code_values_v scv WHERE scv.code = &apos;YES_NO&apos; AND scv.code_value = t1.mention_flag)"/>
        <bm:field name="onway_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ONWAY_FLAG" prompt="CON_CONTRACT_LEASE_TEMP.ONWAY_FLAG"/>
        <bm:field name="onway_flag_n" expression="(SELECT scv.code_value_name FROM sys_code_values_v scv WHERE scv.code = &apos;YES_NO&apos; AND scv.code_value = t1.onway_flag)"/>
        <bm:field name="vehicle_license_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VEHICLE_LICENSE_FLAG" prompt="CON_CONTRACT_LEASE_TEMP.VEHICLE_LICENSE_FLAG"/>
        <bm:field name="vehicle_license_flag_n" expression="(SELECT scv.code_value_name FROM sys_code_values_v scv WHERE scv.code = &apos;YES_NO&apos; AND scv.code_value = t1.vehicle_license_flag)"/>
        <bm:field name="key_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="KEY_FLAG" prompt="CON_CONTRACT_LEASE_TEMP.KEY_FLAG"/>
        <bm:field name="key_flag_n" expression="(SELECT scv.code_value_name FROM sys_code_values_v scv WHERE scv.code = &apos;YES_NO&apos; AND scv.code_value = t1.key_flag)"/>
        <bm:field name="damage_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DAMAGE_FLAG" prompt="CON_CONTRACT_LEASE_TEMP.DAMAGE_FLAG"/>
        <bm:field name="damage_flag_n" expression="(SELECT scv.code_value_name FROM sys_code_values_v scv WHERE scv.code = &apos;YES_NO&apos; AND scv.code_value = t1.damage_flag)"/>
        <bm:field name="display_vehicles" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DISPLAY_VEHICLES" prompt="CON_CONTRACT_LEASE_TEMP.DISPLAY_VEHICLES"/>
        <bm:field name="vis_major" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VIS_MAJOR" prompt="CON_CONTRACT_LEASE_TEMP.VIS_MAJOR"/>
        <bm:field name="vis_major_n" expression="(SELECT scv.code_value_name FROM sys_code_values_v scv WHERE scv.code = &apos;VIS_MAJOR&apos; AND scv.code_value = t1.vis_major)"/>
        <bm:field name="mortgage_third_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="MORTGAGE_THIRD_FLAG" prompt="CON_CONTRACT_LEASE_TEMP.MORTGAGE_THIRD_FLAG"/>
        <bm:field name="mortgage_third_flag_n" expression="(SELECT scv.code_value_name FROM sys_code_values_v scv WHERE scv.code = &apos;YES_NO&apos; AND scv.code_value = t1.mortgage_third_flag)"/>
        <bm:field name="vehicle_others" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VEHICLE_OTHERS" prompt="CON_CONTRACT_LEASE_TEMP.VEHICLE_OTHERS"/>
        <bm:field name="invoice_date" databaseType="DATE" datatype="java.util.Date" physicalName="INVOICE_DATE" prompt="发票日期"/>
        <bm:field name="invoice_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_NUM" prompt="发票号码"/>
        <bm:field name="item_frame_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ITEM_FRAME_NUMBER" prompt="车架号"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="con_contract_lease_temp_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field name="batch_id" queryExpression="t1.batch_id=${@batch_id}"/>
    </bm:query-fields>
</bm:model>
