<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2014-4-24 下午05:09:26  
    $Revision: 1.0  
    $Purpose: 律师聘请备案表
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="LEG_EXTERNAL_AGENCY">
    <bm:fields>
        <bm:field name="agency_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="AGENCY_ID" prompt="LEG_EXTERNAL_AGENCY.AGENCY_ID"/>
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="LEG_EXTERNAL_AGENCY.CONTRACT_ID"/>
        <bm:field name="employ_person" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EMPLOY_PERSON" prompt="LEG_EXTERNAL_AGENCY.EMPLOY_PERSON"/>
        <bm:field name="unit" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="UNIT" prompt="LEG_EXTERNAL_AGENCY.UNIT"/>
        <bm:field name="employ_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EMPLOY_TYPE" prompt="LEG_EXTERNAL_AGENCY.EMPLOY_TYPE"/>
        <bm:field name="employ_method" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EMPLOY_METHOD" prompt="LEG_EXTERNAL_AGENCY.EMPLOY_METHOD"/>
        <bm:field name="risk_agency_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="RISK_AGENCY_FLAG" prompt="LEG_EXTERNAL_AGENCY.RISK_AGENCY_FLAG"/>
        <bm:field name="employ_date_from" databaseType="DATE" datatype="java.util.Date" physicalName="EMPLOY_DATE_FROM" prompt="LEG_EXTERNAL_AGENCY.EMPLOY_DATE_FROM"/>
        <bm:field name="employ_date_to" databaseType="DATE" datatype="java.util.Date" physicalName="EMPLOY_DATE_TO" prompt="LEG_EXTERNAL_AGENCY.EMPLOY_DATE_TO"/>
        <bm:field name="employ_affair" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EMPLOY_AFFAIR" prompt="LEG_EXTERNAL_AGENCY.EMPLOY_AFFAIR"/>
        <bm:field name="employ_reason" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EMPLOY_REASON" prompt="LEG_EXTERNAL_AGENCY.EMPLOY_REASON"/>
        <bm:field name="fee_method" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FEE_METHOD" prompt="LEG_EXTERNAL_AGENCY.FEE_METHOD"/>
        <bm:field name="phone" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PHONE" prompt="LEG_EXTERNAL_AGENCY.PHONE"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="LEG_EXTERNAL_AGENCY.DESCRIPTION"/>
        <bm:field name="now_date_year" expression="to_char(sysdate,&apos;YYYY&apos;)"/>
        <bm:field name="now_date_month" expression="to_char(sysdate,&apos;MM&apos;)"/>
        <bm:field name="now_date_day" expression="to_char(sysdate,&apos;DD&apos;)"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="agency_id"/>
    </bm:primary-key>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="t1.agency_id =${@agency_id}"/>
    </bm:data-filters>
</bm:model>
