/*
 彻底修复魅力等级表
 Date: 2025-12-30
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- 彻底删除并重建表
DROP TABLE IF EXISTS `eb_charm_level`;

CREATE TABLE `eb_charm_level` (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `level` int UNSIGNED NOT NULL COMMENT '等级',
  `upgrade_condition` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '升级条件(所需魅力值)',
  `charm_title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '魅力称号',
  `status` tinyint NOT NULL DEFAULT 1 COMMENT '状态 0=禁用 1=启用',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `uk_level` (`level`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '魅力等级表' ROW_FORMAT = DYNAMIC;

SET FOREIGN_KEY_CHECKS = 1;

-- 不插入任何数据，让用户自己添加
