<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: qianming
    $Date: 2015-9-7 
    $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="BGFL_DOCUMENT_TYPE_AGN_PTYPE">
    <bm:fields>
        <bm:field name="ptype_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PTYPE_ID"/>
        <bm:field name="document_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_TYPE"/>
        <bm:field name="document_type_n" expression="(select description from hls_document_type where document_type = t1.document_type)" forInsert="false" forUpdate="false"/>
        <bm:field name="lease_form" databaseType="VARCHAR2" datatype="java.lang.String" lookupCode="LEASE_FORM" lookupField="lease_form_n" physicalName="LEASE_FORM"/>
        <bm:field name="lease_form_n" forInsert="false" forUpdate="false"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
        <o:sequence-pk/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="ptype_id"/>
    </bm:primary-key>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="t1.document_type = ${@document_type}"/>
    </bm:data-filters>
</bm:model>
