<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: hp  
    $Date: 2013-9-18 上午11:16:50  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="FND_SCORE_TEMPLATE">
    <bm:fields>
        <bm:field name="score_template_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SCORE_TEMPLATE_ID" prompt="FND_SCORE_TEMPLATE.SCORE_TEMPLATE_ID"/>
        <bm:field name="score_template_code" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="SCORE_TEMPLATE_CODE" prompt="FND_SCORE_TEMPLATE.SCORE_TEMPLATE_CODE"/>
        <bm:field name="score_template_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="SCORE_TEMPLATE_NAME" prompt="FND_SCORE_TEMPLATE.SCORE_TEMPLATE_NAME"/>
        <bm:field name="target_type_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TARGET_TYPE_CODE" prompt="FND_SCORE_TEMPLATE.TARGET_TYPE_CODE"/>
        <bm:field name="total_score_value" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TOTAL_SCORE_VALUE" prompt="FND_SCORE_TEMPLATE.TOTAL_SCORE_VALUE"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="FND_SCORE_TEMPLATE.ENABLED_FLAG"/>
        <bm:field name="score_method" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SCORE_METHOD" prompt="FND_SCORE_TEMPLATE.SCORE_METHOD"/>
        <bm:field name="template_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TEMPLATE_TYPE" prompt="FND_SCORE_TEMPLATE.TEMPLATE_TYPE"/>
        <bm:field name="template_type_desc" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select v.code_value_name from sys_code_values_v v where v.code_value=t1.template_type and v.code=&apos;FND_SC_TEMPLATE_TYPE&apos;)" forInsert="false" forUpdate="false"/>
        <!-- <bm:field name="sc_scaleplate_id" databaseType="NUMBER" datatype="java.lang." forInsert="false" forUpdate="false"   expression="(select te.sc_scaleplate_id from fnd_sc_scaleplate te where te.template_type=t1.template_type)"  /> -->
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="score_template_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field field="score_template_code" queryOperator="like"/>
        <bm:query-field field="score_template_name" queryOperator="like"/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="t1.enabled_flag=&apos;Y&apos;"/>
    </bm:data-filters>
</bm:model>
