<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Aurora Generator  
    $Date: Mon Jan 21 11:35:56 CST 2019  
    $Revision: 1.0  
    $Purpose: 
-->

<bm:model xmlns:o="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="ICBC_JOBS_HISTORY" needAccessControl="false">

    <bm:fields>
        <bm:field name="history_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="HISTORY_ID"
                  prompt="ICBC_JOBS_HISTORY.HISTORY_ID"/>
        <bm:field name="status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="STATUS"
                  prompt="ICBC_JOBS_HISTORY.STATUS"/>
        <bm:field name="error_msg" databaseType="CLOB" datatype="java.lang.String" physicalName="ERROR_MSG"
                  prompt="ICBC_JOBS_HISTORY.ERROR_MSG"/>
        <bm:field name="execution_date" />
    </bm:fields>
    <bm:features>
        <f:standard-who/>
        <o:sequence-pk/>
    </bm:features>
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
    			select
                    *
                from
                (select
                    t.*，
                    t.creation_date EXECUTION_DATE
                from
                    ICBC_JOBS_HISTORY t)
                    order by creation_date desc
    		]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:primary-key>
        <bm:pk-field name="history_id"/>
    </bm:primary-key>
</bm:model>