# 2026/02/10
ALTER TABLE `pet_system`.`sys_menu` ADD COLUMN `platform_id` tinyint NOT NULL COMMENT '平台ID';
ALTER TABLE `pet_system`.`sys_user` ADD COLUMN `platform_id` tinyint NOT NULL COMMENT '平台ID';

# 2026/02/11
-- 菜单 SQL
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2021464069248733185, '商户分类', '6', '1', 'tenantCategories', 'system/tenantCategories/index', 1, 0, 'C', '0', '0', 'system:tenantCategories:list', '#', 103, 1, sysdate(), null, null, '商户分类菜单', 0);

-- 按钮 SQL
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2021464069248733186, '商户分类查询', 2021464069248733185, '1',  '#', '', 1, 0, 'F', '0', '0', 'system:tenantCategories:query',        '#', 103, 1, sysdate(), null, null, '', 0);

insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2021464069248733187, '商户分类新增', 2021464069248733185, '2',  '#', '', 1, 0, 'F', '0', '0', 'system:tenantCategories:add',          '#', 103, 1, sysdate(), null, null, '', 0);

insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2021464069248733188, '商户分类修改', 2021464069248733185, '3',  '#', '', 1, 0, 'F', '0', '0', 'system:tenantCategories:edit',         '#', 103, 1, sysdate(), null, null, '', 0);

insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2021464069248733189, '商户分类删除', 2021464069248733185, '4',  '#', '', 1, 0, 'F', '0', '0', 'system:tenantCategories:remove',       '#', 103, 1, sysdate(), null, null, '', 0);

insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2021464069248733190, '商户分类导出', 2021464069248733185, '5',  '#', '', 1, 0, 'F', '0', '0', 'system:tenantCategories:export',       '#', 103, 1, sysdate(), null, null, '', 0);

ALTER TABLE `pet_system`.`sys_tenant` ADD COLUMN `logo` bigint COMMENT '品牌LOGO';

ALTER TABLE `pet_system`.`sys_tenant` ADD COLUMN `admin` bigint NOT NULL COMMENT '管理员';
ALTER TABLE `pet_system`.`sys_role` ADD COLUMN `platform_id` tinyint NOT NULL COMMENT '平台ID';

# 2026/02/24
-- 菜单 SQL
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2026190519642099713, '门店管理', '6', '1', 'store', 'system/store/index', 1, 0, 'C', '0', '0', 'system:store:list', '#', 103, 1, sysdate(), null, null, '门店管理菜单', 0);

-- 按钮 SQL
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2026190519642099714, '门店管理查询', 2026190519642099713, '1',  '#', '', 1, 0, 'F', '0', '0', 'system:store:query',        '#', 103, 1, sysdate(), null, null, '', 0);

insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2026190519642099715, '门店管理新增', 2026190519642099713, '2',  '#', '', 1, 0, 'F', '0', '0', 'system:store:add',          '#', 103, 1, sysdate(), null, null, '', 0);

insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2026190519642099716, '门店管理修改', 2026190519642099713, '3',  '#', '', 1, 0, 'F', '0', '0', 'system:store:edit',         '#', 103, 1, sysdate(), null, null, '', 0);

insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2026190519642099717, '门店管理删除', 2026190519642099713, '4',  '#', '', 1, 0, 'F', '0', '0', 'system:store:remove',       '#', 103, 1, sysdate(), null, null, '', 0);

insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2026190519642099718, '门店管理导出', 2026190519642099713, '5',  '#', '', 1, 0, 'F', '0', '0', 'system:store:export',       '#', 103, 1, sysdate(), null, null, '', 0);

ALTER TABLE `pet_system`.`sys_dept` ADD COLUMN `platform_id` tinyint NOT NULL COMMENT '平台ID';
ALTER TABLE `pet_system`.`sys_post` ADD COLUMN `platform_id` tinyint NOT NULL COMMENT '平台ID';

# 2026/02/25
-- 菜单 SQL
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2026533580326912001, '服务列表', '2020736413590941698', '1', 'list', 'service/list/index', 1, 0, 'C', '0', '0', 'service:list:list', '#', 103, 1, sysdate(), null, null, '服务列表菜单', 0);

-- 按钮 SQL
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2026533580326912002, '服务列表查询', 2026533580326912001, '1',  '#', '', 1, 0, 'F', '0', '0', 'service:list:query',        '#', 103, 1, sysdate(), null, null, '', 0);

insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2026533580326912003, '服务列表新增', 2026533580326912001, '2',  '#', '', 1, 0, 'F', '0', '0', 'service:list:add',          '#', 103, 1, sysdate(), null, null, '', 0);

insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2026533580326912004, '服务列表修改', 2026533580326912001, '3',  '#', '', 1, 0, 'F', '0', '0', 'service:list:edit',         '#', 103, 1, sysdate(), null, null, '', 0);

insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2026533580326912005, '服务列表删除', 2026533580326912001, '4',  '#', '', 1, 0, 'F', '0', '0', 'service:list:remove',       '#', 103, 1, sysdate(), null, null, '', 0);

insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2026533580326912006, '服务列表导出', 2026533580326912001, '5',  '#', '', 1, 0, 'F', '0', '0', 'service:list:export',       '#', 103, 1, sysdate(), null, null, '', 0);

-- 菜单 SQL
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2021464069248733192, '商户分类', '6', '12', 'tenantCategories', 'system/tenantCategories/index', 1, 0, 'C', '0', '0', 'system:tenantCategories:list', '#', 103, 1, sysdate(), null, null, '商户分类菜单', 0);

-- 按钮 SQL
-- 菜单 SQL
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2026556930960998402, '区域站点', '1', '1', 'areaStation', 'system/areaStation/index', 1, 0, 'C', '0', '0', 'system:areaStation:list', '#', 103, 1, sysdate(), null, null, '区域站点菜单', 0);

-- 按钮 SQL
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2026556930960998403, '区域站点查询', 2026556930960998402, '1',  '#', '', 1, 0, 'F', '0', '0', 'system:areaStation:query',        '#', 103, 1, sysdate(), null, null, '', 0);

insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2026556930960998404, '区域站点新增', 2026556930960998402, '2',  '#', '', 1, 0, 'F', '0', '0', 'system:areaStation:add',          '#', 103, 1, sysdate(), null, null, '', 0);

insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2026556930960998405, '区域站点修改', 2026556930960998402, '3',  '#', '', 1, 0, 'F', '0', '0', 'system:areaStation:edit',         '#', 103, 1, sysdate(), null, null, '', 0);

insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2026556930960998406, '区域站点删除', 2026556930960998402, '4',  '#', '', 1, 0, 'F', '0', '0', 'system:areaStation:remove',       '#', 103, 1, sysdate(), null, null, '', 0);

insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2026556930960998407, '区域站点导出', 2026556930960998402, '5',  '#', '', 1, 0, 'F', '0', '0', 'system:areaStation:export',       '#', 103, 1, sysdate(), null, null, '', 0);

# 2026/02/26
-- 菜单 SQL
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2026924472514756609, '短信配置', '1', '12', 'smsConfig', 'resource/smsConfig/index', 1, 0, 'C', '0', '0', 'resource:smsConfig:list', '#', 103, 1, sysdate(), null, null, '短信配置菜单', 0);

-- 按钮 SQL
insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2026924472514756610, '短信配置查询', 2026924472514756609, '1',  '#', '', 1, 0, 'F', '0', '0', 'resource:smsConfig:query',        '#', 103, 1, sysdate(), null, null, '', 0);

insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2026924472514756611, '短信配置新增', 2026924472514756609, '2',  '#', '', 1, 0, 'F', '0', '0', 'resource:smsConfig:add',          '#', 103, 1, sysdate(), null, null, '', 0);

insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2026924472514756612, '短信配置修改', 2026924472514756609, '3',  '#', '', 1, 0, 'F', '0', '0', 'resource:smsConfig:edit',         '#', 103, 1, sysdate(), null, null, '', 0);

insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2026924472514756613, '短信配置删除', 2026924472514756609, '4',  '#', '', 1, 0, 'F', '0', '0', 'resource:smsConfig:remove',       '#', 103, 1, sysdate(), null, null, '', 0);

insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark, platform_id)
values(2026924472514756614, '短信配置导出', 2026924472514756609, '5',  '#', '', 1, 0, 'F', '0', '0', 'resource:smsConfig:export',       '#', 103, 1, sysdate(), null, null, '', 0);

# 2026/02/27 档案管理模块 - 业务字典
-- 用户性别复用框架已有字典 sys_user_sex (0:男, 1:女, 2:未知)
-- 字典类型
insert into sys_dict_type values(101, '000000', '用户状态',   'sys_customer_status',   103, 1, sysdate(), null, null, '用户档案状态');
insert into sys_dict_type values(102, '000000', '宠物类型',   'sys_pet_type',          103, 1, sysdate(), null, null, '宠物类型列表');
insert into sys_dict_type values(103, '000000', '宠物性别',   'sys_pet_gender',        103, 1, sysdate(), null, null, '宠物性别列表');
insert into sys_dict_type values(104, '000000', '宠物体型',   'sys_pet_size',          103, 1, sysdate(), null, null, '宠物体型列表');
insert into sys_dict_type values(105, '000000', '房屋类型',   'sys_house_type',        103, 1, sysdate(), null, null, '房屋类型列表');
insert into sys_dict_type values(106, '000000', '入门方式',   'sys_entry_method',      103, 1, sysdate(), null, null, '入门方式列表');
insert into sys_dict_type values(107, '000000', '标签颜色',   'sys_tag_color_type',    103, 1, sysdate(), null, null, '标签颜色样式');
insert into sys_dict_type values(108, '000000', '宠物品种',   'sys_pet_breed',         103, 1, sysdate(), null, null, '宠物品种列表');

-- 字典数据: 用户状态 sys_customer_status
insert into sys_dict_data values(103, '000000', 1, '正常', '0', 'sys_customer_status', '', 'primary', 'Y', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(104, '000000', 2, '冻结', '1', 'sys_customer_status', '', 'danger',  'N', 103, 1, sysdate(), null, null, '');

-- 字典数据: 宠物类型 sys_pet_type
insert into sys_dict_data values(105, '000000', 1, '猫',   '1', 'sys_pet_type', '', '',        'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(106, '000000', 2, '狗',   '2', 'sys_pet_type', '', '',        'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(107, '000000', 3, '其他', '3', 'sys_pet_type', '', '',        'N', 103, 1, sysdate(), null, null, '');

-- 字典数据: 宠物性别 sys_pet_gender
insert into sys_dict_data values(108, '000000', 1, '公', '1', 'sys_pet_gender', '', '',        'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(109, '000000', 2, '母', '2', 'sys_pet_gender', '', '',        'N', 103, 1, sysdate(), null, null, '');

-- 字典数据: 宠物体型 sys_pet_size
insert into sys_dict_data values(110, '000000', 1, '小型', 'small',  'sys_pet_size', '', '',        'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(111, '000000', 2, '中型', 'medium', 'sys_pet_size', '', '',        'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(112, '000000', 3, '大型', 'large',  'sys_pet_size', '', '',        'N', 103, 1, sysdate(), null, null, '');

-- 字典数据: 房屋类型 sys_house_type
insert into sys_dict_data values(113, '000000', 1, '楼梯', 'stairs',   'sys_house_type', '', '',        'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(114, '000000', 2, '电梯', 'elevator', 'sys_house_type', '', '',        'N', 103, 1, sysdate(), null, null, '');

-- 字典数据: 入门方式 sys_entry_method
insert into sys_dict_data values(115, '000000', 1, '密码开门', 'password', 'sys_entry_method', '', '',        'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(116, '000000', 2, '钥匙开门', 'key',      'sys_entry_method', '', '',        'N', 103, 1, sysdate(), null, null, '');

-- 字典数据: 标签颜色 sys_tag_color_type
insert into sys_dict_data values(117, '000000', 1, '默认',  'info',    'sys_tag_color_type', '', 'info',    'Y', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(118, '000000', 2, '主要',  'primary', 'sys_tag_color_type', '', 'primary', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(119, '000000', 3, '成功',  'success', 'sys_tag_color_type', '', 'success', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(120, '000000', 4, '警告',  'warning', 'sys_tag_color_type', '', 'warning', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(121, '000000', 5, '危险',  'danger',  'sys_tag_color_type', '', 'danger',  'N', 103, 1, sysdate(), null, null, '');

-- 字典数据: 宠物品种 sys_pet_breed (value=品种名称，后续可在字典管理中自行增删)
insert into sys_dict_data values(122, '000000', 1,  '金毛',           '金毛',           'sys_pet_breed', '', '', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(123, '000000', 2,  '拉布拉多',       '拉布拉多',       'sys_pet_breed', '', '', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(124, '000000', 3,  '柴犬',           '柴犬',           'sys_pet_breed', '', '', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(125, '000000', 4,  '柯基',           '柯基',           'sys_pet_breed', '', '', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(126, '000000', 5,  '哈士奇',         '哈士奇',         'sys_pet_breed', '', '', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(127, '000000', 6,  '阿拉斯加',       '阿拉斯加',       'sys_pet_breed', '', '', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(128, '000000', 7,  '萨摩耶',         '萨摩耶',         'sys_pet_breed', '', '', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(129, '000000', 8,  '边境牧羊犬',     '边境牧羊犬',     'sys_pet_breed', '', '', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(130, '000000', 9,  '德国牧羊犬',     '德国牧羊犬',     'sys_pet_breed', '', '', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(131, '000000', 10, '贵宾犬/泰迪',    '贵宾犬/泰迪',    'sys_pet_breed', '', '', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(132, '000000', 11, '比熊',           '比熊',           'sys_pet_breed', '', '', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(133, '000000', 12, '博美',           '博美',           'sys_pet_breed', '', '', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(134, '000000', 13, '雪纳瑞',         '雪纳瑞',         'sys_pet_breed', '', '', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(135, '000000', 14, '法斗',           '法斗',           'sys_pet_breed', '', '', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(136, '000000', 15, '中华田园犬',     '中华田园犬',     'sys_pet_breed', '', '', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(137, '000000', 16, '英短',           '英短',           'sys_pet_breed', '', '', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(138, '000000', 17, '美短',           '美短',           'sys_pet_breed', '', '', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(139, '000000', 18, '布偶猫',         '布偶猫',         'sys_pet_breed', '', '', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(140, '000000', 19, '加菲猫',         '加菲猫',         'sys_pet_breed', '', '', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(141, '000000', 20, '暹罗猫',         '暹罗猫',         'sys_pet_breed', '', '', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(142, '000000', 21, '波斯猫',         '波斯猫',         'sys_pet_breed', '', '', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(143, '000000', 22, '缅因猫',         '缅因猫',         'sys_pet_breed', '', '', 'N', 103, 1, sysdate(), null, null, '');
insert into sys_dict_data values(144, '000000', 23, '中华田园猫',     '中华田园猫',     'sys_pet_breed', '', '', 'N', 103, 1, sysdate(), null, null, '');

# 2026/02/28
-- 门店信息加入区域编码
ALTER TABLE `pet_system`.`sys_store` ADD COLUMN `area_code` varchar(255) NOT NULL COMMENT '区域编码';
