-- Deploy gaia:2019_09_10_add_scan_skin_table to mysql

BEGIN;

CREATE TABLE `api_skin_age` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `content` varchar(32) NOT NULL,
    `max_age` integer NOT NULL,
    `min_age` integer NOT NULL,
    `is_online` bool NOT NULL,
    `created_time` datetime(6) NOT NULL,
    `updated_time` datetime(6) NOT NULL
)
;
CREATE TABLE `api_skin_oil_type` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `t_zone` integer NOT NULL,
    `chin` integer NOT NULL,
    `cheek` integer NOT NULL,
    `analysis` varchar(256) NOT NULL,
    `polymer_id` integer NOT NULL,
    `community_content` varchar(64) NOT NULL,
    `service_content` varchar(64) NOT NULL,
    `is_online` bool NOT NULL,
    `created_time` datetime(6) NOT NULL,
    `updated_time` datetime(6) NOT NULL
)
;
CREATE TABLE `api_heitou_type` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `heitou_level` integer NOT NULL,
    `maokong_level` integer NOT NULL,
    `analysis` varchar(256) NOT NULL,
    `polymer_id` integer NOT NULL,
    `community_content` varchar(64) NOT NULL,
    `service_content` varchar(64) NOT NULL,
    `is_online` bool NOT NULL,
    `created_time` datetime(6) NOT NULL,
    `updated_time` datetime(6) NOT NULL
)
;
CREATE TABLE `api_acne_type` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `level` integer NOT NULL,
    `analysis` varchar(256) NOT NULL,
    `polymer_id` integer NOT NULL,
    `community_content` varchar(64) NOT NULL,
    `service_content` varchar(64) NOT NULL,
    `is_online` bool NOT NULL,
    `created_time` datetime(6) NOT NULL,
    `updated_time` datetime(6) NOT NULL
)
;
CREATE TABLE `api_smooth_level` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `level` integer NOT NULL,
    `level_image` varchar(256) NOT NULL,
    `image_desc` varchar(256) NOT NULL,
    `analysis` varchar(256) NOT NULL,
    `polymer_id` integer NOT NULL,
    `community_content` varchar(64) NOT NULL,
    `service_content` varchar(64) NOT NULL,
    `is_online` bool NOT NULL,
    `created_time` datetime(6) NOT NULL,
    `updated_time` datetime(6) NOT NULL
)
;
CREATE TABLE `api_heiyanquan_type` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `pigmental` integer NOT NULL,
    `vascular` integer NOT NULL,
    `struct` integer NOT NULL,
    `analysis` varchar(256) NOT NULL,
    `polymer_id` integer NOT NULL,
    `community_content` varchar(64) NOT NULL,
    `service_content` varchar(64) NOT NULL,
    `is_online` bool NOT NULL,
    `created_time` datetime(6) NOT NULL,
    `updated_time` datetime(6) NOT NULL
)
;
CREATE TABLE `api_skin_color_type` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `color_level` integer NOT NULL,
    `color_image` varchar(256) NOT NULL,
    `color_desc` varchar(256) NOT NULL,
    `color_temperature` integer NOT NULL,
    `analysis` varchar(256) NOT NULL,
    `polymer_id` integer NOT NULL,
    `community_content` varchar(64) NOT NULL,
    `service_content` varchar(64) NOT NULL,
    `is_online` bool NOT NULL,
    `created_time` datetime(6) NOT NULL,
    `updated_time` datetime(6) NOT NULL
)
;

COMMIT;
