/*群組*/
CREATE TABLE `group_list` (
    `id` INT UNSIGNED AUTO_INCREMENT PRIMARY KEY COMMENT '編號',
    `name` VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '群組名稱',
    `user_id` VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin 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='群組系統-清單';

CREATE TABLE `group_member` (
    `id` INT UNSIGNED AUTO_INCREMENT PRIMARY KEY COMMENT '編號',
    `user_id` VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '用戶',
    `group_id` INT UNSIGNED 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='群組系統-成員';