<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: xiaobo  
    $Date: 2012-11-26 上午11:41:58  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="PSR_REPORT_FIELDS" defaultOrderBy="line_number">
    <bm:fields>
        <bm:field name="report_field_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REPORT_FIELD_ID" prompt="PSR_REPORT_FIELDS.REPORT_FIELD_ID"/>
        <bm:field name="line_number" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LINE_NUMBER" prompt="PSR_REPORT_FIELDS.LINE_NUMBER"/>
        <bm:field name="report_header_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REPORT_HEADER_ID" prompt="PSR_REPORT_FIELDS.REPORT_HEADER_ID"/>
        <bm:field name="table_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TABLE_NAME" prompt="PSR_REPORT_FIELDS.TABLE_NAME"/>
        <bm:field name="field_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FIELD_NAME" prompt="PSR_REPORT_FIELDS.FIELD_NAME"/>
        <bm:field name="field_description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FIELD_DESCRIPTION" prompt="PSR_REPORT_FIELDS.FIELD_DESCRIPTION"/>
        <bm:field name="field_description_dis" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="field_description_dis" prompt="PSR_REPORT_FIELDS.field_description_dis"/>
        <bm:field name="field_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FIELD_TYPE" prompt="PSR_REPORT_FIELDS.FIELD_TYPE"/>
        <bm:field name="field_size" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FIELD_SIZE" prompt="PSR_REPORT_FIELDS.FIELD_SIZE"/>
        <bm:field name="field_decimal" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FIELD_DECIMAL" prompt="PSR_REPORT_FIELDS.FIELD_DECIMAL"/>
        <bm:field name="field_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FIELD_CATEGORY" prompt="PSR_REPORT_FIELDS.FIELD_CATEGORY"/>
        <bm:field name="statistics_type" databaseType="VARCHAR2" datatype="java.lang.String" lookupCode="PSR_STATISTICS_TYPE_CODE" lookupField="statistics_type_dis" physicalName="STATISTICS_TYPE" prompt="PSR_REPORT_FIELDS.STATISTICS_TYPE"/>
        <bm:field name="statistics_type_dis" forInsert="false" forUpdate="false"/>
        <bm:field name="subtotal_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="subtotal_type" prompt="PSR_REPORT_FIELDS.SUBTOTAL_TYPE"/>
        <bm:field name="aggregate_function_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="AGGREGATE_FUNCTION_FLAG" prompt="PSR_REPORT_FIELDS.AGGREGATE_FUNCTION_FLAG"/>
        <bm:field name="header_style" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="HEADER_STYLE" prompt="PSR_REPORT_FIELDS.HEADER_STYLE"/>
        <bm:field name="header_style_name" expression="(case when t1.header_style is not null then &apos;已设置&apos; else &apos;&apos; end)" forInsert="false" forUpdate="false"/>
        <bm:field name="cell_style" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CELL_STYLE" prompt="PSR_REPORT_FIELDS.CELL_STYLE"/>
        <bm:field name="cell_style_name" expression="(case when t1.cell_style is not null then &apos;已设置&apos; else &apos;&apos; end)" forInsert="false" forUpdate="false"/>
        <bm:field name="footnote_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FOOTNOTE_TYPE" prompt="PSR_REPORT_FIELDS.FOOTNOTE_TYPE"/>
        <bm:field name="footnote_content" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FOOTNOTE_CONTENT" prompt="PSR_REPORT_FIELDS.FOOTNOTE_CONTENT"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="report_field_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field name="report_header_id" queryExpression="t1.report_header_id = ${/parameter/@report_header_id}"/>
        <bm:query-field name="field_category" queryExpression="t1.field_category = ${/parameter/@field_category}"/>
    </bm:query-fields>
</bm:model>
