/*
SQLyog Ultimate v11.33 (64 bit)
MySQL - 5.7.19 : Database - wisfarm_video
*********************************************************************
*/


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

USE `wisfarm_video`;

/*Table structure for table `ys7_device_ipc` */

DROP TABLE IF EXISTS `ys7_device_ipc`;

CREATE TABLE `ys7_device_ipc` (
  `di_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `device_serial` varchar(64) DEFAULT NULL,
  `device_name` varchar(64) DEFAULT NULL,
  `validate_code` varchar(32) DEFAULT NULL,
  `farm_id` bigint(20) DEFAULT NULL,
  `create_date_time` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`di_id`)
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8;

/*Table structure for table `ys7_sub_account` */

DROP TABLE IF EXISTS `ys7_sub_account`;

CREATE TABLE `ys7_sub_account` (
  `sa_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `account_id` varchar(32) DEFAULT NULL,
  `access_token` varchar(512) DEFAULT NULL,
  `expire_date_time` bigint(20) DEFAULT NULL,
  `farm_id` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`sa_id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 ;

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