<?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="RPT_REPORT_CONTROL">
    <bm:fields>
        <bm:field name="control_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTROL_ID" prompt="RPT_REPORT_CONTROL.CONTROL_ID"/>
        <bm:field name="status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="STATUS" prompt="RPT_REPORT_CONTROL.STATUS"/>
        <bm:field name="rpt_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RPT_ID" prompt="RPT_REPORT_CONTROL.RPT_ID"/>
        <bm:field name="check_user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CHECK_USER_ID" prompt="RPT_REPORT_CONTROL.CHECK_USER_ID"/>
        <bm:field name="check_role_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CHECK_ROLE_ID" prompt="RPT_REPORT_CONTROL.CHECK_ROLE_ID"/>
        <bm:field name="check_company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CHECK_COMPANY_ID" prompt="RPT_REPORT_CONTROL.CHECK_COMPANY_ID"/>
        <bm:field name="check_date" databaseType="DATE" datatype="java.util.Date" physicalName="CHECK_DATE" prompt="RPT_REPORT_CONTROL.CHECK_DATE"/>
        <bm:field name="check_period" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CHECK_PERIOD" prompt="RPT_REPORT_CONTROL.CHECK_PERIOD"/>
        <bm:field name="job_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="JOB_ID" prompt="RPT_REPORT_CONTROL.JOB_ID"/>
        <bm:field name="last_submit_date" databaseType="DATE" datatype="java.util.Date" physicalName="LAST_SUBMIT_DATE" prompt="RPT_REPORT_CONTROL.LAST_SUBMIT_DATE"/>
        <bm:field name="last_submit_user" expression="(select su.description from sys_user su where su.user_id = t1.last_updated_by)" forInsert="false" forUpdate="false"/>
        <bm:field name="calc_date" databaseType="DATE" datatype="java.util.Date" expression="sysdate" forInsert="false" forUpdate="false"/>
        <bm:field name="last_submit_date_str" expression="to_char(t1.last_submit_date,&apos;YYYY-MM-DD HH24:MI:SS&apos;)" forInsert="false" forUpdate="false"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="control_id"/>
    </bm:primary-key>
    <bm:data-filters>
        <bm:data-filter name="init_filter" enforceOperations="query" expression="t1.control_id = ${@control_id}"/>
    </bm:data-filters>
</bm:model>
