<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: ericyin  
    $Date: 2013-3-19 下午1:03:22  
    $Revision: 1.0  
    $Purpose: 
-->
<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="SYS_USER" needAccessControl="false">
    <bm:fields>
        <bm:field name="user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="USER_ID" prompt="SYS_USER.USER_ID"/>
        <bm:field name="user_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="USER_NAME" prompt="SYS_USER.USER_NAME"/>
        <bm:field name="encrypted_foundation_password" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENCRYPTED_FOUNDATION_PASSWORD" prompt="SYS_USER.ENCRYPTED_FOUNDATION_PASSWORD"/>
        <bm:field name="encrypted_user_password" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENCRYPTED_USER_PASSWORD" prompt="SYS_USER.ENCRYPTED_USER_PASSWORD"/>
        <bm:field name="start_date" databaseType="DATE" datatype="java.util.Date" physicalName="START_DATE" prompt="SYS_USER.START_DATE"/>
        <bm:field name="end_date" databaseType="DATE" datatype="java.util.Date" physicalName="END_DATE" prompt="SYS_USER.END_DATE"/>
        <bm:field name="last_logon_date" databaseType="DATE" datatype="java.util.Date" physicalName="LAST_LOGON_DATE" prompt="SYS_USER.LAST_LOGON_DATE"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="SYS_USER.DESCRIPTION"/>
        <bm:field name="password_lifespan_days" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PASSWORD_LIFESPAN_DAYS" prompt="SYS_USER.PASSWORD_LIFESPAN_DAYS"/>
        <bm:field name="password_lifespan_access" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PASSWORD_LIFESPAN_ACCESS" prompt="SYS_USER.PASSWORD_LIFESPAN_ACCESS"/>
        <bm:field name="employee_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="EMPLOYEE_ID" prompt="SYS_USER.EMPLOYEE_ID"/>
        <bm:field name="customer_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CUSTOMER_ID" prompt="SYS_USER.CUSTOMER_ID"/>
        <bm:field name="vender_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="VENDER_ID" prompt="SYS_USER.VENDER_ID"/>
        <bm:field name="frozen_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FROZEN_FLAG" prompt="SYS_USER.FROZEN_FLAG"/>
        <bm:field name="frozen_date" databaseType="DATE" datatype="java.util.Date" physicalName="FROZEN_DATE" prompt="SYS_USER.FROZEN_DATE"/>
        <bm:field name="password_start_date" databaseType="DATE" datatype="java.util.Date" physicalName="PASSWORD_START_DATE" prompt="SYS_USER.PASSWORD_START_DATE"/>
        <bm:field name="menu_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="MENU_TYPE" prompt="SYS_USER.MENU_TYPE"/>
    </bm:fields>
    <bm:features>
        <o:sequence-pk/>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="user_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field field="user_id" queryOperator="="/>
        <bm:query-field field="employee_id" queryOperator="="/>
        <bm:query-field name="user_enabled_flag" queryExpression="(${@user_enabled_flag}=&apos;Y&apos; and (nvl(t1.frozen_flag, &apos;N&apos;) = &apos;N&apos; and t1.start_date &lt; sysdate and (t1.end_date is null or sysdate &lt; t1.end_date)))"/>
    </bm:query-fields>
</bm:model>
