-- 
-- MosP - Mind Open Source Project    http://www.mosp.jp/
-- Copyright (C) MIND Co., Ltd.       http://www.e-mind.co.jp/
-- 
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License
-- as published by the Free Software Foundation; either version 2
-- of the License, or (at your option) any later version.
-- 
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.
-- 
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-- 
--
-- Table structure for table `CM_CODE`
--

DROP TABLE IF EXISTS `CM_CODE`;
CREATE TABLE `CM_CODE` (
  `T_ID` varchar(10) NOT NULL default '' COMMENT 'コード区分',
  `T_CODE` varchar(8) NOT NULL default '' COMMENT 'コード',
  `T_NAME` varchar(16) NOT NULL default '' COMMENT 'コード名称',
  `VIEW_INDEX` int(3) NOT NULL default '0' COMMENT '勤怠表示順',
  `DELETE_FLAG` int(1) NOT NULL default '0' COMMENT '削除フラグ',
  `INSERT_DATE` timestamp NOT NULL default '1971-01-01 00:00:00' COMMENT '作成日',
  `INSERT_USER` varchar(10) NOT NULL default '' COMMENT '作成者',
  `UPDATE_DATE` timestamp NOT NULL default '1971-01-01 00:00:00' COMMENT '更新日',
  `UPDATE_USER` varchar(10) NOT NULL default '' COMMENT '更新者',
  PRIMARY KEY  (`T_ID`,`T_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=cp932 COMMENT='コードマスタ';

--
-- Table structure for table `CM_USER`
--

DROP TABLE IF EXISTS `CM_USER`;
CREATE TABLE `CM_USER` (
  `USER_ID` varchar(10) NOT NULL default '' COMMENT 'ユーザーID',
  `PASSWORD` varchar(32) NOT NULL default '' COMMENT 'パスワード',
  `K_CODE` varchar(10) NOT NULL default '' COMMENT '社員コード',
  `USER_NAME` varchar(16) NOT NULL default '' COMMENT 'ユーザー名',
  `AUTHORITY` varchar(2) NOT NULL default '' COMMENT 'プログラム利用権限',
  `DATA_LEVEL` int(2) NOT NULL default '0' COMMENT 'データ参照レベル',
  `CHANGE_PASS` date NOT NULL default '1971-01-01' COMMENT 'パスワード変更日',
  `DELETE_FLAG` int(1) NOT NULL default '0' COMMENT '削除フラグ',
  `INSERT_DATE` timestamp NOT NULL default '1970-12-29 18:00:00' COMMENT '作成日',
  `INSERT_USER` varchar(10) NOT NULL default '' COMMENT '作成者',
  `UPDATE_DATE` timestamp NOT NULL default '1970-12-29 18:00:00' COMMENT '更新日',
  `UPDATE_USER` varchar(10) NOT NULL default '' COMMENT '更新者',
  PRIMARY KEY  (`USER_ID`),
  KEY `IDX1_UM_USER` (`K_CODE`(6))
) ENGINE=InnoDB DEFAULT CHARSET=cp932 COMMENT='ユーザーマスタ';

--
-- Table structure for table `CT_ACCOUNT`
--

DROP TABLE IF EXISTS `CT_ACCOUNT`;
CREATE TABLE `CT_ACCOUNT` (
  `USER_ID` varchar(10) NOT NULL default '' COMMENT 'ユーザーID',
  `ATTEMPT` int(2) NOT NULL default '0' COMMENT '試行回数',
  `UPDATE_DATE` timestamp NOT NULL default '1971-01-01 00:00:00' COMMENT '更新日',
  PRIMARY KEY  (`USER_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=cp932 COMMENT='アカウント管理';

