<?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="T_TD_REPORT" defaultOrderBy="report_time desc" needAccessControl="false">
    <bm:fields>
        <bm:field name="id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ID" prompt="T_TD_REPORT.ID"/>
        <bm:field name="becr_id" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BECR_ID" prompt="T_TD_REPORT.BECR_ID"/>
        <bm:field name="report_path" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REPORT_PATH" prompt="T_TD_REPORT.REPORT_PATH"/>
        <bm:field name="report_time" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REPORT_TIME" prompt="T_TD_REPORT.REPORT_TIME"/>
        <bm:field name="report_id" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REPORT_ID" prompt="T_TD_REPORT.REPORT_ID"/>
        <bm:field name="bp_name" expression="(SELECT h.bp_name FROM hls_bp_master h WHERE h.bp_id = t1.becr_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="bp_category_n" expression="(SELECT bc.description FROM hls_bp_category bc WHERE bc.bp_category = (SELECT h.bp_category FROM hls_bp_master h WHERE h.bp_id = t1.becr_id))" forInsert="false" forUpdate="false"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field field="becr_id" queryOperator="="/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter enforceActions="query" expression="t1.becr_id = ${@bp_id}"/>
    </bm:data-filters>
</bm:model>
