<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: ericyin  
    $Date: 2012-12-12 下午4:14:55  
    $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_LEASE_AREAS">
    <bm:fields>
        <bm:field name="lease_organizations_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LEASE_ORGANIZATIONS_ID" prompt="HLS_LEASE_AREAS.LEASE_ORGANIZATIONS_ID"/>
        <bm:field name="lease_channel_id" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_CHANNEL_ID" prompt="HLS_LEASE_AREAS.LEASE_CHANNEL_ID"/>
        <bm:field name="division_id" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DIVISION_ID" prompt="HLS_LEASE_AREAS.DIVISION_ID"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="HLS_LEASE_AREAS.ENABLED_FLAG"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="division_id"/>
        <bm:pk-field name="lease_channel_id"/>
        <bm:pk-field name="lease_organizations_id"/>
    </bm:primary-key>
    <bm:relations>
        <bm:relation name="organizations" joinType="INNER" refAlias="t2" refModel="hls.HLS104.hls_lease_organizations_vl">
            <bm:reference foreignField="lease_organizations_id" localField="lease_organizations_id"/>
        </bm:relation>
        <bm:relation name="channel" joinType="INNER" refAlias="t3" refModel="hls.HLS104.hls_lease_channels_vl">
            <bm:reference foreignField="lease_channel_id" localField="lease_channel_id"/>
        </bm:relation>
        <bm:relation name="division" joinType="INNER" refAlias="t4" refModel="hls.HLS104.hls_divisions_vl">
            <bm:reference foreignField="division_id" localField="division_id"/>
        </bm:relation>
    </bm:relations>
    <bm:ref-fields>
        <bm:ref-field name="org_description" relationName="organizations" sourceField="description"/>
        <bm:ref-field name="channel_description" relationName="channel" sourceField="description"/>
        <bm:ref-field name="division_description" relationName="division" sourceField="description"/>
    </bm:ref-fields>
    <e:exception-descriptor-config>
        <e:exception-descriptor exception="java.sql.SQLException" handleClass="leaf.database.SQLExceptionDescriptor">
            <e:error-message code="1" message="HLS104_AREA_UNIQUE_ERROR"/>
        </e:exception-descriptor>
    </e:exception-descriptor-config>
</bm:model>
