<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:o="leaf.database.local.oracle" xmlns:e="leaf.service.exception" xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="EXP_EMPLOYEES" defaultOrderBy="t1.employee_code ASC">
    <bm:fields>
        <bm:field name="employee_id" databaseType="NUMBER" datatype="java.lang.Long" insertExpression="exp_employees_s.nextval" physicalName="EMPLOYEE_ID"/>
        <bm:field name="employee_code" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="EMPLOYEE_CODE" prompt="EXP_EMPLOYEE.EMPLOYEE_CODE"/>
        <bm:field name="name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="NAME" prompt="EXP_EMPLOYEE.EMPLOYEE_NAME"/>
        <bm:field name="email" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EMAIL" prompt="EXP_EMPLOYEE.EMAIL"/>
        <bm:field name="mobil" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="MOBIL" prompt="EXP_EMPLOYEE.MOBIL"/>
        <bm:field name="phone" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PHONE" prompt="EXP_EMPLOYEE.PHONE"/>
        <bm:field name="bank_of_deposit" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_OF_DEPOSIT" prompt="EXP_EMPLOYEE.BANK_OF_DEPOSIT"/>
        <bm:field name="bank_account" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_ACCOUNT" prompt="EXP_EMPLOYEE.BANK_ACCOUNT"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="EXP_EMPLOYEE.ENABLED_FLAG"/>
        <bm:field name="employee_type_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="EMPLOYEE_TYPE_ID" prompt="EXP_EMPLOYEE.EMPLOYEE_TYPE"/>
        <bm:field name="id_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ID_TYPE" prompt="EXP_EMPLOYEE.ID_TYPE"/>
        <bm:field name="id_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ID_CODE" prompt="EXP_EMPLOYEE.ID_CODE"/>
        <bm:field name="notes" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NOTES" prompt="EXP_EMPLOYEE.NOTES"/>
        <bm:field name="national_identifier" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NATIONAL_IDENTIFIER" prompt="EXP_EMPLOYEE.NATIONAL_IDENTIFIER"/>
        <bm:field name="namecode" expression="(employee_code||&apos; - &apos;||name)" forInsert="false" forUpdate="false"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
        <o:sequence-pk/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="employee_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field name="enabled_flag" queryExpression="t1.enabled_flag=${@enabled_flag}"/>
        <bm:query-field name="employee_code" queryExpression="employee_code like &apos;%&apos;||${@employee_code}||&apos;%&apos;"/>
        <bm:query-field name="name" queryExpression="name like &apos;%&apos;||${@name}||&apos;%&apos;"/>
        <bm:query-field field="employee_id" queryOperator="="/>
        <bm:query-field name="namcode" queryExpression="(employee_code||&apos; - &apos;||name) like &apos;%&apos;||${@namcode}||&apos;%&apos;"/>
    </bm:query-fields>
    <bm:relations>
        <bm:relation name="r1" joinType="inner" refAlias="r1" refModel="exp.exp_employee_types_vl">
            <bm:reference foreignField="employee_type_id" localField="employee_type_id"/>
        </bm:relation>
    </bm:relations>
    <bm:ref-fields>
        <bm:ref-field name="description" relationName="r1" 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="EXP_EMPLOYEES.EMPLOYEE_CODE_DISTINCT"/>
        </e:exception-descriptor>
    </e:exception-descriptor-config>
</bm:model>
