<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:o="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="SDIC_FIN_PLAN_CLASS_AUT">
    <bm:fields>
        <bm:field name="aut_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="AUT_ID" prompt="SDIC_FIN_PLAN_CLASS_AUT.AUT_ID"/>
        <bm:field name="class_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CLASS_ID" prompt="SDIC_FIN_PLAN_CLASS_AUT.CLASS_ID"/>
        <bm:field name="item_code" expression="decode(t1.class_type,&apos;FIRST&apos;,(select fc.first_class_code from sdic_fin_plan_first_class fc where fc.first_class_id = t1.class_id and fc.enabled_flag = &apos;Y&apos;),&apos;SECOND&apos;,(select sc.second_class_code from sdic_fin_plan_second_class sc where sc.second_class_id = t1.class_id and sc.enabled_flag = &apos;Y&apos;),&apos;THIRD&apos;,(select tc.third_class_code from sdic_fin_plan_third_class tc where tc.third_class_id = t1.class_id and tc.enabled_flag = &apos;Y&apos;),&apos;FORTH&apos;,(select ffc.forth_class_code from sdic_fin_plan_forth_class ffc where ffc.forth_class_id = t1.class_id and ffc.enabled_flag = &apos;Y&apos;))" forInsert="false" forUpdate="false"/>
        <bm:field name="item_description" expression="decode(t1.class_type,&apos;FIRST&apos;,(select fc.first_class_name from sdic_fin_plan_first_class fc where fc.first_class_id = t1.class_id and fc.enabled_flag = &apos;Y&apos;),&apos;SECOND&apos;,(select sc.second_class_name from sdic_fin_plan_second_class sc where sc.second_class_id = t1.class_id and sc.enabled_flag = &apos;Y&apos;),&apos;THIRD&apos;,(select tc.third_class_name from sdic_fin_plan_third_class tc where tc.third_class_id = t1.class_id and tc.enabled_flag = &apos;Y&apos;),&apos;FORTH&apos;,(select ffc.forth_class_name from sdic_fin_plan_forth_class ffc where ffc.forth_class_id = t1.class_id and ffc.enabled_flag = &apos;Y&apos;))" forInsert="false" forUpdate="false"/>
        <bm:field name="class_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CLASS_TYPE" prompt="SDIC_FIN_PLAN_CLASS_AUT.CLASS_TYPE"/>
        <bm:field name="owner_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="OWNER_ID" prompt="SDIC_FIN_PLAN_CLASS_AUT.OWNER_ID"/>
        <bm:field name="user_desc" expression="(select su.description from sys_user su where su.user_id=t1.owner_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="unit_name" expression="(select fd.description_text from EXP_EMPLOYEE_ASSIGNS t, exp_org_position_vl  p, exp_org_unit         u, fnd_descriptions     fd, sys_user             su where t.primary_position_flag = &apos;Y&apos; and su.user_id = t1.owner_id and t.position_id = p.POSITION_ID and p.UNIT_ID = u.unit_id and u.description_id = fd.description_id and fd.language = &apos;ZHS&apos; and su.employee_id = t.employee_id)" forInsert="false" forUpdate="false"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
        <o:sequence-pk/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="aut_id"/>
    </bm:primary-key>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="(t1.class_id=${@class_id})"/>
        <bm:data-filter enforceOperations="query" expression="(t1.class_type=${@class_type})"/>
    </bm:data-filters>
</bm:model>
