--
-- Host: localhost    Database: db_service
-- ------------------------------------------------------


--
-- Table structure for table `com_admin`
--

CREATE TABLE `com_admin` (
  `admin_id` int(11) NOT NULL,
  `admin_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`admin_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `com_admin`
--

INSERT INTO `com_admin` VALUES (1,'pichitchai.bs'),(2,'piya.bo'),(3,'piya'),(4,'tewarit'),(5,'apiwat'),(6,'sataporn.tk'),(7,'techo.kh');

--
-- Table structure for table `com_agencys`
--

CREATE TABLE `com_agencys` (
  `agency_id` int(5) NOT NULL,
  `agency_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `com_agencys`
--

INSERT INTO `com_agencys` VALUES (1,'สำนักงานอธิการบดี'),(2,'คณะเทคโนโลยีการเกษตร'),(3,'คณะบริหารศาสตร์'),(4,'คณะวิทยาศาสตร์และเทคโนโลยีสุขภาพ'),(5,'คณะวิศวกรรมศาสตร์และเทคโนโลยีอุตสาหกรรม'),(6,'คณะศิลปศาสตร์'),(7,'คณะศึกษาศาสตร์และนวัตกรรมการศึกษา'),(8,'สถาบันวิจัยและพัฒนา'),(9,'สำนักส่งเสริมวิชาการและงานทะเบียน'),(10,'หน่วยตรวจสอบภายใน'),(11,'หน่วยงานบ่มเพาะวิสาหกิจ'),(12,'สถาบันภาษา'),(13,'สำนักงานกิจการสภาของมหาวิทยาลัย'),(14,'ศูนย์ความเป็นเลิศด้านผ้าทอพื้นเมืองกาฬสินธุ์'),(15,'สภาคณาจารย์และข้าราชการ');

--
-- Table structure for table `com_agencys_2`
--

CREATE TABLE `com_agencys_2` (
  `agency_id_2` int(5) NOT NULL,
  `agency_name_2` varchar(255) NOT NULL,
  `agency_id` int(5) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `com_agencys_2`
--


--
-- Table structure for table `com_agencys_3`
--

CREATE TABLE `com_agencys_3` (
  `agency_id_3` int(5) NOT NULL,
  `agency_name_3` varchar(255) NOT NULL,
  `agency_id` int(5) NOT NULL,
  `agency_id_2` int(5) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `com_agencys_3`
--


--
-- Table structure for table `com_contact`
--

CREATE TABLE `com_contact` (
  `id` int(5) NOT NULL AUTO_INCREMENT,
  `arkdetail` text CHARACTER SET utf8 NOT NULL,
  `ansdetail` text CHARACTER SET utf8,
  `membername` varchar(20) CHARACTER SET utf8 NOT NULL,
  `dateadd` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `dateans` varchar(20) CHARACTER SET utf8 DEFAULT NULL,
  `email` varchar(30) CHARACTER SET utf8 DEFAULT NULL,
  `std_member` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `com_contact`
--


--
-- Table structure for table `com_devices`
--

CREATE TABLE `com_devices` (
  `id` int(5) NOT NULL,
  `device_name` varchar(50) CHARACTER SET utf8 NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `com_devices`
--

INSERT INTO `com_devices` VALUES (1,'Computer(PC)'),(2,'Notebook'),(3,'Printer'),(4,'Projector'),(5,'Keyboard'),(6,'Mouse'),(7,'Scanner'),(8,'WiFi'),(9,'Network Lan'),(10,'Switch'),(11,'IP-Phone'),(12,'บริการระบบสารสนเทศฯ'),(13,'บริการระบบเครือข่ายคอมพิวเตอร์ฯ'),(14,'บริการอื่น ๆ');

--
-- Table structure for table `com_devices_detail`
--

CREATE TABLE `com_devices_detail` (
  `id` int(5) NOT NULL,
  `item_id` varchar(20) CHARACTER SET utf8 NOT NULL,
  `device_name` varchar(100) CHARACTER SET utf8 NOT NULL,
  `device_status` varchar(20) CHARACTER SET utf8 NOT NULL,
  `count_unit` varchar(20) CHARACTER SET utf8 NOT NULL,
  `device_price` int(10) NOT NULL,
  `device_location` varchar(100) CHARACTER SET utf8 NOT NULL,
  `device_installation` varchar(20) CHARACTER SET utf8 NOT NULL,
  `where_price` varchar(50) CHARACTER SET utf8 NOT NULL,
  `remark` varchar(200) CHARACTER SET utf8 DEFAULT NULL,
  `admin_id` varchar(20) CHARACTER SET utf8 DEFAULT NULL,
  `date_add` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `com_devices_detail`
--


--
-- Table structure for table `com_inform`
--

CREATE TABLE `com_inform` (
  `inform_id` int(5) NOT NULL AUTO_INCREMENT,
  `inform_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `item_id` varchar(100) CHARACTER SET utf8 NOT NULL,
  `rank_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `agency_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `device_name` varchar(255) CHARACTER SET utf8 NOT NULL,
  `inform_location` varchar(100) CHARACTER SET utf8 NOT NULL,
  `job_type` text CHARACTER SET utf8 NOT NULL,
  `inform_detail` text CHARACTER SET utf8 NOT NULL,
  `inform_img` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
  `member_name` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
  `admin_name` varchar(255) CHARACTER SET utf8 NOT NULL,
  `inform_detailrepair` text CHARACTER SET utf8,
  `inform_status` varchar(20) CHARACTER SET utf8 DEFAULT NULL,
  `inform_remark` text CHARACTER SET utf8,
  `date_closeorder` varchar(20) CHARACTER SET utf8 DEFAULT NULL,
  PRIMARY KEY (`inform_id`)
) ENGINE=MyISAM AUTO_INCREMENT=471 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `com_inform`
--



--
-- Table structure for table `com_job_type`
--

CREATE TABLE `com_job_type` (
  `type_id` int(5) NOT NULL,
  `type_name` varchar(20) CHARACTER SET utf8 NOT NULL,
  PRIMARY KEY (`type_id`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `com_job_type`
--

INSERT INTO `com_job_type` VALUES (1,'โปรแกรมคอมพิวเตอร์'),(2,'อุปกรณ์คอมพิวเตอร์'),(3,'ระบบอินเทอร์เน็ต'),(4,'ระบบสารสนเทศ'),(5,'ระบบโทรศัพท์ภายใน '),(6,'บริการอื่น ๆ');

--
-- Table structure for table `com_member`
--

CREATE TABLE `com_member` (
  `mid` int(11) NOT NULL AUTO_INCREMENT,
  `mname` varchar(50) NOT NULL,
  `muser` varchar(50) NOT NULL,
  `mpass` varchar(20) NOT NULL,
  `mlevel` int(1) NOT NULL,
  `mlphone` varchar(50) NOT NULL,
  PRIMARY KEY (`mid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `com_member`
--


--
-- Table structure for table `com_rank`
--

CREATE TABLE `com_rank` (
  `rank_id` int(5) NOT NULL,
  `rank_name` varchar(255) CHARACTER SET utf8 NOT NULL,
  PRIMARY KEY (`rank_id`)
) ENGINE=MyISAM AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `com_rank`
--


--
-- Dumping events for database 'db_service'
--

--
-- Dumping routines for database 'db_service'
--


