/*
SQLyog Ultimate - MySQL GUI v8.2 
MySQL - 5.0.22 : Database - ocsmgr
*********************************************************************
*/

`OCACL`(
/*!40101 SET NAMES utf8 */;

/*!40101 SET SQL_MODE=''*/;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`ocsmgr` /*!40100 DEFAULT CHARACTER SET euckr */;

USE `ocsmgr`;

/*Table structure for table `OCACL` */

DROP TABLE IF EXISTS `OCACL`;

CREATE TABLE `OCACL` (
  `ACLID` varchar(30) NOT NULL,
  `TYPE` char(1) NOT NULL,
  `SADATE` char(8) default NULL,
  `SATIME` char(4) default NULL,
  `EADATE` char(8) default NULL,
  `EATIME` char(4) default NULL,
  `SATSUN` char(4) default NULL,
  `EATSUN` char(4) default NULL,
  `SATMON` char(4) default NULL,
  `EATMON` char(4) default NULL,
  `SATTUE` char(4) default NULL,
  `EATTUE` char(4) default NULL,
  `SATWED` char(4) default NULL,
  `EATWED` char(4) default NULL,
  `SATTHU` char(4) default NULL,
  `EATTHU` char(4) default NULL,
  `SATFRI` char(4) default NULL,
  `EATFRI` char(4) default NULL,
  `SATSAT` char(4) default NULL,
  `EATSAT` char(4) default NULL,
  `REMARK` varchar(30) default NULL,
  PRIMARY KEY  (`ACLID`)
) ENGINE=MyISAM DEFAULT CHARSET=euckr;

/*Data for the table `OCACL` */

/*Table structure for table `OCIPAccess` */

DROP TABLE IF EXISTS `OCIPAccess`;

CREATE TABLE `OCIPAccess` (
  `PCIP` varchar(15) NOT NULL,
  `ACLID` varchar(30) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=euckr;

/*Data for the table `OCIPAccess` */

/*Table structure for table `OCLUAccess` */

DROP TABLE IF EXISTS `OCLUAccess`;

CREATE TABLE `OCLUAccess` (
  `PU` varchar(8) default NULL,
  `LU` varchar(8) NOT NULL,
  `ACLID` varchar(30) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=euckr;

/*Data for the table `OCLUAccess` */

/*Table structure for table `OCPCInfo` */

DROP TABLE IF EXISTS `OCPCInfo`;

CREATE TABLE `OCPCInfo` (
  `PCIP` varchar(15) NOT NULL,
  `PCNAME` varchar(20) default NULL,
  `MEMORY` varchar(20) default NULL,
  `CPU` varchar(50) default NULL,
  `OTVER` varchar(20) default NULL,
  `FORMUDATE` char(8) default NULL,
  PRIMARY KEY  (`PCIP`)
) ENGINE=MyISAM DEFAULT CHARSET=euckr;

/*Data for the table `OCPCInfo` */

/*Table structure for table `OCReserve` */

DROP TABLE IF EXISTS `OCReserve`;

CREATE TABLE `OCReserve` (
  `GWIP` varchar(15) NOT NULL,
  `DATE` char(12) NOT NULL,
  `SEQ` char(2) NOT NULL,
  `TYPE` char(1) default NULL,
  `DONE` char(1) default NULL,
  PRIMARY KEY  (`GWIP`,`DATE`,`SEQ`)
) ENGINE=MyISAM DEFAULT CHARSET=euckr;

/*Data for the table `OCReserve` */

/*Table structure for table `OCSession` */

DROP TABLE IF EXISTS `OCSession`;

CREATE TABLE `OCSession` (
  `DT` char(8) NOT NULL,
  `PU` varchar(8) NOT NULL,
  `LU` varchar(8) NOT NULL,
  `ONTIME` char(14) NOT NULL,
  `PCIP` varchar(15) NOT NULL,
  `APP` varchar(20) default NULL,
  `OFFTIME` char(14) default NULL,
  `TIME` int(11) default NULL,
  `SEND` int(7) default NULL,
  `RECV` int(7) default NULL,
  PRIMARY KEY  (`DT`,`PU`,`LU`,`ONTIME`),
  KEY `PCIP` (`PCIP`)
) ENGINE=MyISAM DEFAULT CHARSET=euckr;

/*Data for the table `OCSession` */

/*Table structure for table `OCStatus` */

DROP TABLE IF EXISTS `OCStatus`;

CREATE TABLE `OCStatus` (
  `GWIP` varchar(15) NOT NULL,
  `PU` varchar(8) NOT NULL,
  `LUNO` int(5) NOT NULL,
  `LU` varchar(8) default NULL,
  `DEV` varchar(10) default NULL,
  `PCIP` varchar(15) default NULL,
  `SS` char(1) default NULL,
  `LS` char(1) default NULL,
  `PARTNERLU` varchar(8) default NULL,
  `PROTOCOL` varchar(8) default NULL,
  `SIP` varchar(15) default NULL,
  PRIMARY KEY  (`GWIP`,`PU`,`LUNO`)
) ENGINE=MyISAM DEFAULT CHARSET=euckr;

/*Data for the table `OCStatus` */

/*Table structure for table `OCUser` */

DROP TABLE IF EXISTS `OCUser`;

CREATE TABLE `OCUser` (
  `ID` varchar(12) NOT NULL,
  `NAME` varchar(12) default NULL,
  `PASSWORD` varchar(12) default NULL,
  `GRP` char(1) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=euckr;


create table OCUSEAccess (
    PU          varchar(8) default null,
    LU          varchar(8) not null,
    PCIP        varchar(15) not null,
    USEFLAG     char(1) not null default 'Y',
    AUTOKILL    char(1) not null default 'Y'
) ENGINE=MyISAM DEFAULT CHARSET=euckr;

/*Data for the table `OCUser` */

insert  into `OCUser`(`ID`,`NAME`,`PASSWORD`,`GRP`) values ('ocsadmin',NULL,'ocsadmin','A'),('monitor',NULL,'monitor','M');

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
