<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: wangguangfan2864  
    $Date: 2011-8-8 下午02:25:21  
    $Revision: 1.0  
    $Purpose: 首页提醒定义（分配角色） 
-->
<bm:model xmlns:e="leaf.service.exception" xmlns:ns2="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="HLS_SYS_HOMEPAGE_MSG_ROLE" needAccessControl="false">
    <bm:fields>
        <bm:field name="message_role_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="MESSAGE_ROLE_ID" prompt="HLS_SYS_HOMEPAGE_MSG_ROLE.MESSAGE_ROLE_ID"/>
        <bm:field name="message_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="MESSAGE_ID" prompt="HLS_SYS_HOMEPAGE_MSG_ROLE.MESSAGE_ID"/>
        <bm:field name="role_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ROLE_ID"/>
        <bm:field name="role_code" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select s.role_code from sys_role s where s.role_id = t1.role_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="role_name" databaseType="VARCHAR" datatype="java.lang.String" expression="(select fd.description_text from fnd_descriptions fd,sys_role s where s.role_id = t1.role_id and s.description_id = fd.description_id and fd.language=${/session/@lang})" forInsert="false" forUpdate="false" prompt="SYS_ROLE.ROLE_NAME"/>
        <bm:field name="start_date" databaseType="DATE" datatype="java.util.Date" physicalName="START_DATE" prompt="HLS_SYS_HOMEPAGE_MSG_ROLE.START_DATE"/>
        <bm:field name="end_date" databaseType="DATE" datatype="java.util.Date" physicalName="END_DATE" prompt="HLS_SYS_HOMEPAGE_MSG_ROLE.END_DATE"/>
    </bm:fields>
    <bm:primary-key>
        <bm:pk-field name="message_role_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field field="message_id" queryOperator="="/>
    </bm:query-fields>
    <bm:features>
        <ns2:sequence-pk/>
        <f:standard-who/>
        <f:multi-language-storage/>
    </bm:features>
</bm:model>
