Commit d4067093 by mercymodest

feat:- add sql

parent c533ea74
alter table store_card # alter table store_card
alter table store_card # alter table store_card
add deduction_order tinyint(1) default 0 null comment ' 赠送(次数/金额)扣减顺序 0: 最后扣除赠送 1:优先扣除赠送 default:0'; # add deduction_order tinyint(1) default 0 null comment ' 赠送(次数/金额)扣减顺序 0: 最后扣除赠送 1:优先扣除赠送 default:0';
#
alter table user_return_visit # alter table user_return_visit
add img_urls text null comment '图片地址数组'; # add img_urls text null comment '图片地址数组';
#
alter table user_return_visit # alter table user_return_visit
add visit_scripts text null comment '回访话术数组'; # add visit_scripts text null comment '回访话术数组';
#
alter table user_return_visit # alter table user_return_visit
add visit_source tinyint(1) default 0 null comment '回访来源 0:原后台 1:后台 2:教练小程序 default:0'; # add visit_source tinyint(1) default 0 null comment '回访来源 0:原后台 1:后台 2:教练小程序 default:0';
#
alter table user_return_visit # alter table user_return_visit
add visit_staff_uuid bigint null comment '回访人员uuid'; # add visit_staff_uuid bigint null comment '回访人员uuid';
#
alter table user_return_visit # alter table user_return_visit
add visit_staff_name varchar(30) null comment '回访人员姓名'; # add visit_staff_name varchar(30) null comment '回访人员姓名';
CREATE TABLE `card_category` ( # CREATE TABLE `card_category` (
`uuid` VARCHAR(36) NOT NULL COMMENT '主键ID', # `uuid` VARCHAR(36) NOT NULL COMMENT '主键ID',
`category_name` VARCHAR(50) NOT NULL COMMENT '分类名称', # `category_name` VARCHAR(50) NOT NULL COMMENT '分类名称',
`category_type` TINYINT(1) NOT NULL COMMENT '分类类型 0:私教 1:团课 2:小班', # `category_type` TINYINT(1) NOT NULL COMMENT '分类类型 0:私教 1:团课 2:小班',
`priority` INT NOT NULL COMMENT '优先级 越大优先级越高', # `priority` INT NOT NULL COMMENT '优先级 越大优先级越高',
`is_delete` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否删除 0:未删除 1:已删除', # `is_delete` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否删除 0:未删除 1:已删除',
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', # `create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', # `update_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`create_uuid` VARCHAR(36) COMMENT '创建人', # `create_uuid` VARCHAR(36) COMMENT '创建人',
`update_uuid` VARCHAR(36) COMMENT '更新人', # `update_uuid` VARCHAR(36) COMMENT '更新人',
PRIMARY KEY (`uuid`), # PRIMARY KEY (`uuid`),
INDEX `idx_category_type_category_name` (`category_type`, `category_name`), # INDEX `idx_category_type_category_name` (`category_type`, `category_name`),
INDEX `idx_category_name` (`category_name`) # INDEX `idx_category_name` (`category_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='会员卡分类表'; # ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='会员卡分类表';
#
alter table card # alter table card
add card_category_uuid bigint null comment '会员卡分类uuid card_category#uuid'; # add card_category_uuid bigint null comment '会员卡分类uuid card_category#uuid';
### 总后台 新增菜单 ### 总后台 新增菜单
INSERT INTO menus (uuid, company_uuid, name, parent_uuid, sort, create_time, update_time, url, type, classes) # INSERT INTO menus (uuid, company_uuid, name, parent_uuid, sort, create_time, update_time, url, type, classes)
VALUES ('5aeecbdf7b6747889069efa7fa7b7f58', 846782090753224704, '会员卡分类', '9ca04e9509fe11ecbf1c00163e0434b9', 2, # VALUES ('5aeecbdf7b6747889069efa7fa7b7f58', 846782090753224704, '会员卡分类', '9ca04e9509fe11ecbf1c00163e0434b9', 2,
DEFAULT, DEFAULT, '/chain-manage/vip-card-classify', 1, DEFAULT); # DEFAULT, DEFAULT, '/chain-manage/vip-card-classify', 1, DEFAULT);
#
INSERT INTO menus (uuid, company_uuid, name, parent_uuid, sort, create_time, update_time, url, type, classes) # INSERT INTO menus (uuid, company_uuid, name, parent_uuid, sort, create_time, update_time, url, type, classes)
VALUES ('4a14337444e8417eb1b093951000f7f8', 846782090753224704, '新增', '5aeecbdf7b6747889069efa7fa7b7f58', 1, DEFAULT, # VALUES ('4a14337444e8417eb1b093951000f7f8', 846782090753224704, '新增', '5aeecbdf7b6747889069efa7fa7b7f58', 1, DEFAULT,
DEFAULT, DEFAULT, 1, DEFAULT); # DEFAULT, DEFAULT, 1, DEFAULT);
#
INSERT INTO menus (uuid, company_uuid, name, parent_uuid, sort, create_time, update_time, url, type, classes) # INSERT INTO menus (uuid, company_uuid, name, parent_uuid, sort, create_time, update_time, url, type, classes)
VALUES ('1e4839f963c444cea2ee87ff3465a0df', 846782090753224704, '详情', '5aeecbdf7b6747889069efa7fa7b7f58', 2, DEFAULT, # VALUES ('1e4839f963c444cea2ee87ff3465a0df', 846782090753224704, '详情', '5aeecbdf7b6747889069efa7fa7b7f58', 2, DEFAULT,
DEFAULT, DEFAULT, 1, DEFAULT); # DEFAULT, DEFAULT, 1, DEFAULT);
#
INSERT INTO menus (uuid, company_uuid, name, parent_uuid, sort, create_time, update_time, url, type, classes) # INSERT INTO menus (uuid, company_uuid, name, parent_uuid, sort, create_time, update_time, url, type, classes)
VALUES ('818a472d9f2b42b7b22286a5c93484e8', 846782090753224704, '编辑', '5aeecbdf7b6747889069efa7fa7b7f58', 3, DEFAULT, # VALUES ('818a472d9f2b42b7b22286a5c93484e8', 846782090753224704, '编辑', '5aeecbdf7b6747889069efa7fa7b7f58', 3, DEFAULT,
DEFAULT, DEFAULT, 1, DEFAULT); # DEFAULT, DEFAULT, 1, DEFAULT);
#
INSERT INTO menus (uuid, company_uuid, name, parent_uuid, sort, create_time, update_time, url, type, classes) # INSERT INTO menus (uuid, company_uuid, name, parent_uuid, sort, create_time, update_time, url, type, classes)
VALUES ('5e2d0247aac540f5988eb186aaa3313d', 846782090753224704, '删除', '5aeecbdf7b6747889069efa7fa7b7f58', 4, DEFAULT, # VALUES ('5e2d0247aac540f5988eb186aaa3313d', 846782090753224704, '删除', '5aeecbdf7b6747889069efa7fa7b7f58', 4, DEFAULT,
DEFAULT, DEFAULT, 1, DEFAULT); # DEFAULT, DEFAULT, 1, DEFAULT);
INSERT INTO group_menus (menu_uuid, group_uuid, create_time, update_time) # INSERT INTO group_menus (menu_uuid, group_uuid, create_time, update_time)
VALUES ('1e4839f963c444cea2ee87ff3465a0df', '3', DEFAULT, DEFAULT); # VALUES ('1e4839f963c444cea2ee87ff3465a0df', '3', DEFAULT, DEFAULT);
#
INSERT INTO group_menus (menu_uuid, group_uuid, create_time, update_time) # INSERT INTO group_menus (menu_uuid, group_uuid, create_time, update_time)
VALUES ('4a14337444e8417eb1b093951000f7f8', '3', DEFAULT, DEFAULT); # VALUES ('4a14337444e8417eb1b093951000f7f8', '3', DEFAULT, DEFAULT);
#
INSERT INTO group_menus (menu_uuid, group_uuid, create_time, update_time) # INSERT INTO group_menus (menu_uuid, group_uuid, create_time, update_time)
VALUES ('5aeecbdf7b6747889069efa7fa7b7f58', '3', DEFAULT, DEFAULT); # VALUES ('5aeecbdf7b6747889069efa7fa7b7f58', '3', DEFAULT, DEFAULT);
#
INSERT INTO group_menus (menu_uuid, group_uuid, create_time, update_time) # INSERT INTO group_menus (menu_uuid, group_uuid, create_time, update_time)
VALUES ('5e2d0247aac540f5988eb186aaa3313d', '3', DEFAULT, DEFAULT); # VALUES ('5e2d0247aac540f5988eb186aaa3313d', '3', DEFAULT, DEFAULT);
#
INSERT INTO group_menus (menu_uuid, group_uuid, create_time, update_time) # INSERT INTO group_menus (menu_uuid, group_uuid, create_time, update_time)
VALUES ('818a472d9f2b42b7b22286a5c93484e8', '3', DEFAULT, DEFAULT); # VALUES ('818a472d9f2b42b7b22286a5c93484e8', '3', DEFAULT, DEFAULT);
alter table store_card # alter table store_card
add deduction_order_time datetime null comment ' 赠送(次数/金额)扣减顺序 设置时间'; # add deduction_order_time datetime null comment ' 赠送(次数/金额)扣减顺序 设置时间';
#
alter table card_category # alter table card_category
add card_type tinyint null comment '分类适用卡类型: 0:未定义(无任何意义,保证枚举的正常解析)1 :期限卡,2:次数卡,3:储值卡'; # add card_type tinyint null comment '分类适用卡类型: 0:未定义(无任何意义,保证枚举的正常解析)1 :期限卡,2:次数卡,3:储值卡';
#
alter table card_category # alter table card_category
change card_type type tinyint null comment '分类适用卡类型: 0:未定义(无任何意义,保证枚举的正常解析)1 :期限卡,2:次数卡,3:储值卡'; # change card_type type tinyint null comment '分类适用卡类型: 0:未定义(无任何意义,保证枚举的正常解析)1 :期限卡,2:次数卡,3:储值卡';
#
alter table card_category # alter table card_category
add card_type tinyint null comment '会员卡类型,0:未定义 1会员卡,2体验卡'; # add card_type tinyint null comment '会员卡类型,0:未定义 1会员卡,2体验卡';
# alter table store # alter table store
# add is_add_ad tinyint default 0 null comment '是否可新增广告图 0:不可新增 1:可新增 默认:0'; # add is_add_ad tinyint default 0 null comment '是否可新增广告图 0:不可新增 1:可新增 默认:0';
alter table store_schedules_remark # alter table store_schedules_remark
add top_bg text null comment '顶部背景图'; # add top_bg text null comment '顶部背景图';
#
alter table store_schedules_remark # alter table store_schedules_remark
add bottom_bg text null comment '底部背景图'; # add bottom_bg text null comment '底部背景图';
#
alter table store # alter table store
add validity_days int default 10 null comment ' (临到期)有效期天数 默认为 10'; # add validity_days int default 10 null comment ' (临到期)有效期天数 默认为 10';
#
alter table store # alter table store
add card_times int default 5 null comment '(临到期)次数卡次数 默认为 5'; # add card_times int default 5 null comment '(临到期)次数卡次数 默认为 5';
#
alter table card_category # alter table card_category
modify uuid BIGINT not null comment '主键ID'; # modify uuid BIGINT not null comment '主键ID';
INSERT INTO menus (uuid, company_uuid, name, parent_uuid, sort, create_time, update_time, url, type, classes) # INSERT INTO menus (uuid, company_uuid, name, parent_uuid, sort, create_time, update_time, url, type, classes)
VALUES ('53d789d464534cca867a8113115a8092', 846782090753224704, '卡项统计', 'a1a8809f03df11ecbf1c00163e0434b9', 4, # VALUES ('53d789d464534cca867a8113115a8092', 846782090753224704, '卡项统计', 'a1a8809f03df11ecbf1c00163e0434b9', 4,
DEFAULT, DEFAULT, '/data-statistics/card-item', 2, DEFAULT); # DEFAULT, DEFAULT, '/data-statistics/card-item', 2, DEFAULT);
#
INSERT INTO menus (uuid, company_uuid, name, parent_uuid, sort, create_time, update_time, url, type, classes) # INSERT INTO menus (uuid, company_uuid, name, parent_uuid, sort, create_time, update_time, url, type, classes)
VALUES ('ac0c8a7eedd8442c86eafaf0d1fd9ac3', 846782090753224704, '详情', '53d789d464534cca867a8113115a8092', 1, DEFAULT, # VALUES ('ac0c8a7eedd8442c86eafaf0d1fd9ac3', 846782090753224704, '详情', '53d789d464534cca867a8113115a8092', 1, DEFAULT,
DEFAULT, '/data-statistics/card-item/detail', 2, DEFAULT); # DEFAULT, '/data-statistics/card-item/detail', 2, DEFAULT);
#
INSERT INTO menus (uuid, company_uuid, name, parent_uuid, sort, create_time, update_time, url, type, classes) # INSERT INTO menus (uuid, company_uuid, name, parent_uuid, sort, create_time, update_time, url, type, classes)
VALUES ('e77ffce67fa54633ac6b87c0ea693d1b', 846782090753224704, '导出', '53d789d464534cca867a8113115a8092', 2, DEFAULT, # VALUES ('e77ffce67fa54633ac6b87c0ea693d1b', 846782090753224704, '导出', '53d789d464534cca867a8113115a8092', 2, DEFAULT,
DEFAULT, '""', DEFAULT, DEFAULT); # DEFAULT, '""', DEFAULT, DEFAULT);
INSERT INTO group_menus (menu_uuid, group_uuid, create_time, update_time) # INSERT INTO group_menus (menu_uuid, group_uuid, create_time, update_time)
VALUES ('53d789d464534cca867a8113115a8092', '3', DEFAULT, DEFAULT); # VALUES ('53d789d464534cca867a8113115a8092', '3', DEFAULT, DEFAULT);
#
INSERT INTO group_menus (menu_uuid, group_uuid, create_time, update_time) # INSERT INTO group_menus (menu_uuid, group_uuid, create_time, update_time)
VALUES ('ac0c8a7eedd8442c86eafaf0d1fd9ac3', '3', DEFAULT, DEFAULT); # VALUES ('ac0c8a7eedd8442c86eafaf0d1fd9ac3', '3', DEFAULT, DEFAULT);
#
INSERT INTO group_menus (menu_uuid, group_uuid, create_time, update_time) # INSERT INTO group_menus (menu_uuid, group_uuid, create_time, update_time)
VALUES ('e77ffce67fa54633ac6b87c0ea693d1b', '3', DEFAULT, DEFAULT); # VALUES ('e77ffce67fa54633ac6b87c0ea693d1b', '3', DEFAULT, DEFAULT);
alter table user_card # alter table user_card
add main_card_amount decimal(16, 2) null comment '主卡余额'; # add main_card_amount decimal(16, 2) null comment '主卡余额';
alter table user_card # alter table user_card
add gift_amount decimal(16, 2) null comment '赠送余额'; # add gift_amount decimal(16, 2) null comment '赠送余额';
alter table store
modify card_times DECIMAL(10, 2) default 5 null comment '(临到期)次数卡次数 默认为 5';
alter table user_integral_deal
modify title text null comment '项目';
alter table user_card_fee_extension
add user_card_change_logs_uuid BIGINT null comment 'user_card_change_logs#uuid( UserCardChangeLogsPO#operationType 1:发卡 7:续卡 12:卡升级)';
alter table user_card
add user_card_change_logs_uuid BIGINT null comment 'user_card_change_logs#uuid( UserCardChangeLogsPO#operationType 1:发卡 7:续卡 12:卡升级)';
create index user_card_user_card_change_logs_uuid_index
on user_card (user_card_change_logs_uuid);
create index user_card_fee_extension_user_card_change_logs_uuid_index
on user_card_fee_extension (user_card_change_logs_uuid);
alter table user_management_records
modify year_month_str varchar(30) not null comment '年月';
alter table user_management_records
add store_uuid BIGINT null comment '门店 uuid';
create index user_management_records_store_uuid_index # alter table store
on user_management_records (store_uuid); # modify card_times DECIMAL(10, 2) default 5 null comment '(临到期)次数卡次数 默认为 5';
# alter table user_integral_deal
# modify title text null comment '项目';
# alter table user_card_fee_extension
# add user_card_change_logs_uuid BIGINT null comment 'user_card_change_logs#uuid( UserCardChangeLogsPO#operationType 1:发卡 7:续卡 12:卡升级)';
# alter table user_card
# add user_card_change_logs_uuid BIGINT null comment 'user_card_change_logs#uuid( UserCardChangeLogsPO#operationType 1:发卡 7:续卡 12:卡升级)';
#
# create index user_card_user_card_change_logs_uuid_index
# on user_card (user_card_change_logs_uuid);
# create index user_card_fee_extension_user_card_change_logs_uuid_index
# on user_card_fee_extension (user_card_change_logs_uuid);
#
#
# alter table user_management_records
# modify year_month_str varchar(30) not null comment '年月';
#
# alter table user_management_records
# add store_uuid BIGINT null comment '门店 uuid';
#
# create index user_management_records_store_uuid_index
# on user_management_records (store_uuid);
INSERT INTO group_menus (menu_uuid, group_uuid, create_time, update_time) INSERT INTO group_menus (menu_uuid, group_uuid, create_time, update_time)
VALUES ('53d789d464534cca867a8113115a8092', '63e78524f7ae4ae082be7aba95094247', DEFAULT, DEFAULT); VALUES ('53d789d464534cca867a8113115a8092', '63e78524f7ae4ae082be7aba95094247', DEFAULT, DEFAULT);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment