<?xml version="1.0" encoding="UTF-8" ?>
<orm xmlns="http://java.sun.com/xml/ns/jdo/orm"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/orm
        http://java.sun.com/xml/ns/jdo/orm_3_0.xsd">
    <package name="kr.co.kihyun.beans.entity">
        <class
              name="LongEntity">
            <field
                  name="id" primary-key="true"
                  persistence-modifier="persistent">
                    <extension vendor-name="datanucleus" key="strategy-when-notnull" value="false"/>
                    <column name="id"/>
            </field>
        </class>
        <class
              name="StringEntity">
            <field
                  name="id" primary-key="true"
                  persistence-modifier="persistent">
                    <column name="id" length="32"/>
            </field>
        </class>
        <class
              name="CpuPercent" table="moumi_cpu_percent">
            <field
                  name="writeDate"
                  persistence-modifier="persistent">
                    <column name="write_date" length="25"/>
            </field>
            <field
                  name="percent"
                  persistence-modifier="persistent" length="6"/>
        </class>
        <class
              name="DayCount" table="moumi_day_count">
            <field
                  name="writeDate"
                  persistence-modifier="persistent">
                    <column name="write_date" length="25"/>
            </field>
            <field
                  name="count"
                  persistence-modifier="persistent"/>
        </class>
        <class
              name="UserPart" table="moumi_user_part">
            <field
                  name="id" primary-key="true"
                  persistence-modifier="persistent">
                    <column name="id" jdbc-type="CHAR" length="32"/>
            </field>
            <field
                  name="name"
                  persistence-modifier="persistent">
                    <column length="60"/>
            </field>
            <field
                  name="mUser"
                  persistence-modifier="persistent">
                    <column name="user_id" length="30"/>
            </field>
            <field
                  name="regDate"
                  persistence-modifier="persistent">
                    <column name="reg_date"/>
            </field>
            <field
                  name="des"
                  persistence-modifier="persistent">
                    <column length="200"/>
            </field>
            <field
                  name="userDepts" mapped-by="userPart"
                  persistence-modifier="persistent">
                    <collection element-type="kr.co.kihyun.beans.entity.UserDept"/>
                    <order>
                        <extension vendor-name="datanucleus" key="list-ordering" value="id DESC"/>
                    </order>
            </field>
            <field
                  name="userUsers" mapped-by="userPart"
                  persistence-modifier="persistent">
                    <collection element-type="kr.co.kihyun.beans.entity.UserUser"/>
                    <order>
                        <extension vendor-name="datanucleus" key="list-ordering" value="id DESC"/>
                    </order>
            </field>
            <field
                  name="modDate"
                  persistence-modifier="persistent">
                    <column name="mod_date" default-value="sysdate"/>
            </field>
            <field
                  name="useYn"
                  persistence-modifier="persistent">
                    <column name="use_yn" default-value="Y" length="1"/>
            </field>
        </class>
        <class
              name="Category" table="moumi_category">
            <field
                  name="name"
                  persistence-modifier="persistent">
                    <column length="60"/>
            </field>
            <field
                  name="upperCategory"
                  persistence-modifier="persistent">
                    <column name="upper_category_id"/>
            </field>
            <field
                  name="priority"
                  persistence-modifier="persistent"/>
            <field
                  name="childCategories" mapped-by="upperCategory"
                  delete-action="cascade"
                  persistence-modifier="persistent">
                    <collection element-type="kr.co.kihyun.beans.entity.Category"/>
                    <order>
                        <extension vendor-name="datanucleus" key="list-ordering" value="priority ASC"/>
                    </order>
            </field>
        </class>
        <class
              name="Board" table="moumi_board" cacheable="false">
            <field
                  name="mUser"
                  persistence-modifier="persistent">
                    <column name="user_id" length="30"/>
            </field>
            <field
                  name="password"
                  persistence-modifier="persistent">
                    <column name="passwd" length="20"/>
            </field>
            <field
                  name="title"
                  persistence-modifier="persistent">
                    <column length="200"/>
            </field>
            <field
                  name="contents"
                  persistence-modifier="persistent"
                  default-fetch-group="false">
                    <column jdbc-type="CLOB" length="5242880"/>
            </field>
            <field
                  name="writeDate"
                  persistence-modifier="persistent">
                    <column name="write_date"/>
            </field>
            <field
                  name="visit"
                  persistence-modifier="persistent">
                    <column default-value="0"/>
            </field>
            <field
                  name="attachments"
                  persistence-modifier="persistent"
                  default-fetch-group="false"
                  serialized="true">
                    <column jdbc-type="BLOB" length="209715200"/>
            </field>
            <field
                  name="step"
                  persistence-modifier="persistent"/>
            <field
                  name="repLevel"
                  persistence-modifier="persistent">
                    <column name="rep_level"/>
            </field>
            <field
                  name="category"
                  persistence-modifier="persistent">
                    <column name="group_id" length="32"/>
            </field>
            <field
                  name="totDoc"
                  persistence-modifier="persistent">
                    <column name="doc_id"/>
            </field>
            <field
                  name="upperBoard"
                  persistence-modifier="persistent">
                    <column name="upper_id"/>
            </field>
            <field
                  name="childBoards" mapped-by="upperBoard"
                  delete-action="cascade"
                  persistence-modifier="persistent">
                    <collection element-type="kr.co.kihyun.beans.entity.Board"/>
                    <order>
                        <extension vendor-name="datanucleus" key="list-ordering" value="id DESC"/>
                    </order>
            </field>
            <field
                name="popup_yn"
                persistence-modifier="persistent">
                    <column name="popup_yn"/>
            </field>
        </class>
        <class
              name="UserDept" table="moumi_user_dept">
            <field
                  name="userDeptId" primary-key="true"
                  persistence-modifier="persistent">
                    <column name="user_dept_id"/>
            </field>
            <field
                  name="handyId"
                  persistence-modifier="persistent">
                    <column name="handy_id" length="20"/>
            </field>
            <field
                  name="id"
                  persistence-modifier="persistent">
                    <column name="id" length="10"/>
            </field>
            <field
                  name="name"
                  persistence-modifier="persistent">
                    <column length="100"/>
            </field>
            <field
                  name="userPart"
                  persistence-modifier="persistent">
                    <column name="part_id"/>
            </field>
        </class>
        <class
              name="UserHistory" table="moumi_user_history">
            <field
                  name="totDoc"
                  persistence-modifier="persistent">
                    <column name="doc_id"/>
            </field>
            <field
                  name="fromUser"
                  persistence-modifier="persistent">
                    <column name="user_id" length="30"/>
            </field>
            <field
                  name="toUser"
                  persistence-modifier="persistent">
                    <column name="change_id" length="30"/>
            </field>
            <field
                  name="mDept"
                  persistence-modifier="persistent">
                    <column name="dept_id" length="10"/>
            </field>
            <field
                  name="writeDate"
                  persistence-modifier="persistent">
                    <column name="write_date"/>
            </field>
        </class>
        <class
              name="TotItem" table="moumi_tot_item" cacheable="false">
            <field
                  name="totDoc"
                  persistence-modifier="persistent">
                    <column name="doc_id"/>
            </field>
            <field
                  name="tableNum"
                  persistence-modifier="persistent">
                    <column name="table_num" default-value="1"/>
            </field>
            <field
                  name="num"
                  persistence-modifier="persistent">
                    <column default-value="0"/>
            </field>
            <field
                  name="name"
                  persistence-modifier="persistent">
                    <column length="8"/>
            </field>
            <field
                  name="description"
                  persistence-modifier="persistent"
                  default-fetch-group="false">
                    <column name="des" length="500"/>
            </field>
            <field
                  name="inputSize"
                  persistence-modifier="persistent">
                    <column name="input_size" default-value="10"/>
            </field>
            <field
                  name="expr"
                  persistence-modifier="persistent"
                  default-fetch-group="false">
                    <column length="2000"/>
            </field>
            <field
                  name="type"
                  persistence-modifier="persistent">
                    <column jdbc-type="INTEGER"/>
            </field>
            <field
                  name="colNum"
                  persistence-modifier="persistent">
                    <column name="col_num"/>
            </field>
            <field
                  name="rowNum"
                  persistence-modifier="persistent">
                    <column name="row_num"/>
            </field>
        </class>
        <class
              name="Memo" table="moumi_memo" cacheable="false">
            <field
                  name="groupId"
                  persistence-modifier="persistent">
                    <column name="group_id" length="20"/>
            </field>
            <field
                  name="requestUser"
                  persistence-modifier="persistent">
                    <column name="request_user_id" length="30"/>
            </field>
            <field
                  name="responseUser"
                  persistence-modifier="persistent">
                    <column name="response_user_id" length="30"/>
            </field>
            <field
                  name="contents"
                  persistence-modifier="persistent">
                    <column length="1000"/>
            </field>
            <field
                  name="totDoc"
                  persistence-modifier="persistent">
                    <column name="doc_id"/>
            </field>
             <field
                  name="totReport"
                  persistence-modifier="persistent">
                    <column name="report_id"/>
            </field>
            <field
                  name="requestDept"
                  persistence-modifier="persistent">
                    <column name="request_dept_id" length="10"/>
            </field>
            <field
                  name="responseDept"
                  persistence-modifier="persistent">
                    <column name="response_dept_id" length="10"/>
            </field>
            <field
                  name="writeDate"
                  persistence-modifier="persistent">
                    <column name="write_date"/>
            </field>
        </class>
        <class
              name="TotTable" table="moumi_tot_table" cacheable="false">
            <field
                  name="totDoc"
                  persistence-modifier="persistent">
                    <column name="doc_id"/>
            </field>
            <field
                  name="num"
                  persistence-modifier="persistent">
                    <column default-value="1"/>
            </field>
            <field
                  name="name"
                  persistence-modifier="persistent">
                    <column length="50"/>
            </field>
            <field
                  name="note"
                  persistence-modifier="persistent">
                    <column length="50"/>
            </field>
            <field
                  name="type"
                  persistence-modifier="persistent">
                    <column jdbc-type="INTEGER"/>
            </field>
            <field
                  name="itemSize"
                  persistence-modifier="persistent">
                    <column name="input_size" default-value="10"/>
            </field>
            <field
                  name="form"
                  persistence-modifier="persistent"
                  default-fetch-group="false">
                    <column jdbc-type="CLOB" length="204800"/>
            </field>
            <field
                  name="types"
                  persistence-modifier="persistent">
                    <column length="100"/>
            </field>
        </class>
        <class
              name="UserUser" table="moumi_user_user">
            <field
                  name="userUserId" primary-key="true"
                  persistence-modifier="persistent">
                    <column name="user_user_id"/>
            </field>
            <field
                  name="id"
                  persistence-modifier="persistent">
                    <column name="id" length="30"/>
            </field>
            <field
                  name="name"
                  persistence-modifier="persistent">
                    <column length="100"/>
            </field>
            <field
                  name="mDept"
                  persistence-modifier="persistent">
                    <column name="dept_id" length="10"/>
            </field>
            <field
                  name="userPart"
                  persistence-modifier="persistent">
                    <column name="part_id"/>
            </field>
            <field
                  name="valid"
                  persistence-modifier="persistent"/>
        </class>
        <class
              name="TotLog" table="moumi_tot_log">
            <field
                  name="num"
                  persistence-modifier="persistent"/>
            <field
                  name="act"
                  persistence-modifier="persistent">
                    <column length="20"/>
            </field>
            <field
                  name="des"
                  persistence-modifier="persistent">
                    <column length="50"/>
            </field>
            <field
                  name="mUser"
                  persistence-modifier="persistent">
                    <column name="user_id" length="30"/>
            </field>
            <field
                  name="groupId"
                  persistence-modifier="persistent">
                    <column name="group_id" length="20"/>
            </field>
            <field
                  name="clientIp"
                  persistence-modifier="persistent">
                    <column name="client_ip" length="50"/>
            </field>
            <field
                  name="totDoc"
                  persistence-modifier="persistent">
                    <column name="doc_id"/>
            </field>
            <field
                  name="csUri"
                  persistence-modifier="persistent">
                    <column name="cs_uri" length="50"/>
            </field>
            <field
                  name="writeDate"
                  persistence-modifier="persistent">
                    <column name="write_date"/>
            </field>
            <field
                  name="mDept"
                  persistence-modifier="persistent">
                    <column name="dept_id" length="10"/>
            </field>
            <field
                  name="logLevel"
                  persistence-modifier="persistent">
                    <column name="log_level"/>
            </field>
            <field
                  name="message"
                  persistence-modifier="persistent">
                    <column jdbc-type="CLOB" length="5242880"/>
            </field>
            <field
                  name="location"
                  persistence-modifier="persistent">
                    <column length="100"/>
            </field>
        </class>
        <class
              name="AbstractPublicDocument">
            <field
                  name="managementCode"
                  persistence-modifier="persistent">
                    <column name="mng_code" length="50"/>
            </field>
            <field
                  name="ownerName"
                  persistence-modifier="persistent">
                    <column name="owner_name"/>
            </field>
            <field
                  name="ownerPhone"
                  persistence-modifier="persistent">
                    <column name="owner_phone" length="30"/>
            </field>
            <field
                  name="ownerEmail"
                  persistence-modifier="persistent">
                    <column name="owner_email" length="50"/>
            </field>
        </class>
        <class
              name="TotReport" table="moumi_tot_report" cacheable="false">
            <query name="CompReports" language="javax.jdo.query.JDOQL">
                <![CDATA[
                      SELECT FROM kr.co.kihyun.beans.entity.TotReport
                      WHERE
                          isDeleted == false && type == TYPE_REPORT
                          && (process == PROCESS_COMP || process == PROCESS_END
                              || process == PROCESS_NOT)
                ]]>
            </query>
            <query name="RecogReports" language="javax.jdo.query.JDOQL">
                <![CDATA[
                      SELECT FROM kr.co.kihyun.beans.entity.TotReport
                      WHERE
                          isDeleted == false && type == TYPE_REPORT
                          && recog > RECOG_NOT && recog < RECOG_RETURN
                          && process == TYPE_COMP
                ]]>
            </query>
            <field
                  name="acceptanceCode"
                  persistence-modifier="persistent">
                    <column name="acpt_code" length="200"/>
            </field>
            <field
                  name="totDoc"
                  persistence-modifier="persistent">
                    <column name="doc_id"/>
            </field>
            <field
                  name="tableNum"
                  persistence-modifier="persistent">
                    <column name="table_num" default-value="1"/>
            </field>
            <field
                  name="num"
                  persistence-modifier="persistent"/>
            <field
                  name="mDept"
                  persistence-modifier="persistent">
                    <column name="dept_id" length="10"/>
            </field>
            <field
                  name="mUser"
                  persistence-modifier="persistent">
                    <column name="user_id" length="30"/>
            </field>
            <field
                  name="regDate"
                  persistence-modifier="persistent">
                    <column name="reg_date"/>
            </field>
            <field
                  name="submitDate" cacheable="false"
                  persistence-modifier="persistent">
                    <column name="submit_date"/>
            </field>
            <field
                  name="data"
                  persistence-modifier="persistent"
                  default-fetch-group="false">
                    <column jdbc-type="CLOB" length="204800"/>
            </field>
            <field
                  name="totData"
                  persistence-modifier="persistent"
                  default-fetch-group="false">
                    <column name="tot_data" jdbc-type="CLOB" length="204800"/>
            </field>
            <field
                  name="attachments"
                  persistence-modifier="persistent"
                  default-fetch-group="false"
                  serialized="true">
                    <column jdbc-type="BLOB" length="5242880"/>
            </field>
            <field
                  name="appro"
                  persistence-modifier="persistent">
                    <column default-value="0"/>
            </field>
            <field
                  name="recog" cacheable="false"
                  persistence-modifier="persistent"
                  default-fetch-group="true">
                    <column jdbc-type="INTEGER"/>
            </field>
            <field
                  name="note"
                  persistence-modifier="persistent"
                  default-fetch-group="false">
                    <column jdbc-type="CLOB" length="204800"/>
            </field>
            <field
                  name="isDeleted"
                  persistence-modifier="persistent">
                    <column name="del_type"/>
            </field>
            <field
                  name="type"
                  persistence-modifier="persistent">
                    <column jdbc-type="INTEGER"/>
            </field>
            <field
                  name="process" cacheable="false"
                  persistence-modifier="persistent"
                  default-fetch-group="true">
                    <column name="prss" jdbc-type="INTEGER"/>
            </field>
            <field
                  name="slaveTotDoc"
                  persistence-modifier="persistent">
                    <column name="down_doc_id"/>
            </field>
            <field
                  name="acptDoc"
                  persistence-modifier="persistent">
                    <column name="acpt_doc_code" length="200"/>
            </field>
            <field
                  name="repTotDoc"
                  persistence-modifier="persistent">
                    <column name="rep_doc_id"/>
            </field>
            <field
                  name="assignType"
                  persistence-modifier="persistent">
                    <column name="doc_type" jdbc-type="INTEGER"/>
            </field>
            <field
                  name="currentRepoadm"
                  persistence-modifier="persistent">
                    <column name="current_repoadm_id"/>
            </field>
            <field
                  name="totReportHistories" mapped-by="totReport"
                  delete-action="cascade"
                  persistence-modifier="persistent">
                    <collection element-type="kr.co.kihyun.beans.entity.TotReportHistory"/>
                    <order>
                        <extension vendor-name="datanucleus" key="list-ordering" value="id DESC"/>
                    </order>
            </field>
            <field
                  name="memos" mapped-by="totReport"
                  persistence-modifier="persistent">
                    <collection element-type="kr.co.kihyun.beans.entity.Memo"/>
                    <order>
                        <extension vendor-name="datanucleus" key="list-ordering" value="id DESC"/>
                    </order>
            </field>
            <field
                  name="repoadms" mapped-by="totReport"
                  persistence-modifier="persistent">
                    <collection element-type="kr.co.kihyun.beans.entity.Repoadm"/>
                    <order>
                        <extension vendor-name="datanucleus" key="list-ordering" value="id ASC"/>
                    </order>
            </field>
        </class>
        <class
              name="TotDoc" table="moumi_tot_doc" cacheable="false">
            <field
                  name="executionCode"
                  persistence-modifier="persistent">
                    <column name="exec_code" length="200"/>
            </field>
            <field
                  name="name"
                  persistence-modifier="persistent">
                    <column length="200"/>
            </field>
            <field
                  name="mUser"
                  persistence-modifier="persistent">
                    <column name="user_id" length="30"/>
            </field>
            <field
                  name="startDate"
                  persistence-modifier="persistent">
                    <column name="start_date"/>
            </field>
            <field
                  name="endDate"
                  persistence-modifier="persistent">
                    <column name="end_date"/>
            </field>
            <field
                  name="regDate"
                  persistence-modifier="persistent">
                    <column name="reg_date"/>
            </field>
            <field
                  name="accessAuth"
                  persistence-modifier="persistent">
                    <column name="acc_auth" jdbc-type="INTEGER"/>
            </field>
            <field
                  name="form"
                  persistence-modifier="persistent"
                  default-fetch-group="false">
                    <column jdbc-type="CLOB" length="204800"/>
            </field>
            <field
                  name="masterTotDoc"
                  persistence-modifier="persistent">
                    <column name="rep_id"/>
            </field>
            <field
                  name="masterTotReport" mapped-by="slaveTotDoc"
                  persistence-modifier="persistent"/>
            <field
                  name="slaveTotDocs" mapped-by="masterTotDoc"
                  persistence-modifier="persistent">
                    <collection element-type="kr.co.kihyun.beans.entity.TotDoc"/>
            </field>
            <field
                  name="masterDept" delete-action="null"
                  persistence-modifier="persistent">
                    <column name="rep_dept_id" length="10"/>
            </field>
            <field
                  name="isDeleted"
                  persistence-modifier="persistent">
                    <column name="del_type"/>
            </field>
            <field
                  name="appendType"
                  persistence-modifier="persistent">
                    <column name="append_type" jdbc-type="INTEGER" default-value="0"/>
            </field>
            <field
                  name="type"
                  persistence-modifier="persistent">
                    <column name="group_id" jdbc-type="INTEGER"/>
            </field>
            <field
                  name="mDept"
                  persistence-modifier="persistent">
                    <column name="dept_id" length="10"/>
            </field>
            <field
                  name="fixNum"
                  persistence-modifier="persistent">
                    <column name="fix_num" default-value="0"/>
            </field>
            <field
                  name="handyName"
                  persistence-modifier="persistent">
                    <column name="handy_name" length="200"/>
            </field>
            <field
                  name="totRange"
                  persistence-modifier="persistent">
                    <column name="tot_range" jdbc-type="INTEGER"/>
            </field>
            <field
                  name="board" mapped-by="totDoc"
                  persistence-modifier="persistent"/>
            <field
                  name="acceptanceLimitStrategy"
                  persistence-modifier="persistent"
                  dependent="true"
                  field-type="
                          kr.co.kihyun.beans.entity.UnlimitStrategy,
                          kr.co.kihyun.beans.entity.LimitByWriteDateStrategy,
                          kr.co.kihyun.beans.entity.LimitBySubmitDateStrategy">
                    <column name="acpt_limit"/>
            </field>
            <field
                  name="totItems" mapped-by="totDoc"
                  delete-action="cascade"
                  persistence-modifier="persistent">
                    <collection element-type="kr.co.kihyun.beans.entity.TotItem"/>
                    <order>
                        <extension vendor-name="datanucleus" key="list-ordering" value="num ASC"/>
                    </order>
            </field>
            <field
                  name="totReports" mapped-by="totDoc"
                  delete-action="cascade"
                  persistence-modifier="persistent">
                    <collection element-type="kr.co.kihyun.beans.entity.TotReport"/>
            </field>
            <field
                  name="totTables" mapped-by="totDoc"
                  delete-action="cascade"
                  persistence-modifier="persistent">
                    <collection element-type="kr.co.kihyun.beans.entity.TotTable"/>
            </field>
        </class>
        <class
              name="AcceptanceLimitStrategy" table="moumi_acpt_limit_strategy" cacheable="false">
                <inheritance strategy="new-table">
                        <discriminator strategy="value-map">
                                <column name="acpt_type" length="50"/>
                        </discriminator>
                </inheritance>
                <field
                      name="totDoc" mapped-by="acceptanceLimitStrategy"
                      persistence-modifier="persistent">
                        <column name="doc_id"/>
                </field>
                <field
                      name="process"
                      persistence-modifier="persistent">
                        <column name="prss" jdbc-type="INTEGER"/>
                </field>
                <field
                      name="limitCount"
                      persistence-modifier="persistent">
                        <column name="submit_limit_cnt"/>
                </field>
        </class>
        <class
              name="UnlimitStrategy">
                <inheritance>
                        <discriminator value="UNLIMIT"/>
                </inheritance>
        </class>
        <class
              name="LimitByDeadlineStrategy">
                <inheritance>
                        <discriminator value="DEADLINE"/>
                </inheritance>
        </class>
        <class
              name="LimitByWriteDateStrategy">
                <inheritance>
                        <discriminator value="WRITE_DATE"/>
                </inheritance>
        </class>
        <class
              name="LimitBySubmitDateStrategy">
                <inheritance>
                        <discriminator value="SUBMIT_DATE"/>
                </inheritance>
        </class>
        <class
              name="TotReportHistory" table="moumi_tot_report_history" cacheable="false">
            <field
                  name="totReport"
                  persistence-modifier="persistent">
                    <column name="tot_report_id"/>
            </field>
            <field
                  name="des"
                  persistence-modifier="persistent">
                    <column length="200"/>
            </field>
            <field
                  name="writeDate"
                  persistence-modifier="persistent">
                    <column name="write_date"/>
            </field>
            <field
                  name="memo"
                  persistence-modifier="persistent">
                    <column length="200"/>
            </field>
        </class>
        <class
              name="Repoadm" table="moumi_repoadm">
            <field
                  name="totReport"
                  persistence-modifier="persistent">
                    <column name="report_id"/>
            </field>
            <field
                  name="recogUser"
                  persistence-modifier="persistent">
                    <column name="recog_user_id" length="30"/>
            </field>
			<field
                  name="recog"
                  persistence-modifier="persistent">
                  <column name="recog" jdbc-type="INTEGER"/>
            </field>
            <field
                  name="decDate"
                  persistence-modifier="persistent">
                    <column name="dec_date"/>
            </field>
            <field
                  name="history"
                  persistence-modifier="persistent"
                  default-fetch-group="false">
                  <column name="history" length="500"/>
            </field>
            <field
                  name="recogNum"
                  persistence-modifier="persistent">
                  <column name="recog_num"/>
            </field>
            <field
                  name="recogflag"
                  persistence-modifier="persistent">
                  <column name="recogflag"/>
            </field>
            <field
                  name="acceptflag"
                  persistence-modifier="persistent">
                  <column name="acceptflag"/>
            </field>
        </class>
        <class
              name="Emul" table="moumi_emul" cacheable="false">
            <field
                  name="mUser"
                  persistence-modifier="persistent">
                <column name="user_id" length="32"/>
            </field>
            <field
                  name="mDept"
                  persistence-modifier="persistent">
                <column name="dept_id" length="10"/>
            </field>
<!--
	        <extension vendor-name="datanucleus" key="view-definition" value="
	        CREATE VIEW moumi_emul
	        (
	        	{this.mUser}, {this.mDept}
	        ) AS
	        SELECT us.usrid AS user_id, us.cpr_code AS dept_id
	        FROM TN_SYMUSMUM001 us
	        "/>
-->
        </class>
        <class
              name="MUser" table="moumi_muser" cacheable="false">
            <field
                  name="id" 
                  persistence-modifier="persistent">
                    <column length="32"/>
            </field>
            <field
                  name="password"
                  persistence-modifier="persistent">
                    <column name="passwd" length="64"/>
            </field>
            <field
                  name="name"
                  persistence-modifier="persistent">
                    <column length="256"/>
            </field>
            <field
                  name="slNo1"
                  persistence-modifier="persistent">
                    <column name="sl_no_1" length="6"/>
            </field>
            <field
                  name="slNo2"
                  persistence-modifier="persistent">
                    <column name="sl_no_2" length="7"/>
            </field>
            <field
                  name="email"
                  persistence-modifier="persistent">
                    <column length="450"/>
            </field>
            <field
                  name="phone"
                  persistence-modifier="persistent">
                    <column length="50"/>
            </field>
            <field
                  name="cellPhone"
                  persistence-modifier="persistent">
                    <column name="cell_phone" length="64"/>
            </field>
            <field
                  name="sysAuth"
                  persistence-modifier="persistent">
                    <column name="sys_auth" jdbc-type="INTEGER"/>
            </field>
            <field
                  name="isDeleted"
                  persistence-modifier="persistent">
                    <column name="del_type" jdbc-type="CHAR"/>
            </field>
            <field
                  name="mDept" delete-action="restrict"
                  persistence-modifier="persistent">
                    <column name="dept_id" length="10"/>
            </field>
            <field
                  name="priority"
                  persistence-modifier="persistent">
                    <column default-value="0"/>
            </field>
            <field
                  name="dutyName"
                  persistence-modifier="persistent">
                    <column name="duty_name" length="50"/>
            </field>
            <field
                  name="gwId"
                  persistence-modifier="persistent">
                    <column name="gw_id" length="20"/>
            </field>
            <field
                  name="delDate"
                  persistence-modifier="persistent">
                    <column name="del_date" jdbc-type="TIMESTAMP"/>
            </field>
            <field
                  name="empCode"
                  persistence-modifier="persistent">
                    <column name="emp_code" length="10"/>
            </field>
            <field
                  name="roles"
                  persistence-modifier="persistent" jdbc-type="VARCHAR" length="100"/>
<!--
	        <extension vendor-name="datanucleus" key="view-definition" value="
	        CREATE VIEW moumi_muser
	        (
	        	{this.id}, {this.password}, {this.name}, {this.slNo1}, {this.slNo2},
	        	{this.email}, {this.phone}, {this.cellPhone}, {this.sysAuth}, {this.isDeleted},
	        	{this.mDept}, {this.priority}, {this.dutyName}, {this.gwId}, {this.delDate},
	        	{this.empCode}, {this.roles}
	        ) AS
	        SELECT us.usrid AS user_id, varchar('1') AS passwd, us.user_nm_encpt AS name,
	        null AS sl_no_1, null AS sl_no_2,
	        us.email_adres AS email, us.offm.telno AS phone,
	        null AS cell_phone,
	        CASE WHEN us.all_mastr_yn = 'Y' or us.mngr_yn = 'Y' THEN 9 ELSE 2 END AS sys_auth,
	        CASE WHEN us.use_posbl_yn = 'Y' THEN char('N') ELSE char('Y') END AS del_type,
	        dt.org_code AS dept_id, 0 AS priority, null AS duty_name, null AS gw_id,
	        timestamp('1970-01-01') AS del_date,
	        us.p_no AS emp_code, null AS roles
	        FROM TN_SYMUSMUM001 us, TN_SYMOCMOC001 dt
	        WHERE us.psitn_org_code = dt.org_code
	        "/>
-->
        </class>
        <class
              name="MDept" table="moumi_dept" cacheable="false">

            <field
                  name="id" 
                  persistence-modifier="persistent">
                    <column length="10"/>
            </field>

            <field
                  name="handyId"
                  persistence-modifier="persistent">
                    <column name="handy_id" length="20"/>
            </field>
            <field
                  name="name"
                  persistence-modifier="persistent">
                    <column length="300"/>
            </field>
            <field
                  name="address"
                  persistence-modifier="persistent">
                    <column name="addr" jdbc-type="VARCHAR" length="450"/>
            </field>
            <field
                  name="phone"
                  persistence-modifier="persistent">
                    <column length="30"/>
            </field>
            <field
                  name="passcode"
                  persistence-modifier="persistent">
                    <column length="10"/>
            </field>
            <field
                  name="recoImg"
                  persistence-modifier="persistent">
                    <column name="reco_img" length="200"/>
            </field>
            <field
                  name="sysAuth"
                  persistence-modifier="persistent">
                    <column name="sys_auth" jdbc-type="INTEGER"/>
            </field>
            <field
                  name="priority"
                  persistence-modifier="persistent"/>
            <field
                  name="upperDept"
                  persistence-modifier="persistent">
                    <column name="upper_dept" length="10"/>
            </field>
            <field
                  name="rootDept"
                  persistence-modifier="persistent">
                    <column name="root_dept" length="10"/>
            </field>
            <field
                  name="organ"
                  persistence-modifier="persistent">
                    <column length="10"/>
            </field>
            <field
                  name="secId"
                  persistence-modifier="persistent">
                    <column name="sec_id" length="20"/>
            </field>
            <field
                  name="seqnum"
                  persistence-modifier="persistent">
                    <column jdbc-type="CHAR" length="20"/>
            </field>
            <field
                  name="isDocUnit"
                  persistence-modifier="persistent">
                    <column name="sel_type" jdbc-type="CHAR"/>
            </field>
            <field
                  name="isOut"
                  persistence-modifier="persistent">
                    <column name="is_out" jdbc-type="CHAR"/>
            </field>
            <field
                  name="location"
                  persistence-modifier="persistent"/>
            <field
                  name="grade"
                  persistence-modifier="persistent">
                    <column jdbc-type="INTEGER" length="2"/>
            </field>
            <field
                  name="foundation"
                  persistence-modifier="persistent">
                    <column jdbc-type="INTEGER" length="1"/>
            </field>
<!--
	        <extension vendor-name="datanucleus" key="view-definition" value="
	        CREATE VIEW moumi_dept
	        (
	        	{this.id}, {this.rootDept}, {this.handyId}, {this.name}, {this.address}, {this.phone},
	        	{this.passcode}, {this.recoImg}, {this.sysAuth}, {this.priority},
	        	{this.upperDept}, {this.organ}, {this.secId}, {this.seqnum},
	        	{this.isDocUnit}, {this.isOut}, {this.location}, {this.grade}, {this.foundation}
	        ) AS
          SELECT org_code as id, atpt_ofcdc_org_code as root_dept, null as handy_id, kra_org_nm as name,
                 null as address, null as phone, null  as passcode, null as reco_img, null as sys_auth,
                 null as priority, null as upper_dept, null as organ, null as sec_id, char(0) AS seqnum,
                 char('N') AS sel_type, char('N') as is_out, null  as location, null as grade, null as foundation
          FROM TC_SYMOCMOC000
          WHERE
          	fond_sc_code is null and schul_knd_sc_code is null and org_code like 'A%'

          union all

          SELECT tree1.org_code AS id, tree1.atpt_ofcdc_org_code AS root_dept, null AS handy_id, tree1.kra_org_nm AS name,
                 detail.zip_adres || ' ' || detail.zip_dtlad AS address, detail.org_telno AS phone, master.org_code AS passcode,
                 null AS reco_img, 2 AS sys_auth, tree1.STDIL_SNO AS priority,
                 CASE WHEN master.org_code LIKE '%00000001' OR master.org_code LIKE '%00000000' THEN null ELSE tree1.upper_org_code
                    END AS upper_dept,
                    tree1.ju_org_code AS organ,
                    null AS sec_id,
                    char(0) AS seqnum,
                 CASE WHEN master.org_code IS null THEN char('N') ELSE char('Y') END AS sel_type,
                    char('N') AS is_out,
                    null AS location,
                    integer(master.schul_knd_sc_code) AS grade,
                    integer(master.fond_sc_code) AS foundation
          FROM
               TN_SYMOCMOM001 tree1 LEFT JOIN TC_SYMOCMOC000 master ON master.org_code = tree1.org_code,
               TN_SYMOCMOM001 tree2 LEFT JOIN TN_SYMOCMOC001 detail ON detail.org_code = tree2.org_code
         WHERE
               tree1.org_code = tree2.org_code
               AND tree2.org_busn_code = tree1.org_busn_code
               AND tree2.org_uon = tree1.org_uon
               AND tree2.applc_begin_ymd = tree1.applc_begin_ymd
               AND tree2.applc_end_ymd = tree1.applc_end_ymd
               AND tree1.org_busn_code = 'SYM00'
               AND tree1.org_uon = 'Y'
               AND tree1.applc_begin_ymd &lt;= to_char(sysdate, 'YYYYMMDD')
               AND tree1.applc_end_ymd &gt;= to_char(sysdate, 'YYYYMMDD')
	        "/>
-->
        </class>
        <class
              name="TotReport2" table="moumi_tot_report" cacheable="false">
            <query name="CompReports" language="javax.jdo.query.JDOQL">
                <![CDATA[
                      SELECT FROM kr.co.kihyun.beans.entity.TotReport2
                      WHERE
                          isDeleted == false && type == TYPE_REPORT
                          && (process == PROCESS_COMP || process == PROCESS_END
                              || process == PROCESS_NOT)
                ]]>
            </query>
            <query name="RecogReports" language="javax.jdo.query.JDOQL">
                <![CDATA[
                      SELECT FROM kr.co.kihyun.beans.entity.TotReport2
                      WHERE
                          isDeleted == false && type == TYPE_REPORT
                          && recog > RECOG_NOT && recog < RECOG_RETURN
                          && process == TYPE_COMP
                ]]>
            </query>
            <field
                  name="acceptanceCode"
                  persistence-modifier="persistent">
                    <column name="acpt_code" length="200"/>
            </field>
            <field
                  name="totDoc"
                  persistence-modifier="persistent">
                    <column name="doc_id"/>
            </field>
            <field
                  name="tableNum"
                  persistence-modifier="persistent">
                    <column name="table_num" default-value="1"/>
            </field>
            <field
                  name="num"
                  persistence-modifier="persistent"/>
            <field
                  name="mDept"
                  persistence-modifier="persistent">
                    <column name="dept_id" length="10"/>
            </field>
            <field
                  name="mUser"
                  persistence-modifier="persistent">
                    <column name="user_id" length="30"/>
            </field>
            <field
                  name="regDate"
                  persistence-modifier="persistent">
                    <column name="reg_date"/>
            </field>
            <field
                  name="submitDate" cacheable="false"
                  persistence-modifier="persistent">
                    <column name="submit_date"/>
            </field>
            <field
                  name="data"
                  persistence-modifier="persistent"
                  default-fetch-group="false">
                    <column jdbc-type="CLOB" length="204800"/>
            </field>
            <field
                  name="totData"
                  persistence-modifier="persistent"
                  default-fetch-group="false">
                    <column name="tot_data" jdbc-type="CLOB" length="204800"/>
            </field>
            <field
                  name="attachments"
                  persistence-modifier="persistent"
                  default-fetch-group="false"
                  serialized="true">
                    <column jdbc-type="BLOB" length="5242880"/>
            </field>
            <field
                  name="appro"
                  persistence-modifier="persistent">
                    <column default-value="0"/>
            </field>
            <field
                  name="recog" cacheable="false"
                  persistence-modifier="persistent"
                  default-fetch-group="true">
                    <column jdbc-type="INTEGER"/>
            </field>
            <field
                  name="note"
                  persistence-modifier="persistent"
                  default-fetch-group="false">
                    <column jdbc-type="CLOB" length="204800"/>
            </field>
            <field
                  name="isDeleted"
                  persistence-modifier="persistent">
                    <column name="del_type"/>
            </field>
            <field
                  name="type"
                  persistence-modifier="persistent">
                    <column jdbc-type="INTEGER"/>
            </field>
            <field
                  name="process" cacheable="false"
                  persistence-modifier="persistent"
                  default-fetch-group="true">
                    <column name="prss" jdbc-type="INTEGER"/>
            </field>
            <field
                  name="slaveTotDoc"
                  persistence-modifier="persistent">
                    <column name="down_doc_id"/>
            </field>
            <field
                  name="acptDoc"
                  persistence-modifier="persistent">
                    <column name="acpt_doc_code" length="200"/>
            </field>
            <field
                  name="repTotDoc"
                  persistence-modifier="persistent">
                    <column name="rep_doc_id"/>
            </field>
            <field
                  name="assignType"
                  persistence-modifier="persistent">
                    <column name="doc_type" jdbc-type="INTEGER"/>
            </field>
            <field
                  name="currentRepoadm"
                  persistence-modifier="persistent">
                    <column name="current_repoadm_id"/>
            </field>
            <field
                  name="totReportHistories" mapped-by="totReport2"
                  delete-action="cascade"
                  persistence-modifier="persistent">
                    <collection element-type="kr.co.kihyun.beans.entity.TotReportHistory"/>
                    <order>
                        <extension vendor-name="datanucleus" key="list-ordering" value="id DESC"/>
                    </order>
            </field>
            <field
                  name="memos" mapped-by="totReport2"
                  persistence-modifier="persistent">
                    <collection element-type="kr.co.kihyun.beans.entity.Memo"/>
                    <order>
                        <extension vendor-name="datanucleus" key="list-ordering" value="id DESC"/>
                    </order>
            </field>
            <field
                  name="repoadms" mapped-by="totReport2"
                  persistence-modifier="persistent">
                    <collection element-type="kr.co.kihyun.beans.entity.Repoadm"/>
                    <order>
                        <extension vendor-name="datanucleus" key="list-ordering" value="id ASC"/>
                    </order>
            </field>
        </class>
    </package>
</orm>
