<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: DJ  
    $Date: 2013-5-28 下午1:42:34  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:e="leaf.service.exception" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="HLS_CREDIT_WRITE_OFF_ORDER">
    <bm:fields>
        <bm:field name="credit_item" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CREDIT_ITEM" prompt="HLS.CF_ITEM"/>
        <bm:field name="credit_item_desc" forInsert="false" forUpdate="false" prompt="HLS.CF_ITEM_DESC"/>
        <bm:field name="write_off_order" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WRITE_OFF_ORDER" prompt="HLS007.HLS_CREDIT_WRITE_OFF_ORDER.WRITE_OFF_ORDER"/>
    </bm:fields>
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
    			select o.credit_item, o.write_off_order, i.DESCRIPTION as credit_item_desc
				  from hls_credit_write_off_order o, HLS_CREDIT_ITEM_V i
				 where o.credit_item = i.cf_item
				 order by o.write_off_order
    		]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="credit_item"/>
    </bm:primary-key>
    <e:exception-descriptor-config>
        <e:exception-descriptor exception="java.sql.SQLException" handleClass="leaf.database.SQLExceptionDescriptor">
            <e:error-message code="1" message="HLS007.HLS_CREDIT_WRITE_OFF_ORDER.UNIQUE_INDEX_REPEATED"/>
        </e:exception-descriptor>
    </e:exception-descriptor-config>
</bm:model>
