<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
			SELECT l.request_id,
			       CASE request_type
			         WHEN 'MANNUAL' THEN
			          '<DIV style="color:#FF2610; ">' || l.log_content || '</DIV>'
			         ELSE
			          '<hr><details><summary>' || to_char(creation_date,
			                                              'yyyy-mm-dd hh24:mi:ss') || '【' || request_name || '】ID:【' || request_id ||
			          '】</summary>' || to_char(l.creation_date,
			                                   'yyyy-mm-dd hh24:mi:ss') || l.log_content || '</details>'
			       END log_content
			  FROM fnd_request_log l
              #WHERE_CLAUSE#
             ORDER BY l.log_id ASC
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:query-fields>
        <bm:query-field name="request_id" queryExpression="request_id = ${@request_id}"/>
    </bm:query-fields>
    <bm:fields>
        <bm:field name="request_id" databaseType="NUMBER" datatype="java.lang.Long"/>
        <bm:field name="log_content" databaseType="VARCHAR2" datatype="java.lang.String"/>
    </bm:fields>
</bm:model>
