-- Deploy gaia:device_category_add to mysql

BEGIN;

-- 基础品类表定义.
CREATE TABLE `category_basic_category` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `is_online` tinyint(1) NOT NULL DEFAULT '0',
  `create_time` datetime(6) NOT NULL,
  `update_time` datetime(6) NOT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT '0',
  `name` varchar(60) NOT NULL,
  `tag_ids` varchar(255) NOT NULL,
  `img_url` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- 设备品类
CREATE TABLE `api_device_category` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `is_online` tinyint(1) NOT NULL DEFAULT '0',
  `create_time` datetime(6) NOT NULL,
  `update_time` datetime(6) NOT NULL,
  `is_deleted` tinyint(1) NOT NULL DEFAULT '0',
  `device_id` varchar(60) NOT NULL,
  `category_ids` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `dc_device_id` (`device_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


insert category_basic_category(is_online, create_time, update_time, name, tag_ids, img_url) value(1, current_timestamp(), current_timestamp(), '大眼睛', '15,17,63,975,3459,85,86,87,5057,88,89,97,793,795,95,100,890,2923,2417', 'https://heras.igengmei.com/slide/2019/06/27/5089f850ee');
insert category_basic_category(is_online, create_time, update_time, name, tag_ids, img_url) value(1, current_timestamp(), current_timestamp(), '瘦脸针', '2033,117,237,842,5077', 'https://heras.igengmei.com/slide/2019/06/27/22eeb30847');
insert category_basic_category(is_online, create_time, update_time, name, tag_ids, img_url) value(1, current_timestamp(), current_timestamp(), '玻尿酸', '1055,97,99,115,121,123,137,141,152,197,243,776,777,804,868,885,954,5074', 'https://heras.igengmei.com/slide/2019/06/27/93437524cc');
insert category_basic_category(is_online, create_time, update_time, name, tag_ids, img_url) value(1, current_timestamp(), current_timestamp(), '植发', '983,37,251,174', 'https://heras.igengmei.com/slide/2019/06/27/1f1ecf8b0a');
insert category_basic_category(is_online, create_time, update_time, name, tag_ids, img_url) value(1, current_timestamp(), current_timestamp(), '法令纹', '3039,199,200,201,787', 'https://heras.igengmei.com/slide/2019/06/27/cb1b50909c');
insert category_basic_category(is_online, create_time, update_time, name, tag_ids, img_url) value(1, current_timestamp(), current_timestamp(), '牙齿美容', '53,55,154,155,156,157,2458,2450,2451,255,2453,2454,2455,5070,7129', 'https://heras.igengmei.com/slide/2019/06/27/9da5532550');
insert category_basic_category(is_online, create_time, update_time, name, tag_ids, img_url) value(1, current_timestamp(), current_timestamp(), '丰胸', '66,212,241,785,954,6145', 'https://heras.igengmei.com/slide/2019/06/27/9ad379660d');
insert category_basic_category(is_online, create_time, update_time, name, tag_ids, img_url) value(1, current_timestamp(), current_timestamp(), '年轻化', '922,61,62,79,933,4422,120,196,197,198,199,200,201,202,203,204,205,206,207,243,244,787,822,872,873,875,926,928,930,931,1801,2063,2352,2866,3039,5072,5073', 'https://heras.igengmei.com/slide/2019/06/27/fe5bdb7bd2');
insert category_basic_category(is_online, create_time, update_time, name, tag_ids, img_url) value(1, current_timestamp(), current_timestamp(), '菲洛嘉', '4437', 'https://heras.igengmei.com/slide/2019/06/27/e97b4d6279');
insert category_basic_category(is_online, create_time, update_time, name, tag_ids, img_url) value(1, current_timestamp(), current_timestamp(), '小翘鼻', '21,26,896,3285,114,115,232,233,234,782,796,806,2073,2924,2925,3038,253,107,108,109,110,111,810,2929,803,804,805,7151,22,23,112,116,797,798,897,2926,2927', 'https://heras.igengmei.com/slide/2019/06/27/a0abe44023');
insert category_basic_category(is_online, create_time, update_time, name, tag_ids, img_url) value(1, current_timestamp(), current_timestamp(), '祛黑头', '41,188,775,1703,2939', 'https://heras.igengmei.com/slide/2019/06/27/8647089178');
insert category_basic_category(is_online, create_time, update_time, name, tag_ids, img_url) value(1, current_timestamp(), current_timestamp(), '瘦腿', '892,893,229,238,982,237,838,911', 'https://heras.igengmei.com/slide/2019/06/27/9014499dc0');
insert category_basic_category(is_online, create_time, update_time, name, tag_ids, img_url) value(1, current_timestamp(), current_timestamp(), '祛斑', '35,185,915,916,2936,2937,2938,5064,187', 'https://heras.igengmei.com/slide/2019/06/27/430b87ac85');
insert category_basic_category(is_online, create_time, update_time, name, tag_ids, img_url) value(1, current_timestamp(), current_timestamp(), '瘦身', '4,32,38,72,84,221,892,893,894,5061,223,228,230,906,2933,236,811,985,986,2934,5868,5870,843,844,845,240,836,837,118,223,224,238,240,774,229,238,982,237,838,911,224,841,842,5063', 'https://heras.igengmei.com/slide/2019/06/27/8610c83425');
insert category_basic_category(is_online, create_time, update_time, name, tag_ids, img_url) value(1, current_timestamp(), current_timestamp(), '美白', '47,180,187,246,821,825,1966,2072,5065', 'https://heras.igengmei.com/slide/2019/06/27/5917a8dff3');
insert category_basic_category(is_online, create_time, update_time, name, tag_ids, img_url) value(1, current_timestamp(), current_timestamp(), '脱毛', '2663,2947,865,36,171,181,2065,2066,2067,2068,2948,6160', 'https://heras.igengmei.com/slide/2019/06/27/ab9da239c8');
insert category_basic_category(is_online, create_time, update_time, name, tag_ids, img_url) value(1, current_timestamp(), current_timestamp(), '祛痘', '34,258,912,914,1324,2108,2935,5063', 'https://heras.igengmei.com/slide/2019/06/27/1df5d7f2d0');
insert category_basic_category(is_online, create_time, update_time, name, tag_ids, img_url) value(1, current_timestamp(), current_timestamp(), '酒窝', '31,134', 'https://heras.igengmei.com/slide/2019/06/27/05b26fa720');
insert category_basic_category(is_online, create_time, update_time, name, tag_ids, img_url) value(1, current_timestamp(), current_timestamp(), '私密', '10,955,956,161,162,163,164,165,166,167,767,768,959,960,4282,6684,7091,7175,7176,7177,7178,7179,164,866,867', 'https://heras.igengmei.com/slide/2019/06/27/e6c3bdcd2b');
insert category_basic_category(is_online, create_time, update_time, name, tag_ids, img_url) value(1, current_timestamp(), current_timestamp(), '脂肪填充', '1024,2112,6012,6231,7117,114,120,125,135,136,140,153,793,805,886,1890,225,241,114,125,135,140,153,198,244', 'https://heras.igengmei.com/slide/2019/06/27/65dad73947');
insert category_basic_category(is_online, create_time, update_time, name, tag_ids, img_url) value(1, current_timestamp(), current_timestamp(), '半永久', '1080,2054,1370,2055,2056,2057,2058,2954,3035,5079', 'https://heras.igengmei.com/slide/2019/06/27/0f7f2116d1');

COMMIT;
