/*用戶積分*/
CREATE TABLE `log_point` (
    `id` INT UNSIGNED AUTO_INCREMENT PRIMARY KEY COMMENT '編號',
    `user_id` VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '使用者帳號',
    `point` INT UNSIGNED NOT NULL DEFAULT '0' COMMENT '積分',
    `point_type` ENUM('mission','level') NOT NULL COMMENT '積分獲取來源',
    `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '建立時間',
    `updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '資料更新時間',
    `deleted_at` DATETIME DEFAULT NULL COMMENT '刪除時間 (軟刪除)'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用戶積分';

