<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: chenlingfeng  
    $Date: 2017-7-17 上午9:51:00  
    $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="HN_CHANCE_BP_INTERVIEWS" defaultOrderBy="interview_date desc">
    <bm:fields>
        <bm:field name="record_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RECORD_ID" prompt="HN_CHANCE_BP_INTERVIEWS.RECORD_ID"/>
        <bm:field name="chance_bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CHANCE_BP_ID" prompt="HN_CHANCE_BP_INTERVIEWS.CHANCE_BP_ID"/>
        <bm:field name="chance_bp_name" expression="(select chance_bp_name from hn_chance_bp b where b.chance_bp_id = t1.chance_bp_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="interview_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INTERVIEW_NAME" prompt="HN_CHANCE_BP_INTERVIEWS.INTERVIEW_NAME"/>
        <bm:field name="interview_date" databaseType="DATE" datatype="java.util.Date" physicalName="INTERVIEW_DATE" prompt="HN_CHANCE_BP_INTERVIEWS.INTERVIEW_DATE"/>
        <bm:field name="interview_location" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INTERVIEW_LOCATION" prompt="HN_CHANCE_BP_INTERVIEWS.INTERVIEW_LOCATION"/>
        <bm:field name="interviewer_user_id" databaseType="NUMBER" datatype="java.lang.Long" insertExpression="${/session/@user_id}" physicalName="INTERVIEWER_USER_ID" prompt="HN_CHANCE_BP_INTERVIEWS.INTERVIEWER_USER_ID" updateExpression="${/session/@user_id}"/>
        <bm:field name="interviewer_user_id_n" expression="(select description from sys_user su where su.user_id = t1.interviewer_user_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="HN_CHANCE_BP_INTERVIEWS.DESCRIPTION"/>
        <bm:field name="creation_date_desc" databaseType="DATE" datatype="java.util.Date" expression="trunc(creation_date)" forInsert="false" forUpdate="false"/>
        <bm:field name="interviewee_name" databaseType="VARCHAR2" datatype="java.lang.String"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
        <o:sequence-pk/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="record_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field name="interview_date_from" queryExpression="trunc(interview_date)  &gt;= to_date(${@interview_date_from},&apos;yyyy-mm-dd&apos;)"/>
        <bm:query-field name="interview_date_to" queryExpression="trunc(interview_date)  &lt;= to_date(${@interview_date_to},&apos;yyyy-mm-dd&apos;)"/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter name="chance_bp_id" expression="t1.chance_bp_id = ${@chance_bp_id}"/>
    </bm:data-filters>
</bm:model>
