<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Icon  
    $Date: 2014-10-11 下午1:47:54  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:e="leaf.service.exception" xmlns:o="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="HLS_PLATE_LIMIT_DEFINE">
    <bm:fields>
        <bm:field name="plate_limit_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PLATE_LIMIT_ID" prompt="HLS_PLATE_LIMIT_DEFINE.PLATE_LIMIT_ID"/>
        <bm:field name="plate_limit_date_from" databaseType="DATE" datatype="java.util.Date" physicalName="PLATE_LIMIT_DATE_FROM" prompt="HLS_PLATE_LIMIT_DEFINE.PLATE_LIMIT_DATE_FROM"/>
        <bm:field name="plate_limit_date_to" databaseType="DATE" datatype="java.util.Date" physicalName="PLATE_LIMIT_DATE_TO" prompt="HLS_PLATE_LIMIT_DEFINE.PLATE_LIMIT_DATE_TO"/>
        <bm:field name="plate_limit" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PLATE_LIMIT" prompt="HLS_PLATE_LIMIT_DEFINE.PLATE_LIMIT"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="HLS_PLATE_LIMIT_DEFINE.DESCRIPTION"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
        <o:sequence-pk/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="plate_limit_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field name="date_from" datatype="java.util.Date" queryExpression="t1.plate_limit_date_from &gt;= ${@date_from}"/>
        <bm:query-field name="date_to" datatype="java.util.Date" queryExpression="t1.plate_limit_date_to &lt;= ${@date_to}"/>
        <bm:query-field name="price_from" queryExpression="t1.plate_limit &gt;= ${@price_from}"/>
        <bm:query-field name="price_to" queryExpression="t1.plate_limit &lt;= ${@price_to}"/>
    </bm:query-fields>
    <e:exception-descriptor-config>
        <e:exception-descriptor exception="java.sql.SQLException" handleClass="leaf.database.SQLExceptionDescriptor">
            <e:error-message code="1" message="牌照额度定义重复"/>
        </e:exception-descriptor>
    </e:exception-descriptor-config>
</bm:model>
