-- =====================================================================
-- 订餐菜单标签字典初始化
-- 字典类型：biz_food_menu_tag
-- MySQL 5.7 兼容；INSERT IGNORE 保证幂等
-- 中文使用 UTF-8 HEX 写入，避免 PowerShell 管道执行时发生编码损坏
-- =====================================================================

SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci;
SET CHARACTER SET utf8mb4;

INSERT IGNORE INTO `sys_type_dict` (`id`, `type`, `name`, `description`, `sort_num`, `del_flag`, `tenant_id`, `tenant_code`, `create_date`, `update_date`)
VALUES (
    'dict_biz_food_menu_tag',
    'biz_food_menu_tag',
    CONVERT(UNHEX('E8AEA2E9A490E88F9CE58D95E6A087E7ADBE') USING utf8mb4),
    CONVERT(UNHEX('E8AEA2E9A490E88F9CE58D95E6988EE7BB86E8AFA6E68385E9A1B5E6A087E7ADBEEFBC8CE794A8E4BA8EE5908EE58FB0E5AD97E585B8E7BBB4E68AA4E5928CE5B08FE7A88BE5BA8FE5B195E7A4BA') USING utf8mb4),
    1100,
    '0',
    '1',
    '1',
    NOW(),
    NOW()
);

INSERT IGNORE INTO `sys_value_dict` (`id`, `dict_type_id`, `label`, `value`, `sort_num`, `del_flag`, `tenant_id`, `tenant_code`, `create_date`, `update_date`)
VALUES
    ('dict_biz_food_menu_tag_signature', 'dict_biz_food_menu_tag', CONVERT(UNHEX('E68B9BE7898C') USING utf8mb4), CONVERT(UNHEX('E68B9BE7898C') USING utf8mb4), 10, '0', '1', '1', NOW(), NOW()),
    ('dict_biz_food_menu_tag_hot',       'dict_biz_food_menu_tag', CONVERT(UNHEX('E783ADE99480') USING utf8mb4), CONVERT(UNHEX('E783ADE99480') USING utf8mb4), 20, '0', '1', '1', NOW(), NOW()),
    ('dict_biz_food_menu_tag_new',       'dict_biz_food_menu_tag', CONVERT(UNHEX('E696B0E59381') USING utf8mb4), CONVERT(UNHEX('E696B0E59381') USING utf8mb4), 30, '0', '1', '1', NOW(), NOW()),
    ('dict_biz_food_menu_tag_recommend', 'dict_biz_food_menu_tag', CONVERT(UNHEX('E68EA8E88D90') USING utf8mb4), CONVERT(UNHEX('E68EA8E88D90') USING utf8mb4), 40, '0', '1', '1', NOW(), NOW()),
    ('dict_biz_food_menu_tag_light',     'dict_biz_food_menu_tag', CONVERT(UNHEX('E6B885E6B7A1') USING utf8mb4), CONVERT(UNHEX('E6B885E6B7A1') USING utf8mb4), 50, '0', '1', '1', NOW(), NOW()),
    ('dict_biz_food_menu_tag_spicy',     'dict_biz_food_menu_tag', CONVERT(UNHEX('E8BEA3E591B3') USING utf8mb4), CONVERT(UNHEX('E8BEA3E591B3') USING utf8mb4), 60, '0', '1', '1', NOW(), NOW()),
    ('dict_biz_food_menu_tag_limited',   'dict_biz_food_menu_tag', CONVERT(UNHEX('E99990E9878F') USING utf8mb4), CONVERT(UNHEX('E99990E9878F') USING utf8mb4), 70, '0', '1', '1', NOW(), NOW());

UPDATE `sys_type_dict`
SET `name` = CONVERT(UNHEX('E8AEA2E9A490E88F9CE58D95E6A087E7ADBE') USING utf8mb4),
    `description` = CONVERT(UNHEX('E8AEA2E9A490E88F9CE58D95E6988EE7BB86E8AFA6E68385E9A1B5E6A087E7ADBEEFBC8CE794A8E4BA8EE5908EE58FB0E5AD97E585B8E7BBB4E68AA4E5928CE5B08FE7A88BE5BA8FE5B195E7A4BA') USING utf8mb4)
WHERE `id` = 'dict_biz_food_menu_tag';

UPDATE `sys_value_dict` SET `label` = CONVERT(UNHEX('E68B9BE7898C') USING utf8mb4), `value` = CONVERT(UNHEX('E68B9BE7898C') USING utf8mb4) WHERE `id` = 'dict_biz_food_menu_tag_signature';
UPDATE `sys_value_dict` SET `label` = CONVERT(UNHEX('E783ADE99480') USING utf8mb4), `value` = CONVERT(UNHEX('E783ADE99480') USING utf8mb4) WHERE `id` = 'dict_biz_food_menu_tag_hot';
UPDATE `sys_value_dict` SET `label` = CONVERT(UNHEX('E696B0E59381') USING utf8mb4), `value` = CONVERT(UNHEX('E696B0E59381') USING utf8mb4) WHERE `id` = 'dict_biz_food_menu_tag_new';
UPDATE `sys_value_dict` SET `label` = CONVERT(UNHEX('E68EA8E88D90') USING utf8mb4), `value` = CONVERT(UNHEX('E68EA8E88D90') USING utf8mb4) WHERE `id` = 'dict_biz_food_menu_tag_recommend';
UPDATE `sys_value_dict` SET `label` = CONVERT(UNHEX('E6B885E6B7A1') USING utf8mb4), `value` = CONVERT(UNHEX('E6B885E6B7A1') USING utf8mb4) WHERE `id` = 'dict_biz_food_menu_tag_light';
UPDATE `sys_value_dict` SET `label` = CONVERT(UNHEX('E8BEA3E591B3') USING utf8mb4), `value` = CONVERT(UNHEX('E8BEA3E591B3') USING utf8mb4) WHERE `id` = 'dict_biz_food_menu_tag_spicy';
UPDATE `sys_value_dict` SET `label` = CONVERT(UNHEX('E99990E9878F') USING utf8mb4), `value` = CONVERT(UNHEX('E99990E9878F') USING utf8mb4) WHERE `id` = 'dict_biz_food_menu_tag_limited';
