-- Deploy gaia:bdtransfer_2020_04_08_add_auto_assign to mysql

BEGIN;

-- ----------------------------
-- Table structure for hera_bdtransfer_assign_record_copy1
-- ----------------------------
CREATE TABLE `hera_bdtransfer_assign_record_copy1` (
  `id` int NOT NULL AUTO_INCREMENT,
  `count` int NOT NULL,
  `date` date NOT NULL,
  `user_id` int NOT NULL,
  PRIMARY KEY (`id`),
  KEY `hera_bdtransfer_assign_record_user_id_0100880d_fk_auth_user_id` (`user_id`),
  CONSTRAINT `hera_bdtransfer_assign_record_copy1_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`)
);


-- ----------------------------
-- Table structure for hera_bdtransfer_auto_assignor
-- ----------------------------
CREATE TABLE `hera_bdtransfer_auto_assignor` (
  `id` int NOT NULL AUTO_INCREMENT,
  `ding` varchar(20) NOT NULL,
  `top` int NOT NULL,
  `low` int NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `is_f` tinyint(1) NOT NULL,
  `user_id` int NOT NULL,
  PRIMARY KEY (`id`),
  KEY `hera_bdtransfer_auto_assignor_user_id_e47aa04d_fk_auth_user_id` (`user_id`),
  CONSTRAINT `hera_bdtransfer_auto_assignor_user_id_e47aa04d_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`)
);


-- ----------------------------
-- Table structure for hera_schedule_time
-- ----------------------------
CREATE TABLE `hera_schedule_time` (
  `id` int NOT NULL AUTO_INCREMENT,
  `morning_start` int NOT NULL,
  `morning_end` int NOT NULL,
  `night_start` int NOT NULL,
  `night_end` int NOT NULL,
  PRIMARY KEY (`id`)
);


-- ----------------------------
-- Table structure for hera_transfer_rate
-- ----------------------------
CREATE TABLE `hera_transfer_rate` (
  `id` int NOT NULL AUTO_INCREMENT,
  `rate` double NOT NULL,
  `update` date NOT NULL,
  `user_id` int NOT NULL,
  PRIMARY KEY (`id`),
  KEY `hera_transfer_rate_user_id_87e05a6e_fk_auth_user_id` (`user_id`),
  CONSTRAINT `hera_transfer_rate_user_id_87e05a6e_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`)
);


-- ----------------------------
-- Table structure for hera_transfer_user_schedule
-- ----------------------------
CREATE TABLE `hera_transfer_user_schedule` (
  `id` int NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `morning` tinyint(1) NOT NULL,
  `night` tinyint(1) NOT NULL,
  `user_id` int NOT NULL,
  PRIMARY KEY (`id`),
  KEY `hera_transfer_user_schedule_user_id_9fc7e9ec_fk_auth_user_id` (`user_id`),
  CONSTRAINT `hera_transfer_user_schedule_user_id_9fc7e9ec_fk_auth_user_id` FOREIGN KEY (`user_id`) REFERENCES `auth_user` (`id`)
);


COMMIT;
