/*
SQLyog Ultimate v10.00 Beta1
MySQL - 5.5.35-0ubuntu0.13.10.2 : Database - sos
*********************************************************************
*/


/*!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*/`sos` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */;

USE `sos`;

/*Table structure for table `admin_log` */

DROP TABLE IF EXISTS `admin_log`;

CREATE TABLE `admin_log` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `session_id` varchar(32) DEFAULT '',
  `admin_user_id` tinyint(10) DEFAULT NULL,
  `ip_address` varchar(15) DEFAULT NULL,
  `times` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

/*Data for the table `admin_log` */

/*Table structure for table `admin_user` */

DROP TABLE IF EXISTS `admin_user`;

CREATE TABLE `admin_user` (
  `admin_user_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
  `admin_user_name` varchar(50) DEFAULT NULL,
  `admin_user_description` varchar(255) DEFAULT NULL,
  `admin_user_username` varchar(255) DEFAULT NULL,
  `admin_user_password` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`admin_user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

/*Data for the table `admin_user` */

insert  into `admin_user`(`admin_user_id`,`admin_user_name`,`admin_user_description`,`admin_user_username`,`admin_user_password`) values (1,'Administrator','Administrator','admin','21232f297a57a5a743894a0e4a801fc3');

/*Table structure for table `case` */

DROP TABLE IF EXISTS `case`;

CREATE TABLE `case` (
  `case_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `case_customer_id` int(11) NOT NULL DEFAULT '0',
  `case_reference` varchar(15) COLLATE utf8_unicode_ci DEFAULT NULL,
  `case_type` enum('HDD','Flash/SSD','RAID','Mobile') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'HDD',
  `case_hdd_brand` enum('WESTERN DIGITAL','SEAGATE','IBM/HITACHI','SAMSUNG','TOSHIBA','FUJITSU','MAXTOR') COLLATE utf8_unicode_ci DEFAULT NULL,
  `case_hdd_format` enum('1.8"','2.5"','3.5"') COLLATE utf8_unicode_ci NOT NULL DEFAULT '2.5"',
  `case_hdd_rpm` enum('7200','5400','5900','15000','10000') COLLATE utf8_unicode_ci NOT NULL DEFAULT '5400',
  `case_hdd_interface` enum('IDE','SATA','USB','SAS/SCSI','SSD/FLASH') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'SATA',
  `case_hdd_capacity` int(10) unsigned NOT NULL DEFAULT '0',
  `case_hdd_model` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `case_hdd_sn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `case_hdd_parameters` text COLLATE utf8_unicode_ci,
  `case_case_description` text COLLATE utf8_unicode_ci,
  `case_solution_description` text COLLATE utf8_unicode_ci,
  `case_earned` decimal(10,2) NOT NULL DEFAULT '0.00',
  `case_spent` decimal(10,2) NOT NULL DEFAULT '0.00',
  `case_date_open` date NOT NULL DEFAULT '0000-00-00',
  `case_date_last_modif` date NOT NULL DEFAULT '0000-00-00',
  `case_date_close` date NOT NULL DEFAULT '0000-00-00',
  `case_status` enum('Open','Resolved','Not resolved') COLLATE utf8_unicode_ci DEFAULT NULL,
  `case_remark` text COLLATE utf8_unicode_ci,
  PRIMARY KEY (`case_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

/*Data for the table `case` */

/*Table structure for table `case_file` */

DROP TABLE IF EXISTS `case_file`;

CREATE TABLE `case_file` (
  `case_file_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `case_id` int(11) NOT NULL DEFAULT '0',
  `case_file_path` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`case_file_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

/*Data for the table `case_file` */

/*Table structure for table `customer` */

DROP TABLE IF EXISTS `customer`;

CREATE TABLE `customer` (
  `customer_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `customer_type` enum('Person','Company','Government') COLLATE utf8_unicode_ci DEFAULT NULL,
  `customer_firstname` varchar(35) COLLATE utf8_unicode_ci DEFAULT NULL,
  `customer_lastname` varchar(35) COLLATE utf8_unicode_ci DEFAULT NULL,
  `customer_company` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `customer_tel` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `customer_email` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `customer_find_us` enum('Google','Facebook','Friends','Search Engine','Other') COLLATE utf8_unicode_ci DEFAULT NULL,
  `customer_remark` text COLLATE utf8_unicode_ci,
  PRIMARY KEY (`customer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

/*Data for the table `customer` */

/*Table structure for table `product_stock` */

DROP TABLE IF EXISTS `product_stock`;

CREATE TABLE `product_stock` (
  `product_stock_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `product_stock_brand` enum('WESTERN DIGITAL','SEAGATE','IBM/HITACHI','SAMSUNG','TOSHIBA','FUJITSU','MAXTOR') COLLATE utf8_unicode_ci DEFAULT NULL,
  `product_stock_format` enum('1.8"','2.5"','3.5"') COLLATE utf8_unicode_ci NOT NULL DEFAULT '2.5"',
  `product_stock_rpm` enum('7200','5400','5900','15000','10000') COLLATE utf8_unicode_ci NOT NULL DEFAULT '5400',
  `product_stock_interface` enum('IDE','SATA','USB','SAS/SCSI','SSD/FLASH') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'SATA',
  `product_stock_capacity` int(11) NOT NULL DEFAULT '0',
  `product_stock_model` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `product_stock_sn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `product_stock_parameters` text COLLATE utf8_unicode_ci,
  `product_stock_parts` enum('HDD','PCB','HDA') COLLATE utf8_unicode_ci DEFAULT NULL,
  `product_stock_qty` tinyint(4) NOT NULL DEFAULT '0',
  `product_stock_pprice` decimal(10,2) NOT NULL DEFAULT '0.00',
  `product_stock_remark` text COLLATE utf8_unicode_ci,
  PRIMARY KEY (`product_stock_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

/*Data for the table `product_stock` */

/*!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 */;
