-- https://www.phpmyadmin.net/
--
-- 主機： 127.0.0.1
-- 產生時間： 2025-10-20 06:26:15
-- 伺服器版本： 8.0.42
-- PHP 版本： 8.2.12

START TRANSACTION;



--
-- 資料庫： `nsysu_tutor`
--

-- --------------------------------------------------------

--
-- 資料表結構 `bookings`
--

CREATE TABLE `bookings` (
  `booking_id` int NOT NULL COMMENT '預約ID',
  `booking_no` varchar(50) DEFAULT NULL COMMENT '預約編號',
  `student_id` int NOT NULL COMMENT '學生ID',
  `teacher_id` int NOT NULL COMMENT '老師ID',
  `schedule_id` int NOT NULL COMMENT '排班ID',
  `booking_date` date NOT NULL COMMENT '上課日期',
  `start_time` time NOT NULL COMMENT '開始時間',
  `end_time` time NOT NULL COMMENT '結束時間',
  `subject` varchar(100) DEFAULT NULL COMMENT '科目',
  `booking_status` varchar(20) DEFAULT 'pending' COMMENT '預約狀態（pending待確認,confirmed已確認,cancelled已取消,completed已完成）',
  `cancel_reason` text COMMENT '取消原因',
  `cancel_date` datetime DEFAULT NULL COMMENT '取消時間',
  `class_location` varchar(200) DEFAULT NULL COMMENT '上課地點',
  `notes` text COMMENT '備註',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '建檔日期',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `updated_by` varchar(100) DEFAULT NULL COMMENT '更新人員'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='預約資料表';

--
-- 傾印資料表的資料 `bookings`
--

INSERT INTO `bookings` (`booking_id`, `booking_no`, `student_id`, `teacher_id`, `schedule_id`, `booking_date`, `start_time`, `end_time`, `subject`, `booking_status`, `cancel_reason`, `cancel_date`, `class_location`, `notes`, `create_date`, `update_date`, `updated_by`) VALUES
(2, 'BK202507140001', 3, 1, 68, '2025-07-17', '11:00:00', '12:00:00', 'conversation', 'pending', NULL, NULL, NULL, NULL, '2025-07-14 15:28:57', NULL, NULL),
(3, 'BK202507160001', 3, 2, 33, '2025-07-23', '11:00:00', '12:00:00', '發音、聲調練習, 日常生活對話練習', 'pending', NULL, NULL, NULL, NULL, '2025-07-16 17:36:27', NULL, NULL),
(4, 'BK202508210001', 3, 2, 59, '2025-08-22', '11:00:00', '12:00:00', NULL, 'pending', NULL, NULL, NULL, NULL, '2025-08-21 17:43:45', NULL, NULL),
(5, 'BK202508270001', 3, 2, 22, '2025-08-29', '09:00:00', '10:00:00', 'test', 'completed', NULL, NULL, NULL, NULL, '2025-08-27 10:50:26', NULL, NULL),
(6, 'BK202509020001', 3, 1, 109, '2025-09-03', '09:10:00', '09:35:00', '111', 'completed', NULL, NULL, NULL, NULL, '2025-09-02 13:29:11', '2025-09-04 16:09:15', NULL),
(7, 'BK202509020002', 3, 1, 112, '2025-09-05', '09:40:00', '10:05:00', 'aaa', 'no_show', NULL, NULL, NULL, NULL, '2025-09-02 13:31:09', '2025-09-04 16:06:05', NULL),
(8, 'BK202509040001', 3, 3, 172, '2025-09-05', '11:40:00', '12:05:00', 'testrr', 'cancelled', NULL, NULL, NULL, NULL, '2025-09-04 15:40:57', '2025-10-07 16:45:49', 'tester'),
(9, 'BK202509150001', 3, 2, 151, '2025-09-18', '10:10:00', '10:35:00', 'aaa', 'pending', NULL, NULL, NULL, NULL, '2025-09-15 14:47:11', NULL, NULL),
(10, 'BK202509150002', 3, 3, 192, '2025-09-19', '11:40:00', '12:05:00', 'aaaa', 'cancelled', NULL, NULL, NULL, NULL, '2025-09-15 14:47:26', NULL, '梅爾'),
(11, 'BK202509150003', 3, 1, 122, '2025-09-17', '09:40:00', '10:05:00', '9/17', 'completed', NULL, NULL, NULL, NULL, '2025-09-15 14:47:46', '2025-09-15 16:06:25', NULL),
(12, 'BK202509150004', 1, 2, 150, '2025-09-17', '10:40:00', '11:05:00', '日圓', 'cancelled', NULL, NULL, NULL, NULL, '2025-09-15 14:51:29', NULL, 'tester'),
(16, 'BK202509300001', 3, 1, 134, '2025-10-01', '09:40:00', '10:05:00', 'test', 'pending', NULL, NULL, NULL, NULL, '2025-09-30 14:27:37', NULL, NULL),
(17, 'BK202510020001', 3, 1, 218, '2025-10-07', '11:40:00', '12:05:00', 'aaa', 'pending', NULL, NULL, NULL, NULL, '2025-10-02 14:03:10', NULL, NULL),
(18, 'BK202510079138', 1, 3, 205, '2025-09-30', '11:10:00', '11:35:00', 'aaa', 'cancelled', NULL, NULL, 'IR4006,國際研究大樓4F', '', '2025-10-07 18:05:10', '2025-10-07 18:09:30', 'tester'),
(19, 'BK202510073082', 2, 3, 206, '2025-09-30', '11:40:00', '12:05:00', 'bbb', 'confirmed', NULL, NULL, 'IR4006,國際研究大樓4F', '', '2025-10-07 18:05:38', NULL, 'tester'),
(20, 'BK202510070865', 3, 3, 207, '2025-10-01', '11:10:00', '11:35:00', 'bbb', 'confirmed', NULL, NULL, 'IR4006,國際研究大樓4F', '', '2025-10-07 18:06:20', NULL, 'tester'),
(21, 'BK202510076964', 1, 3, 205, '2025-09-30', '11:10:00', '11:35:00', 'iii', 'cancelled', NULL, NULL, 'IR4006,國際研究大樓4F', '', '2025-10-07 18:09:47', '2025-10-07 18:10:52', 'tester'),
(22, 'BK202510073957', 1, 3, 205, '2025-09-30', '11:10:00', '11:35:00', 'ooo', 'confirmed', NULL, NULL, 'IR4006,國際研究大樓4F', '', '2025-10-07 18:11:01', NULL, 'tester');

-- --------------------------------------------------------

--
-- 資料表結構 `class_statistics`
--

CREATE TABLE `class_statistics` (
  `stat_id` int NOT NULL COMMENT '統計ID',
  `stat_month` varchar(7) NOT NULL COMMENT '統計月份（YYYY-MM）',
  `teacher_id` int DEFAULT NULL COMMENT '老師ID',
  `student_id` int DEFAULT NULL COMMENT '學生ID',
  `total_hours` decimal(10,2) DEFAULT '0.00' COMMENT '總時數',
  `total_classes` int DEFAULT '0' COMMENT '總堂數',
  `cancelled_classes` int DEFAULT '0' COMMENT '取消堂數',
  `avg_rating` decimal(3,2) DEFAULT '0.00' COMMENT '平均評分',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '建檔日期',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `updated_by` varchar(100) DEFAULT NULL COMMENT '更新人員'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='上課統計表';

-- --------------------------------------------------------

--
-- 資料表結構 `login_logs`
--

CREATE TABLE `login_logs` (
  `log_id` int NOT NULL COMMENT '記錄ID',
  `student_id` int DEFAULT NULL COMMENT '學生ID',
  `user_id` int DEFAULT NULL,
  `login_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '登入時間',
  `login_ip` varchar(45) DEFAULT NULL COMMENT '登入IP',
  `login_status` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '登入狀態',
  `login_message` varchar(255) DEFAULT NULL COMMENT '登入訊息',
  `user_agent` text COMMENT '瀏覽器資訊'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='登入記錄表';



-- --------------------------------------------------------

--
-- 資料表結構 `log_use`
--

CREATE TABLE `log_use` (
  `rid` int NOT NULL,
  `codeNo` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '程式代碼',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '備註',
  `user_ip` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '連線ip',
  `user_id` int DEFAULT NULL COMMENT '使用者ID',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '建檔日期'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='使用記錄表';

--
-- 傾印資料表的資料 `log_use`
--

INSERT INTO `log_use` (`rid`, `codeNo`, `remark`, `user_ip`, `user_id`, `create_date`) VALUES
(1, 'login', '', '127.0.0.1', 1, '2025-06-11 16:11:56'),
(2, 'login', '', '127.0.0.1', 1, '2025-07-03 16:25:40'),
(3, 'login', '', '127.0.0.1', 1, '2025-07-03 17:49:09'),
(4, 'login', '', '127.0.0.1', 1, '2025-07-04 09:57:09'),
(5, 'login', '', '127.0.0.1', 1, '2025-07-04 13:35:39'),
(6, 'login', '', '127.0.0.1', 1, '2025-07-04 17:19:59'),
(7, 'login', '', '127.0.0.1', 1, '2025-07-11 10:04:31'),
(8, 'login', '', '127.0.0.1', 1, '2025-07-14 16:21:55'),
(9, 'login', '', '127.0.0.1', 1, '2025-07-15 10:04:00'),
(10, 'login', '', '127.0.0.1', 1, '2025-07-15 17:54:16'),
(11, 'login', '', '127.0.0.1', 1, '2025-07-16 09:37:08'),
(12, 'login', '', '127.0.0.1', 1, '2025-07-17 10:46:13'),
(13, 'login', '', '127.0.0.1', 1, '2025-07-18 16:34:52'),
(14, 'login', '', '127.0.0.1', 1, '2025-07-21 09:53:29'),
(15, 'login', '', '127.0.0.1', 1, '2025-07-21 11:23:45'),
(16, 'login', '', '127.0.0.1', 1, '2025-07-21 14:22:17'),
(17, 'login', '', '127.0.0.1', 1, '2025-07-21 14:26:49'),
(18, 'login', '', '127.0.0.1', 1, '2025-07-21 16:38:22'),
(19, 'login', '', '127.0.0.1', 1, '2025-07-22 09:31:10'),
(20, 'login', '', '127.0.0.1', 1, '2025-07-22 17:36:43'),
(21, 'login', '', '127.0.0.1', 1, '2025-07-23 09:26:41'),
(22, 'login', '', '127.0.0.1', 1, '2025-07-24 14:29:30'),
(23, 'login', '', '127.0.0.1', 1, '2025-07-24 16:30:55'),
(24, 'login', '', '127.0.0.1', 1, '2025-07-25 13:19:57'),
(25, 'login', '', '125.229.116.28', 1, '2025-07-25 13:32:33'),
(26, 'login', '', '127.0.0.1', 1, '2025-07-31 10:00:42'),
(27, 'login', '', '127.0.0.1', 1, '2025-08-01 10:01:11'),
(28, 'login', '', '127.0.0.1', 1, '2025-08-04 10:22:30'),
(29, 'login', '', '127.0.0.1', 1, '2025-08-14 09:43:35'),
(30, 'login', '', '127.0.0.1', 1, '2025-08-14 16:24:51'),
(31, 'login', '', '127.0.0.1', 1, '2025-08-18 13:56:04'),
(32, 'login', '', '127.0.0.1', 1, '2025-08-20 17:41:06'),
(33, 'login', '', '127.0.0.1', 1, '2025-08-22 10:16:56'),
(34, 'login', '', '127.0.0.1', 1, '2025-08-22 14:46:45'),
(35, 'login', '', '127.0.0.1', 1, '2025-08-28 10:40:04'),
(36, 'login', '', '127.0.0.1', 1, '2025-08-29 13:43:47'),
(37, 'login', '', '127.0.0.1', 1, '2025-09-02 11:03:03'),
(38, 'login', '', '127.0.0.1', 1, '2025-09-03 10:35:39'),
(39, 'login', '', '127.0.0.1', 1, '2025-09-03 15:48:53'),
(40, 'login', '', '127.0.0.1', 1, '2025-09-04 10:58:04'),
(41, 'login', '', '127.0.0.1', 1, '2025-09-04 16:39:32'),
(42, 'login', '', '127.0.0.1', 1, '2025-09-12 15:03:49'),
(43, 'login', '', '127.0.0.1', 1, '2025-09-15 09:50:21'),
(44, 'login', '', '127.0.0.1', 1, '2025-09-15 15:41:24'),
(45, 'login', '', '127.0.0.1', 1, '2025-09-16 15:06:56'),
(46, 'login', '', '127.0.0.1', 1, '2025-09-19 10:29:47'),
(47, 'login', '', '127.0.0.1', 1, '2025-09-22 17:41:30'),
(48, 'login', '', '127.0.0.1', 1, '2025-09-22 17:50:05'),
(49, 'login', '', '127.0.0.1', 1, '2025-09-22 17:53:29'),
(50, 'login', '', '127.0.0.1', 1, '2025-09-22 17:56:06'),
(51, 'login', '', '127.0.0.1', 1, '2025-09-22 17:59:29'),
(52, 'login', '', '127.0.0.1', 1, '2025-09-24 10:01:58'),
(53, 'login', '', '127.0.0.1', 1, '2025-09-24 13:16:48'),
(54, 'login', '', '127.0.0.1', 1, '2025-09-25 09:33:23'),
(55, 'login', '', '127.0.0.1', 1, '2025-09-30 09:48:43'),
(56, 'login', '', '127.0.0.1', 1, '2025-10-01 16:27:17'),
(57, 'login', '', '127.0.0.1', 1, '2025-10-02 10:01:12'),
(58, 'login', '', '127.0.0.1', 1, '2025-10-02 11:53:54'),
(59, 'login', '', '127.0.0.1', 1, '2025-10-07 16:40:58');

-- --------------------------------------------------------

--
-- 資料表結構 `meeting_rooms`
--

CREATE TABLE `meeting_rooms` (
  `room_id` int NOT NULL COMMENT '教室ID',
  `room_name` varchar(100) NOT NULL COMMENT '教室名稱',
  `location` varchar(50) DEFAULT NULL COMMENT '位置描述',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '建檔日期',
  `updated_by` varchar(100) DEFAULT NULL COMMENT '更新人員'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='教室基本資料';

--
-- 傾印資料表的資料 `meeting_rooms`
--

INSERT INTO `meeting_rooms` (`room_id`, `room_name`, `location`, `update_date`, `create_date`, `updated_by`) VALUES
(1, 'R401', '4F', '2025-07-04 11:12:13', '2025-07-04 11:05:52', ''),
(3, 'R402', '', '2025-07-04 11:12:35', '2025-07-04 11:12:35', '');

-- --------------------------------------------------------

--
-- 資料表結構 `password_resets`
--

CREATE TABLE `password_resets` (
  `reset_id` int NOT NULL COMMENT '重設ID',
  `email` varchar(100) NOT NULL COMMENT '電子郵件',
  `token` varchar(255) NOT NULL COMMENT '重設Token',
  `expires_at` datetime NOT NULL COMMENT '過期時間',
  `used` tinyint(1) DEFAULT '0' COMMENT '是否已使用',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '建立時間'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='密碼重設表';

--
-- 傾印資料表的資料 `password_resets`
--

INSERT INTO `password_resets` (`reset_id`, `email`, `token`, `expires_at`, `used`, `created_at`) VALUES
(11, '5574932+03@gmail.com', '08c5bbabf36d4a65f344fcae0b357665d7f9046c0f5620bb28a914946ea9dafc', '2025-08-21 17:28:05', 0, '2025-08-21 16:28:05'),
(12, '5574932@gmail.com', '73d2b62d85f82646b476ff6655b1b28f35a024d759708ee340e01d2aa798c9c8', '2025-09-30 14:16:12', 0, '2025-09-30 13:16:12');

-- --------------------------------------------------------

--
-- 資料表結構 `registration_logs`
--

CREATE TABLE `registration_logs` (
  `log_id` int NOT NULL COMMENT '記錄ID',
  `student_id` int DEFAULT NULL COMMENT '學生ID',
  `action` varchar(50) DEFAULT NULL COMMENT '動作類型',
  `ip_address` varchar(45) DEFAULT NULL COMMENT 'IP地址',
  `user_agent` text COMMENT '瀏覽器資訊',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '建立時間'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='註冊日誌表';

--
-- 傾印資料表的資料 `registration_logs`
--

INSERT INTO `registration_logs` (`log_id`, `student_id`, `action`, `ip_address`, `user_agent`, `created_at`) VALUES
(1, NULL, 'registration', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', '2025-07-08 15:26:56'),
(2, 3, 'registration', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', '2025-07-08 15:31:33'),
(3, 5, 'registration', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36', '2025-08-21 16:14:09');

-- --------------------------------------------------------

--
-- 資料表結構 `remember_tokens`
--

CREATE TABLE `remember_tokens` (
  `token_id` int NOT NULL COMMENT 'Token ID',
  `student_id` int DEFAULT NULL COMMENT '學生ID',
  `user_id` int DEFAULT NULL,
  `token` varchar(255) NOT NULL COMMENT 'Token值',
  `expires_at` datetime NOT NULL COMMENT '過期時間',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '建立時間'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='記住我Token表';

--
-- 傾印資料表的資料 `remember_tokens`
--

INSERT INTO `remember_tokens` (`token_id`, `student_id`, `user_id`, `token`, `expires_at`, `created_at`) VALUES
(1, 3, NULL, '636230cf850bfa82589827f04a5d6078333920b789a08a8437458141bc15c6dc', '2025-08-07 16:53:53', '2025-07-08 16:53:53'),
(2, 3, NULL, '1196e1f52a8e9ec50e6783ec69d01c8c865605756c62b074d599039c13ca61ec', '2025-08-30 15:02:06', '2025-07-31 15:02:06'),
(3, 3, NULL, '5a5f7f1227983ede9ff2fc5ec0473c9ad9129094d7b1bc1898da059f7852a416', '2025-10-22 17:39:47', '2025-09-22 17:39:47');

-- --------------------------------------------------------

--
-- 資料表結構 `reservations`
--

CREATE TABLE `reservations` (
  `reservation_id` int NOT NULL COMMENT '預約ID',
  `room_id` int NOT NULL COMMENT '教室ID',
  `user_id` int NOT NULL COMMENT '預約人ID',
  `room_no` varchar(100) DEFAULT NULL COMMENT '教室代號',
  `title` varchar(100) NOT NULL COMMENT '會議標題',
  `description` varchar(500) DEFAULT NULL COMMENT '會議說明',
  `start_time` datetime NOT NULL COMMENT '開始時間',
  `end_time` datetime NOT NULL COMMENT '結束時間',
  `borrower` varchar(100) DEFAULT NULL COMMENT '借用人',
  `status` varchar(30) DEFAULT 'pending' COMMENT '預約狀態ENUM(pending,approved,rejected,cancelled,completed)',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '建檔日期',
  `updated_by` varchar(100) DEFAULT NULL COMMENT '更新人員',
  `root_id` int DEFAULT '0' COMMENT '預約ID-表頭'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='預約記錄';

-- --------------------------------------------------------

--
-- 資料表結構 `reviews`
--

CREATE TABLE `reviews` (
  `review_id` int NOT NULL COMMENT '評價ID',
  `booking_id` int NOT NULL COMMENT '預約ID',
  `reviewer_type` varchar(20) NOT NULL COMMENT '評價者類型（student學生,teacher老師）',
  `reviewer_id` int NOT NULL COMMENT '評價者ID（user_id）',
  `rating` int DEFAULT NULL COMMENT '評分（1-5分）',
  `comment` text COMMENT '評價內容',
  `teacher_comment` text COMMENT '老師評語或工作內容',
  `is_attended` char(1) DEFAULT 'Y' COMMENT '是否出席（Y有上課,N未上課）',
  `review_status` varchar(20) DEFAULT 'active' COMMENT '評價狀態（active顯示,hidden隱藏）',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '建檔日期',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `updated_by` varchar(100) DEFAULT NULL COMMENT '更新人員'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='評價資料表';

--
-- 觸發器 `reviews`
--
DELIMITER $$
CREATE TRIGGER `update_teacher_rating` AFTER INSERT ON `reviews` FOR EACH ROW BEGIN
    IF NEW.reviewer_type = 'student' AND NEW.rating IS NOT NULL THEN
        UPDATE teachers t
        SET t.rating_avg = (
            SELECT AVG(r.rating)
            FROM reviews r
            JOIN bookings b ON r.booking_id = b.booking_id
            WHERE b.teacher_id = t.teacher_id
            AND r.reviewer_type = 'student'
            AND r.rating IS NOT NULL
            AND r.review_status = 'active'
        ),
        t.rating_count = (
            SELECT COUNT(*)
            FROM reviews r
            JOIN bookings b ON r.booking_id = b.booking_id
            WHERE b.teacher_id = t.teacher_id
            AND r.reviewer_type = 'student'
            AND r.rating IS NOT NULL
            AND r.review_status = 'active'
        )
        WHERE t.teacher_id = (
            SELECT teacher_id FROM bookings WHERE booking_id = NEW.booking_id
        );
    END IF;
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- 資料表結構 `satisfaction_survey`
--

CREATE TABLE `satisfaction_survey` (
  `survey_id` int NOT NULL COMMENT '調查表ID',
  `booking_id` int NOT NULL COMMENT '預約ID',
  `student_id` int NOT NULL COMMENT '學生ID',
  `teacher_id` int NOT NULL COMMENT '華語小老師ID',
  `session_date` date NOT NULL COMMENT '輔導日期',
  `session_time` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '輔導時段',
  `q1_practice` text COLLATE utf8mb4_unicode_ci COMMENT '練習內容說明',
  `q2_scheduling` tinyint(1) NOT NULL COMMENT '輔導時間安排評分(1-7)',
  `q3_location` tinyint(1) NOT NULL COMMENT '輔導地點安排評分(1-7)',
  `q4_knowledge` tinyint(1) NOT NULL COMMENT '華語小老師專業知識評分(1-7)',
  `q5_skills` tinyint(1) NOT NULL COMMENT '華語小老師教學技巧評分(1-7)',
  `q6_interaction` tinyint(1) NOT NULL COMMENT '華語小老師互動能力評分(1-7)',
  `q7_preparation` tinyint(1) NOT NULL COMMENT '教學準備充份態度認真評分(1-7)',
  `q8_methods` tinyint(1) NOT NULL COMMENT '教學方法理解吸收評分(1-7)',
  `q9_helpful` tinyint(1) NOT NULL COMMENT '輔導對學習中文幫助評分(1-7)',
  `q10_overall` tinyint(1) NOT NULL COMMENT '整體評價(1-7)',
  `q11_recommend` enum('Yes','No') COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '是否推薦給他人',
  `q12_suggestions` text COLLATE utf8mb4_unicode_ci COMMENT '其他建議與回饋',
  `average_score` decimal(3,2) GENERATED ALWAYS AS ((((((((((`q2_scheduling` + `q3_location`) + `q4_knowledge`) + `q5_skills`) + `q6_interaction`) + `q7_preparation`) + `q8_methods`) + `q9_helpful`) + `q10_overall`) / 9)) STORED COMMENT '平均評分',
  `submit_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '填寫日期時間',
  `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '填寫者IP位址',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '建檔日期',
  `update_date` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新日期',
  `updated_by` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '更新人員'
) ;

--
-- 傾印資料表的資料 `satisfaction_survey`
--

INSERT INTO `satisfaction_survey` (`survey_id`, `booking_id`, `student_id`, `teacher_id`, `session_date`, `session_time`, `q1_practice`, `q2_scheduling`, `q3_location`, `q4_knowledge`, `q5_skills`, `q6_interaction`, `q7_preparation`, `q8_methods`, `q9_helpful`, `q10_overall`, `q11_recommend`, `q12_suggestions`, `submit_date`, `ip_address`, `create_date`, `update_date`, `updated_by`) VALUES
(1, 2, 3, 1, '2025-07-17', '11:00 - 12:00', '123', 1, 2, 3, 4, 5, 6, 7, 6, 5, 'Yes', 'no', '2025-07-31 17:34:20', '127.0.0.1', '2025-07-31 17:34:20', NULL, NULL),
(2, 3, 3, 2, '2025-07-23', '11:00 - 12:00', '456', 7, 6, 5, 4, 3, 2, 1, 2, 3, 'No', '123', '2025-08-01 10:31:26', '127.0.0.1', '2025-08-01 10:31:26', NULL, '梅爾'),
(3, 4, 3, 2, '2025-08-22', '11:00 - 12:00', 'aaa', 3, 4, 4, 4, 5, 5, 5, 6, 6, 'Yes', 'sss', '2025-09-15 15:38:33', '127.0.0.1', '2025-09-15 15:38:33', NULL, '梅爾');

-- --------------------------------------------------------

--
-- 資料表結構 `students`
--

CREATE TABLE `students` (
  `student_id` int NOT NULL COMMENT '學生ID',
  `user_id` int DEFAULT NULL,
  `studentNo` varchar(20) NOT NULL COMMENT '學號',
  `studentPassword` varchar(255) NOT NULL COMMENT '登入密碼',
  `chinese_name` varchar(50) DEFAULT NULL COMMENT '中文姓名',
  `english_name` varchar(100) DEFAULT NULL COMMENT '英文姓名',
  `gender` varchar(1) DEFAULT NULL COMMENT '性別(M=男性,F=女性,O=其他)',
  `birth_date` date DEFAULT NULL COMMENT '出生日期',
  `nationality` varchar(50) DEFAULT NULL COMMENT '國籍',
  `email` varchar(100) DEFAULT NULL COMMENT '電子郵件',
  `phone_number` varchar(20) DEFAULT NULL COMMENT '電話號碼',
  `department` varchar(100) DEFAULT NULL COMMENT '就讀系所',
  `year_level` varchar(50) DEFAULT NULL COMMENT '年級',
  `chinese_level` varchar(50) DEFAULT NULL COMMENT '中文程度',
  `identity_type` varchar(50) DEFAULT NULL COMMENT '身分別',
  `program` varchar(50) DEFAULT NULL COMMENT '學程類型',
  `remarks` varchar(500) DEFAULT NULL COMMENT '備註',
  `status` enum('Active','Inactive','Graduated','Leave','Transferred') DEFAULT 'Active' COMMENT '學生狀態',
  `last_login` datetime DEFAULT NULL,
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '建檔日期',
  `update_date` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新日期',
  `created_by` varchar(100) DEFAULT NULL COMMENT '建檔人員',
  `updated_by` varchar(100) DEFAULT NULL COMMENT '更新人員'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='外籍學生註冊基本資料';

--
-- 傾印資料表的資料 `students`
--

INSERT INTO `students` (`student_id`, `user_id`, `studentNo`, `studentPassword`, `chinese_name`, `english_name`, `gender`, `birth_date`, `nationality`, `email`, `phone_number`, `department`, `year_level`, `chinese_level`, `identity_type`, `program`, `remarks`, `status`, `last_login`, `create_date`, `update_date`, `created_by`, `updated_by`) VALUES
(1, NULL, 's001', '$2y$10$mz15C/zKSfq94VGsPUE5a.qRGGXn1eENJISeqGBPeCjs9uMdGV0A2', '日圓', 'dddd', 'M', NULL, 'iii', 'aa@bb.vv', '', 'abc', 'PhD', 'no', 'Degree', 'Bachelor', '', 'Active', '2025-09-15 14:48:43', '2025-07-04 17:48:39', '2025-09-15 14:51:29', 'system', 'tester'),
(2, 4, 's002', '$2y$10$d7Trqz5JQBn0TPFVdiTqh.RZZqv.tEGYKegbB9Gd33rQnexzaX2eC', '丁二烯', 'Ding two', 'M', '2021-01-08', 'qq', 's002@bb.cc', '', '就讀', '', '', 'exchange', 'Bachelor', '備註\r\nRemarks', 'Active', NULL, '2025-07-08 15:26:56', '2025-08-04 17:51:29', 'self-registration', 'tester'),
(3, 9, 's101', '$2y$10$dHGCkyD77iwURzq/L8YiZeFwRmfvA9Wlww8wYs648bq8WkNZl.5lO', '梅爾', 'May Su', 'F', '2025-07-01', 'aa', '5574932@gmail.com', '', 'a', '2nd', 'beginner', 'Degree', 'Master', '', 'Active', '2025-10-02 13:42:40', '2025-07-08 15:31:33', '2025-10-02 13:42:40', 'self-registration', 'tester'),
(5, 12, 's003', '$2y$10$Lo7wUGW.yaGTpHxESyatMOSFxH00yMqpz9jsh04fR/q8NbcCBFo3C', 'aa', 'bb', 'M', NULL, 'ccc', '5574932+03@gmail.com', '', 'cc', '', '', 'Degree', 'Bachelor', '', 'Active', '2025-08-22 13:59:29', '2025-08-21 16:14:09', '2025-09-04 17:00:02', 'self-registration', 'tester');

-- --------------------------------------------------------

--
-- 資料表結構 `system_logs`
--

CREATE TABLE `system_logs` (
  `log_id` int NOT NULL COMMENT '日誌ID',
  `user_id` int DEFAULT NULL COMMENT '操作使用者ID',
  `action_type` varchar(50) DEFAULT NULL COMMENT '操作類型（login登入,booking預約,cancel取消等）',
  `action_detail` text COMMENT '操作詳情',
  `ip_address` varchar(50) DEFAULT NULL COMMENT 'IP位址',
  `user_agent` text COMMENT '瀏覽器資訊',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '建檔日期'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='系統日誌表';

--
-- 傾印資料表的資料 `system_logs`
--

INSERT INTO `system_logs` (`log_id`, `user_id`, `action_type`, `action_detail`, `ip_address`, `user_agent`, `create_date`) VALUES
(1, NULL, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', '2025-07-04 17:19:59'),
(2, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', '2025-07-11 10:04:31'),
(3, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-14 16:21:55'),
(4, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-15 10:04:00'),
(5, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-15 17:54:16'),
(6, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-16 09:37:08'),
(7, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-17 10:46:13'),
(8, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-18 16:34:52'),
(9, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-21 09:53:29'),
(10, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-21 11:23:45'),
(11, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-21 14:22:17'),
(12, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-21 14:26:49'),
(13, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-21 16:38:22'),
(14, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-22 09:31:10'),
(15, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-22 17:36:43'),
(16, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-23 09:26:41'),
(17, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-24 14:29:30'),
(18, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-24 16:30:55'),
(19, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-25 13:19:57'),
(20, 1, 'login', '使用者  成功登入', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-25 13:32:33'),
(21, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-07-31 10:00:42'),
(22, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-01 10:01:11'),
(23, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-04 10:22:30'),
(24, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36', '2025-08-14 09:43:35'),
(25, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36', '2025-08-14 16:24:51'),
(26, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36', '2025-08-18 13:56:04'),
(27, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36', '2025-08-20 17:41:06'),
(28, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36', '2025-08-22 10:16:56'),
(29, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36', '2025-08-22 14:46:45'),
(30, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36', '2025-08-28 10:40:04'),
(31, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36', '2025-08-29 13:43:47'),
(32, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36', '2025-09-02 11:03:03'),
(33, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36', '2025-09-03 10:35:39'),
(34, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36', '2025-09-03 15:48:53'),
(35, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36', '2025-09-04 10:58:04'),
(36, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36', '2025-09-04 16:39:32'),
(37, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', '2025-09-12 15:03:49'),
(38, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', '2025-09-15 09:50:21'),
(39, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', '2025-09-15 15:41:24'),
(40, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', '2025-09-16 15:06:56'),
(41, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', '2025-09-19 10:29:47'),
(42, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', '2025-09-22 17:41:30'),
(43, 1, 'login', '使用者  成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', '2025-10-02 11:53:54'),
(44, 1, 'login', 'tester 成功登入', '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', '2025-10-07 16:40:58');

-- --------------------------------------------------------

--
-- 資料表結構 `system_news`
--

CREATE TABLE `system_news` (
  `news_id` int NOT NULL COMMENT '公告編號',
  `news_title` varchar(255) NOT NULL COMMENT '公告標題',
  `news_content` text NOT NULL COMMENT '公告內容',
  `publish_date` datetime DEFAULT NULL COMMENT '發佈日期',
  `publish_unit` varchar(255) DEFAULT NULL COMMENT '發佈單位',
  `attachment_url` varchar(999) DEFAULT NULL COMMENT '附件下載URL',
  `remove_date` datetime DEFAULT NULL COMMENT '下架日期',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '建檔日期',
  `updated_by` varchar(100) DEFAULT NULL COMMENT '更新人員'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='系統公告表';

--
-- 傾印資料表的資料 `system_news`
--

INSERT INTO `system_news` (`news_id`, `news_title`, `news_content`, `publish_date`, `publish_unit`, `attachment_url`, `remove_date`, `update_date`, `create_date`, `updated_by`) VALUES
(2, '小老師預約news1', 'qq', '2025-07-04 11:16:00', '', 'uploads/news/0902-02.png', '2026-07-04 00:00:00', '2025-09-04 17:33:00', '2025-07-04 11:17:04', 'u01');

-- --------------------------------------------------------

--
-- 資料表結構 `system_settings`
--

CREATE TABLE `system_settings` (
  `setting_id` int NOT NULL COMMENT '設定ID',
  `setting_key` varchar(100) NOT NULL COMMENT '設定鍵值',
  `setting_value` text COMMENT '設定值',
  `setting_type` varchar(50) DEFAULT NULL COMMENT '設定類型',
  `description` text COMMENT '設定說明',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '建檔日期',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `updated_by` varchar(100) DEFAULT NULL COMMENT '更新人員'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='系統設定表';

--
-- 傾印資料表的資料 `system_settings`
--

INSERT INTO `system_settings` (`setting_id`, `setting_key`, `setting_value`, `setting_type`, `description`, `create_date`, `update_date`, `updated_by`) VALUES
(1, 'booking_cancel_hours', '24', 'system', '預約取消最少提前小時數', '2025-07-04 14:26:38', '2025-07-04 14:41:48', 'system'),
(2, 'max_booking_days', '30', 'system', '最多可預約未來天數', '2025-07-04 14:26:38', NULL, NULL),
(3, 'min_class_duration', '60', 'system', '最少上課時長（分鐘）', '2025-07-04 14:26:38', NULL, NULL),
(4, 'max_cancel_per_month', '3', 'system', '每月最多取消次數', '2025-07-04 14:26:38', NULL, NULL),
(5, 'identity_type', '{\n  \"Degree\": \"學位生 / International Degree student\",\n  \"Exchange\": \"交換生 / Exchange student\", \n  \"CLC\": \"華語生 / CLC student\"\n}', 'other', '身分別', '2025-09-04 14:22:56', NULL, 'system'),
(6, 'identity_type_report', '{\"Degree\":\"學位生\",\"Exchange\":\"交換生\",\"CLC\":\"華語生\"}', 'other', '身分別', '2025-09-04 14:22:56', '2025-09-04 15:26:08', 'system'),
(7, 'year_level', '{\"CLC\": \"華語生 CLC student\",   \"1st\": \"大一生 Freshman\",   \"2nd\": \"大二生 Sophomore\",    \"3rd\": \"大三生 Junior\",   \"4th\": \"大四生 Senior\",   \"Master\": \"碩士班 Master\'s Degree\",   \"PhD\": \"博士班 PhD\" ,\"Exchange\":\"交換生 Exchange student\"}', 'other', '年級', '2025-09-04 15:11:53', '2025-09-15 14:30:57', 'system');

-- --------------------------------------------------------

--
-- 資料表結構 `teachers`
--

CREATE TABLE `teachers` (
  `teacher_id` int NOT NULL COMMENT '老師ID',
  `user_id` int NOT NULL COMMENT '對應使用者ID',
  `teacherName` varchar(100) DEFAULT NULL COMMENT '老師姓名',
  `englishName` varchar(100) DEFAULT NULL,
  `specialties` text COMMENT '專長科目（JSON格式）',
  `experience` text COMMENT '教學經歷',
  `hourly_rate` decimal(10,2) DEFAULT '0.00' COMMENT '時薪',
  `rating_avg` decimal(3,2) DEFAULT '0.00' COMMENT '平均評分',
  `rating_count` int DEFAULT '0' COMMENT '評價次數',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '建檔日期',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `updated_by` varchar(100) DEFAULT NULL COMMENT '更新人員'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='老師資料表';

--
-- 傾印資料表的資料 `teachers`
--

INSERT INTO `teachers` (`teacher_id`, `user_id`, `teacherName`, `englishName`, `specialties`, `experience`, `hourly_rate`, `rating_avg`, `rating_count`, `create_date`, `update_date`, `updated_by`) VALUES
(1, 3, '王小花', 'Flower', '[\"國文\"]', '', 350.00, 0.00, 0, '2025-07-04 15:07:42', '2025-08-18 14:02:50', 'tester'),
(2, 10, '林大目', 'eye2', '[\"數學\"]', '', 350.00, 0.00, 0, '2025-07-11 10:05:38', '2025-07-11 14:00:29', 'system'),
(3, 11, '王小芬', 'Wáng Xiǎo Huā', '[]', 'w1,3', 248.00, 0.00, 0, '2025-07-17 10:53:47', '2025-08-22 17:45:43', 'tester');

-- --------------------------------------------------------

--
-- 資料表結構 `teacher_class`
--

CREATE TABLE `teacher_class` (
  `record_id` int NOT NULL COMMENT '上課記錄ID',
  `schedule_id` int NOT NULL COMMENT '排班ID（關聯teacher_schedules）',
  `teacher_id` int NOT NULL COMMENT '老師ID',
  `booking_id` int DEFAULT NULL COMMENT '預約ID',
  `student_id` int DEFAULT NULL COMMENT '學生ID（單一學生時使用）',
  `class_date` date DEFAULT NULL COMMENT '實際上課日期',
  `start_time` time DEFAULT NULL COMMENT '實際上課開始時間',
  `end_time` time DEFAULT NULL COMMENT '實際上課結束時間',
  `class_hour` decimal(6,2) DEFAULT '0.00' COMMENT '上課時數',
  `attendance_status` varchar(50) DEFAULT '出席' COMMENT '學生出席狀態(Present:出席, Absent:缺席,Prepare:準備)',
  `preparation_notes` varchar(999) DEFAULT NULL COMMENT '備課紀錄',
  `class_topic` varchar(999) DEFAULT NULL COMMENT '上課主題',
  `practice_content` varchar(999) DEFAULT NULL COMMENT '練習內容',
  `problem_description` varchar(999) DEFAULT NULL COMMENT '問題描述',
  `areas_to_improve` varchar(999) DEFAULT NULL COMMENT '需加強的內容',
  `assistance_needed` varchar(999) DEFAULT NULL COMMENT '需要協助的問題',
  `teaching_issues` varchar(999) DEFAULT NULL COMMENT '教學上的問題',
  `uncertain_questions` varchar(999) DEFAULT NULL COMMENT '不確定的提問',
  `training_courses` varchar(999) DEFAULT NULL COMMENT '培訓課程',
  `feedback` varchar(999) DEFAULT NULL COMMENT '其他建議與回饋',
  `is_completed` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT 'N' COMMENT '是否完成記錄（Y完成,N未完成）',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '建檔日期',
  `update_date` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新日期',
  `updated_by` varchar(100) DEFAULT NULL COMMENT '更新人員'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='老師上課記錄表';

--
-- 傾印資料表的資料 `teacher_class`
--

INSERT INTO `teacher_class` (`record_id`, `schedule_id`, `teacher_id`, `booking_id`, `student_id`, `class_date`, `start_time`, `end_time`, `class_hour`, `attendance_status`, `preparation_notes`, `class_topic`, `practice_content`, `problem_description`, `areas_to_improve`, `assistance_needed`, `teaching_issues`, `uncertain_questions`, `training_courses`, `feedback`, `is_completed`, `create_date`, `update_date`, `updated_by`) VALUES
(1, 66, 2, NULL, NULL, '2025-08-29', '16:00:00', '17:00:00', 1.00, 'Prepare', '123', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Y', '2025-08-29 17:18:21', NULL, '林大目'),
(2, 65, 2, NULL, NULL, '2025-08-29', '11:00:00', '12:00:00', 1.00, 'Prepare', 'ddd', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Y', '2025-08-29 17:18:49', '2025-08-29 17:39:44', '林大目'),
(3, 22, 2, 5, 3, '2025-08-29', '09:00:00', '10:00:00', 1.00, 'Present', '', 'avs', '練習內容', '問題描述', '需加強的內容', '需要協助的問題', '教學上的問題\r\nTeaching Issues', '不確定的提問\r\nUncertain Questions', '培訓課程\r\nTraining Courses', '其他建議與回饋\r\nOther Suggestions & Feedback', 'Y', '2025-08-29 17:40:37', NULL, '林大目'),
(4, 21, 2, NULL, NULL, '2025-08-22', '09:00:00', '10:00:00', 1.00, 'Prepare', '備課記錄 ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Y', '2025-08-29 17:41:40', NULL, '林大目'),
(5, 109, 1, 6, 3, '2025-09-03', '09:10:00', '09:35:00', 0.42, 'Present', '123', '【實用視聽華語四】課本\r\n', '互相扮演課文中的角色練習會話，並陪學生練習正確的發音。\r\n', '詞彙是什麼？就是單詞、詞的意思\r\n', '基本上都很棒，有些音調比較不準而已\r\n', '無\r\n', '', '「比較」的語法，不知道如何更好的解釋。', '相似詞的解釋方式', '', 'Y', '2025-09-02 15:33:47', '2025-09-04 16:09:15', '王小花'),
(6, 110, 1, NULL, NULL, '2025-09-03', '09:40:00', '10:05:00', 0.42, 'Prepare', '456789', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Y', '2025-09-02 15:34:02', '2025-09-03 10:19:58', '王小花'),
(7, 105, 1, NULL, NULL, '2025-08-22', '10:10:00', '10:35:00', 0.42, 'Prepare', 'fgdgdfgd', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Y', '2025-09-02 17:39:25', '2025-09-02 17:42:54', '王小花'),
(8, 78, 1, NULL, NULL, '2025-08-21', '11:00:00', '12:00:00', 1.00, 'Prepare', 'test1234', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'N', '2025-09-02 17:42:25', NULL, '王小花'),
(9, 80, 1, NULL, NULL, '2025-08-28', '11:00:00', '12:00:00', 1.00, 'Prepare', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'N', '2025-09-03 15:58:58', NULL, '王小花'),
(10, 111, 1, NULL, NULL, '2025-09-05', '09:10:00', '09:35:00', 0.42, 'Prepare', 'ddd', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'N', '2025-09-04 15:49:30', NULL, '王小花'),
(11, 112, 1, 7, 3, '2025-09-05', '09:40:00', '10:05:00', 0.42, 'Absent', 'ok', 'aaaa', '', '', '', '', '', '', '', '', 'N', '2025-09-04 15:49:39', '2025-09-04 16:06:05', '王小花'),
(12, 107, 1, NULL, NULL, '2025-08-29', '10:10:00', '10:35:00', 0.42, 'Absent', 'aaa', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'N', '2025-09-04 15:56:03', NULL, '王小花'),
(13, 114, 1, NULL, NULL, '2025-09-08', '09:40:00', '10:05:00', 0.42, 'Absent', 'aaa', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'N', '2025-09-12 18:00:52', NULL, '王小花'),
(14, 117, 1, NULL, NULL, '2025-09-12', '09:10:00', '09:35:00', 0.42, 'Prepare', 'sdssd', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Y', '2025-09-15 16:02:07', '2025-09-15 16:02:15', '王小花'),
(15, 122, 1, 11, 3, '2025-09-17', '09:40:00', '10:05:00', 0.42, 'Present', 'aaa', 'aaa', 'aabb', 'vvv', 'aassdd', '', '', '', '', '', 'Y', '2025-09-15 16:02:28', '2025-09-15 16:06:25', '王小花'),
(16, 121, 1, NULL, NULL, '2025-09-17', '09:10:00', '09:35:00', 0.42, 'Prepare', 'aaa', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Y', '2025-09-15 16:06:44', NULL, '王小花');

-- --------------------------------------------------------

--
-- 資料表結構 `teacher_schedules`
--

CREATE TABLE `teacher_schedules` (
  `schedule_id` int NOT NULL COMMENT '排班ID',
  `teacher_id` int NOT NULL COMMENT '老師ID',
  `available_date` date NOT NULL COMMENT '可上課日期',
  `start_time` time NOT NULL COMMENT '開始時間',
  `end_time` time NOT NULL COMMENT '結束時間',
  `max_students` int DEFAULT '1' COMMENT '最大學生數',
  `room_name` varchar(100) DEFAULT NULL COMMENT '教室名稱',
  `is_available` char(1) DEFAULT 'Y' COMMENT '是否可預約（Y可用,N不可用）',
  `recurring_type` varchar(20) DEFAULT NULL COMMENT '重複類型（once單次,weekly每週,monthly每月）',
  `recurring_end_date` date DEFAULT NULL COMMENT '重複結束日期',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '建檔日期',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `updated_by` varchar(100) DEFAULT NULL COMMENT '更新人員'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='老師排班資料表';

--
-- 傾印資料表的資料 `teacher_schedules`
--

INSERT INTO `teacher_schedules` (`schedule_id`, `teacher_id`, `available_date`, `start_time`, `end_time`, `max_students`, `room_name`, `is_available`, `recurring_type`, `recurring_end_date`, `create_date`, `update_date`, `updated_by`) VALUES
(1, 1, '2025-07-04', '09:00:00', '10:00:00', 1, NULL, 'Y', 'weekly', '2025-07-25', '2025-07-04 15:12:00', NULL, 'system'),
(2, 1, '2025-07-11', '09:00:00', '10:00:00', 1, NULL, 'Y', 'weekly', '2025-07-25', '2025-07-04 15:12:00', NULL, 'system'),
(3, 1, '2025-07-18', '09:00:00', '10:00:00', 1, NULL, 'Y', 'weekly', '2025-07-25', '2025-07-04 15:12:00', NULL, 'system'),
(4, 1, '2025-07-25', '09:00:00', '10:00:00', 1, NULL, 'Y', 'weekly', '2025-07-25', '2025-07-04 15:12:00', NULL, 'system'),
(5, 1, '2025-07-07', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-04 15:13:22', NULL, 'system'),
(6, 1, '2025-07-09', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-04 15:13:22', NULL, 'system'),
(7, 1, '2025-07-14', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-04 15:13:22', NULL, 'system'),
(9, 1, '2025-07-21', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-04 15:13:22', NULL, 'system'),
(10, 1, '2025-07-23', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-04 15:13:22', NULL, 'system'),
(11, 1, '2025-07-28', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-04 15:13:22', NULL, 'system'),
(12, 1, '2025-07-30', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-04 15:13:22', NULL, 'system'),
(13, 1, '2025-08-04', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-04 15:13:22', NULL, 'system'),
(15, 2, '2025-07-11', '09:00:00', '10:00:00', 1, NULL, 'Y', 'weekly', '2025-08-31', '2025-07-11 10:46:44', NULL, 'system'),
(16, 2, '2025-07-18', '09:00:00', '10:00:00', 1, NULL, 'Y', 'weekly', '2025-08-31', '2025-07-11 10:46:44', NULL, 'system'),
(17, 2, '2025-07-25', '09:00:00', '10:00:00', 1, NULL, 'Y', 'weekly', '2025-08-31', '2025-07-11 10:46:44', NULL, 'system'),
(18, 2, '2025-08-01', '09:00:00', '10:00:00', 1, NULL, 'Y', 'weekly', '2025-08-31', '2025-07-11 10:46:44', NULL, 'system'),
(19, 2, '2025-08-08', '09:00:00', '10:00:00', 1, NULL, 'Y', 'weekly', '2025-08-31', '2025-07-11 10:46:44', NULL, 'system'),
(20, 2, '2025-08-15', '09:00:00', '10:00:00', 1, NULL, 'Y', 'weekly', '2025-08-31', '2025-07-11 10:46:44', NULL, 'system'),
(21, 2, '2025-08-22', '09:00:00', '10:00:00', 1, NULL, 'Y', 'weekly', '2025-08-31', '2025-07-11 10:46:44', NULL, 'system'),
(22, 2, '2025-08-29', '09:00:00', '10:00:00', 1, NULL, 'F', 'weekly', '2025-08-31', '2025-07-11 10:46:44', NULL, 'system'),
(23, 2, '2025-07-11', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(24, 2, '2025-07-11', '16:00:00', '17:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(25, 2, '2025-07-14', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(26, 2, '2025-07-14', '16:00:00', '17:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(27, 2, '2025-07-16', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(28, 2, '2025-07-16', '16:00:00', '17:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(29, 2, '2025-07-18', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(30, 2, '2025-07-18', '16:00:00', '17:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(31, 2, '2025-07-21', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(32, 2, '2025-07-21', '16:00:00', '17:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(33, 2, '2025-07-23', '11:00:00', '12:00:00', 1, NULL, 'F', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(34, 2, '2025-07-23', '16:00:00', '17:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(35, 2, '2025-07-25', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(36, 2, '2025-07-25', '16:00:00', '17:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(37, 2, '2025-07-28', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(38, 2, '2025-07-28', '16:00:00', '17:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(39, 2, '2025-07-30', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(40, 2, '2025-07-30', '16:00:00', '17:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(41, 2, '2025-08-01', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(42, 2, '2025-08-01', '16:00:00', '17:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(43, 2, '2025-08-04', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(44, 2, '2025-08-04', '16:00:00', '17:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(45, 2, '2025-08-06', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(46, 2, '2025-08-06', '16:00:00', '17:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(47, 2, '2025-08-08', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(48, 2, '2025-08-08', '16:00:00', '17:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(49, 2, '2025-08-11', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(50, 2, '2025-08-11', '16:00:00', '17:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(51, 2, '2025-08-13', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(52, 2, '2025-08-13', '16:00:00', '17:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(53, 2, '2025-08-15', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(54, 2, '2025-08-15', '16:00:00', '17:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(55, 2, '2025-08-18', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(56, 2, '2025-08-18', '16:00:00', '17:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(57, 2, '2025-08-20', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(58, 2, '2025-08-20', '16:00:00', '17:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(59, 2, '2025-08-22', '11:00:00', '12:00:00', 1, NULL, 'F', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(60, 2, '2025-08-22', '16:00:00', '17:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(61, 2, '2025-08-25', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(62, 2, '2025-08-25', '16:00:00', '17:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(63, 2, '2025-08-27', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(64, 2, '2025-08-27', '16:00:00', '17:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(65, 2, '2025-08-29', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(66, 2, '2025-08-29', '16:00:00', '17:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:47:28', NULL, 'system'),
(67, 1, '2025-07-15', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:48:33', NULL, 'system'),
(68, 1, '2025-07-17', '11:00:00', '12:00:00', 1, 'R401', 'F', 'batch', NULL, '2025-07-11 10:48:33', NULL, 'system'),
(69, 1, '2025-07-22', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:48:33', NULL, 'system'),
(70, 1, '2025-07-24', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:48:33', NULL, 'system'),
(71, 1, '2025-07-29', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:48:33', NULL, 'system'),
(72, 1, '2025-07-31', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:48:33', NULL, 'system'),
(73, 1, '2025-08-05', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:48:33', NULL, 'system'),
(74, 1, '2025-08-07', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:48:33', NULL, 'system'),
(75, 1, '2025-08-12', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:48:33', NULL, 'system'),
(76, 1, '2025-08-14', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:48:33', NULL, 'system'),
(77, 1, '2025-08-19', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:48:33', NULL, 'system'),
(78, 1, '2025-08-21', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:48:33', NULL, 'system'),
(79, 1, '2025-08-26', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:48:33', NULL, 'system'),
(80, 1, '2025-08-28', '11:00:00', '12:00:00', 1, NULL, 'Y', 'batch', NULL, '2025-07-11 10:48:33', NULL, 'system'),
(81, 3, '2025-07-31', '10:10:00', '10:35:00', 1, 'R4006', 'Y', 'batch', NULL, '2025-07-31 13:23:56', NULL, 'system'),
(82, 3, '2025-07-31', '10:40:00', '11:05:00', 1, 'R4006', 'Y', 'batch', NULL, '2025-07-31 13:23:56', NULL, 'system'),
(83, 3, '2025-08-05', '10:10:00', '10:35:00', 1, 'R4006', 'Y', 'batch', NULL, '2025-07-31 13:23:56', NULL, 'system'),
(84, 3, '2025-08-05', '10:40:00', '11:05:00', 1, 'R4006', 'Y', 'batch', NULL, '2025-07-31 13:23:56', NULL, 'system'),
(85, 3, '2025-08-07', '10:10:00', '10:35:00', 1, 'R4006', 'Y', 'batch', NULL, '2025-07-31 13:23:56', NULL, 'system'),
(86, 3, '2025-08-07', '10:40:00', '11:05:00', 1, 'R4006', 'Y', 'batch', NULL, '2025-07-31 13:23:56', NULL, 'system'),
(87, 3, '2025-08-12', '10:10:00', '10:35:00', 1, 'R4006', 'Y', 'batch', NULL, '2025-07-31 13:23:56', NULL, 'system'),
(88, 3, '2025-08-12', '10:40:00', '11:05:00', 1, 'R4006', 'Y', 'batch', NULL, '2025-07-31 13:23:56', NULL, 'system'),
(89, 3, '2025-08-14', '10:10:00', '10:35:00', 1, 'R4006', 'Y', 'batch', NULL, '2025-07-31 13:23:56', NULL, 'system'),
(90, 3, '2025-08-14', '10:40:00', '11:05:00', 1, 'R4006', 'Y', 'batch', NULL, '2025-07-31 13:23:56', NULL, 'system'),
(91, 3, '2025-08-19', '10:10:00', '10:35:00', 1, 'R4006', 'Y', 'batch', NULL, '2025-07-31 13:23:56', NULL, 'system'),
(92, 3, '2025-08-19', '10:40:00', '11:05:00', 1, 'R4006', 'Y', 'batch', NULL, '2025-07-31 13:23:56', NULL, 'system'),
(93, 3, '2025-08-21', '10:10:00', '10:35:00', 1, 'R4006', 'Y', 'batch', NULL, '2025-07-31 13:23:56', NULL, 'system'),
(94, 3, '2025-08-21', '10:40:00', '11:05:00', 1, 'R4006', 'Y', 'batch', NULL, '2025-07-31 13:23:56', NULL, 'system'),
(95, 3, '2025-08-26', '10:10:00', '10:35:00', 1, 'R4006', 'Y', 'batch', NULL, '2025-07-31 13:23:56', NULL, 'system'),
(96, 3, '2025-08-26', '10:40:00', '11:05:00', 1, 'R4006', 'Y', 'batch', NULL, '2025-07-31 13:23:56', NULL, 'system'),
(97, 3, '2025-08-28', '10:10:00', '10:35:00', 1, 'R4006', 'Y', 'batch', NULL, '2025-07-31 13:23:56', NULL, 'system'),
(98, 3, '2025-08-28', '10:40:00', '11:05:00', 1, 'R4006', 'Y', 'batch', NULL, '2025-07-31 13:23:56', NULL, 'system'),
(99, 1, '2025-08-01', '10:10:00', '10:35:00', 1, 'R4006,國際研究大樓4F(4th Floor,International Research Building)', 'Y', 'batch', NULL, '2025-07-31 13:35:20', NULL, 'system'),
(100, 1, '2025-08-05', '10:10:00', '10:35:00', 1, 'R4006,國際研究大樓4F(4th Floor,International Research Building)', 'Y', 'batch', NULL, '2025-07-31 13:35:20', NULL, 'system'),
(101, 1, '2025-08-08', '10:10:00', '10:35:00', 1, 'R4006,國際研究大樓4F(4th Floor,International Research Building)', 'Y', 'batch', NULL, '2025-07-31 13:35:20', NULL, 'system'),
(102, 1, '2025-08-12', '10:10:00', '10:35:00', 1, 'R4006,國際研究大樓4F(4th Floor,International Research Building)', 'Y', 'batch', NULL, '2025-07-31 13:35:20', NULL, 'system'),
(103, 1, '2025-08-15', '10:10:00', '10:35:00', 1, 'R4006,國際研究大樓4F(4th Floor,International Research Building)', 'Y', 'batch', NULL, '2025-07-31 13:35:20', NULL, 'system'),
(104, 1, '2025-08-19', '10:10:00', '10:35:00', 1, 'R4006,國際研究大樓4F(4th Floor,International Research Building)', 'Y', 'batch', NULL, '2025-07-31 13:35:20', NULL, 'system'),
(105, 1, '2025-08-22', '10:10:00', '10:35:00', 1, 'R4006,國際研究大樓4F(4th Floor,International Research Building)', 'Y', 'batch', NULL, '2025-07-31 13:35:20', NULL, 'system'),
(106, 1, '2025-08-26', '10:10:00', '10:35:00', 1, 'R4006,國際研究大樓4F(4th Floor,International Research Building)', 'Y', 'batch', NULL, '2025-07-31 13:35:20', NULL, 'system'),
(107, 1, '2025-08-29', '10:10:00', '10:35:00', 1, 'R4006,國際研究大樓4F(4th Floor,International Research Building)', 'Y', 'batch', NULL, '2025-07-31 13:35:20', NULL, 'system'),
(108, 1, '2025-08-01', '09:10:00', '10:00:00', 1, 'R4006,國際研究大樓4F', 'Y', 'once', NULL, '2025-07-31 13:39:59', NULL, 'system'),
(109, 1, '2025-09-03', '09:10:00', '09:35:00', 1, 'IR4006,國際研究大樓4F', 'F', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(110, 1, '2025-09-03', '09:40:00', '10:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(111, 1, '2025-09-05', '09:10:00', '09:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(112, 1, '2025-09-05', '09:40:00', '10:05:00', 1, 'IR4006,國際研究大樓4F', 'F', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(113, 1, '2025-09-08', '09:10:00', '09:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(114, 1, '2025-09-08', '09:40:00', '10:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(115, 1, '2025-09-10', '09:10:00', '09:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(116, 1, '2025-09-10', '09:40:00', '10:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(117, 1, '2025-09-12', '09:10:00', '09:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(118, 1, '2025-09-12', '09:40:00', '10:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(119, 1, '2025-09-15', '09:10:00', '09:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(120, 1, '2025-09-15', '09:40:00', '10:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(121, 1, '2025-09-17', '09:10:00', '09:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(122, 1, '2025-09-17', '09:40:00', '10:05:00', 1, 'IR4006,國際研究大樓4F', 'F', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(123, 1, '2025-09-19', '09:10:00', '09:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(124, 1, '2025-09-19', '09:40:00', '10:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(125, 1, '2025-09-22', '09:10:00', '09:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(126, 1, '2025-09-22', '09:40:00', '10:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(127, 1, '2025-09-24', '09:10:00', '09:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(128, 1, '2025-09-24', '09:40:00', '10:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(129, 1, '2025-09-26', '09:10:00', '09:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(130, 1, '2025-09-26', '09:40:00', '10:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(131, 1, '2025-09-29', '09:10:00', '09:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(132, 1, '2025-09-29', '09:40:00', '10:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(133, 1, '2025-10-01', '09:10:00', '09:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(134, 1, '2025-10-01', '09:40:00', '10:05:00', 1, 'IR4006,國際研究大樓4F', 'F', 'batch', NULL, '2025-09-02 11:04:14', NULL, 'system'),
(135, 2, '2025-09-02', '10:10:00', '10:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(136, 2, '2025-09-02', '10:40:00', '11:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(137, 2, '2025-09-03', '10:10:00', '10:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(138, 2, '2025-09-03', '10:40:00', '11:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(139, 2, '2025-09-04', '10:10:00', '10:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(140, 2, '2025-09-04', '10:40:00', '11:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(141, 2, '2025-09-09', '10:10:00', '10:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(142, 2, '2025-09-09', '10:40:00', '11:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(143, 2, '2025-09-10', '10:10:00', '10:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(144, 2, '2025-09-10', '10:40:00', '11:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(145, 2, '2025-09-11', '10:10:00', '10:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(146, 2, '2025-09-11', '10:40:00', '11:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(147, 2, '2025-09-16', '10:10:00', '10:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(148, 2, '2025-09-16', '10:40:00', '11:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(149, 2, '2025-09-17', '10:10:00', '10:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(150, 2, '2025-09-17', '10:40:00', '11:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'tester'),
(151, 2, '2025-09-18', '10:10:00', '10:35:00', 1, 'IR4006,國際研究大樓4F', 'F', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(152, 2, '2025-09-18', '10:40:00', '11:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(153, 2, '2025-09-23', '10:10:00', '10:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(154, 2, '2025-09-23', '10:40:00', '11:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(155, 2, '2025-09-24', '10:10:00', '10:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(156, 2, '2025-09-24', '10:40:00', '11:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(157, 2, '2025-09-25', '10:10:00', '10:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(158, 2, '2025-09-25', '10:40:00', '11:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(159, 2, '2025-09-30', '10:10:00', '10:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(160, 2, '2025-09-30', '10:40:00', '11:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(161, 2, '2025-10-01', '10:10:00', '10:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(162, 2, '2025-10-01', '10:40:00', '11:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(163, 2, '2025-10-02', '10:10:00', '10:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(164, 2, '2025-10-02', '10:40:00', '11:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:04:34', NULL, 'system'),
(165, 3, '2025-09-02', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(166, 3, '2025-09-02', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(167, 3, '2025-09-03', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(168, 3, '2025-09-03', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(169, 3, '2025-09-04', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(170, 3, '2025-09-04', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(171, 3, '2025-09-05', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(172, 3, '2025-09-05', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', '2025-10-07 16:45:49', 'tester'),
(173, 3, '2025-09-08', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(174, 3, '2025-09-08', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(175, 3, '2025-09-09', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(176, 3, '2025-09-09', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(177, 3, '2025-09-10', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(178, 3, '2025-09-10', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(179, 3, '2025-09-11', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(180, 3, '2025-09-11', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(181, 3, '2025-09-12', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(182, 3, '2025-09-12', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(183, 3, '2025-09-15', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(184, 3, '2025-09-15', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(185, 3, '2025-09-16', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(186, 3, '2025-09-16', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(189, 3, '2025-09-18', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(190, 3, '2025-09-18', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(191, 3, '2025-09-19', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(192, 3, '2025-09-19', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(193, 3, '2025-09-22', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(194, 3, '2025-09-22', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(195, 3, '2025-09-23', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(196, 3, '2025-09-23', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(197, 3, '2025-09-24', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(198, 3, '2025-09-24', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(199, 3, '2025-09-25', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(200, 3, '2025-09-25', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(201, 3, '2025-09-26', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(202, 3, '2025-09-26', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(203, 3, '2025-09-29', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(204, 3, '2025-09-29', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(205, 3, '2025-09-30', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F', 'F', 'batch', NULL, '2025-09-02 11:05:07', '2025-10-07 18:11:01', 'tester'),
(206, 3, '2025-09-30', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F', 'F', 'batch', NULL, '2025-09-02 11:05:07', '2025-10-07 18:05:38', 'tester'),
(207, 3, '2025-10-01', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F', 'F', 'batch', NULL, '2025-09-02 11:05:07', '2025-10-07 18:06:20', 'tester'),
(208, 3, '2025-10-01', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(209, 3, '2025-10-02', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(210, 3, '2025-10-02', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F', 'Y', 'batch', NULL, '2025-09-02 11:05:07', NULL, 'system'),
(211, 1, '2025-10-02', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(212, 1, '2025-10-02', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(213, 1, '2025-10-03', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(214, 1, '2025-10-03', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(215, 1, '2025-10-06', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(216, 1, '2025-10-06', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(217, 1, '2025-10-07', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(218, 1, '2025-10-07', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'F', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(219, 1, '2025-10-08', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(220, 1, '2025-10-08', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(221, 1, '2025-10-09', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(222, 1, '2025-10-09', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(223, 1, '2025-10-10', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(224, 1, '2025-10-10', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(225, 1, '2025-10-13', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(226, 1, '2025-10-13', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(227, 1, '2025-10-14', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(228, 1, '2025-10-14', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(229, 1, '2025-10-15', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(230, 1, '2025-10-15', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(231, 1, '2025-10-16', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(232, 1, '2025-10-16', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(233, 1, '2025-10-17', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(234, 1, '2025-10-17', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(235, 1, '2025-10-20', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(236, 1, '2025-10-20', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(237, 1, '2025-10-21', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(238, 1, '2025-10-21', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(239, 1, '2025-10-22', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(240, 1, '2025-10-22', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(241, 1, '2025-10-23', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(242, 1, '2025-10-23', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(243, 1, '2025-10-24', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(244, 1, '2025-10-24', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(245, 1, '2025-10-27', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(246, 1, '2025-10-27', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(247, 1, '2025-10-28', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(248, 1, '2025-10-28', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(249, 1, '2025-10-29', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(250, 1, '2025-10-29', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(251, 1, '2025-10-30', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(252, 1, '2025-10-30', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(253, 1, '2025-10-31', '11:10:00', '11:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(254, 1, '2025-10-31', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:51:47', NULL, 'system'),
(255, 2, '2025-10-02', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(256, 2, '2025-10-02', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(257, 2, '2025-10-03', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(258, 2, '2025-10-03', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(259, 2, '2025-10-06', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(260, 2, '2025-10-06', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(261, 2, '2025-10-07', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(262, 2, '2025-10-07', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(263, 2, '2025-10-08', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(264, 2, '2025-10-08', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(265, 2, '2025-10-09', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(266, 2, '2025-10-09', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(267, 2, '2025-10-10', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(268, 2, '2025-10-10', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(269, 2, '2025-10-13', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(270, 2, '2025-10-13', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(271, 2, '2025-10-14', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(272, 2, '2025-10-14', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(273, 2, '2025-10-15', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(274, 2, '2025-10-15', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(275, 2, '2025-10-16', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(276, 2, '2025-10-16', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(277, 2, '2025-10-17', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(278, 2, '2025-10-17', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(279, 2, '2025-10-20', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(280, 2, '2025-10-20', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(281, 2, '2025-10-21', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(282, 2, '2025-10-21', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(283, 2, '2025-10-22', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(284, 2, '2025-10-22', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(285, 2, '2025-10-23', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(286, 2, '2025-10-23', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(287, 2, '2025-10-24', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(288, 2, '2025-10-24', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(289, 2, '2025-10-27', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(290, 2, '2025-10-27', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(291, 2, '2025-10-28', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(292, 2, '2025-10-28', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(293, 2, '2025-10-29', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(294, 2, '2025-10-29', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(295, 2, '2025-10-30', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(296, 2, '2025-10-30', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(297, 2, '2025-10-31', '11:40:00', '12:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(298, 2, '2025-10-31', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-02 13:53:29', NULL, 'system'),
(299, 2, '2025-09-05', '09:00:00', '10:00:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'weekly', '2025-09-26', '2025-10-07 16:44:10', NULL, 'system'),
(300, 2, '2025-09-12', '09:00:00', '10:00:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'weekly', '2025-09-26', '2025-10-07 16:44:10', NULL, 'system'),
(301, 2, '2025-09-19', '09:00:00', '10:00:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'weekly', '2025-09-26', '2025-10-07 16:44:10', NULL, 'system'),
(302, 2, '2025-09-26', '09:00:00', '10:00:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'weekly', '2025-09-26', '2025-10-07 16:44:10', NULL, 'system'),
(303, 3, '2025-09-03', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-07 16:45:10', NULL, 'system'),
(304, 3, '2025-09-03', '13:40:00', '14:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-07 16:45:10', NULL, 'system'),
(305, 3, '2025-09-08', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-07 16:45:10', NULL, 'system'),
(306, 3, '2025-09-08', '13:40:00', '14:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-07 16:45:10', NULL, 'system'),
(307, 3, '2025-09-10', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-07 16:45:10', NULL, 'system'),
(308, 3, '2025-09-10', '13:40:00', '14:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-07 16:45:10', NULL, 'system'),
(309, 3, '2025-09-15', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-07 16:45:10', NULL, 'system'),
(310, 3, '2025-09-15', '13:40:00', '14:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-07 16:45:10', NULL, 'system'),
(312, 3, '2025-09-17', '13:40:00', '14:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-07 16:45:10', NULL, 'system'),
(313, 3, '2025-09-22', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-07 16:45:10', NULL, 'system'),
(314, 3, '2025-09-22', '13:40:00', '14:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-07 16:45:10', NULL, 'system'),
(315, 3, '2025-09-24', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-07 16:45:10', NULL, 'system'),
(316, 3, '2025-09-24', '13:40:00', '14:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-07 16:45:10', NULL, 'system'),
(317, 3, '2025-09-29', '13:10:00', '13:35:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-07 16:45:10', NULL, 'system'),
(318, 3, '2025-09-29', '13:40:00', '14:05:00', 1, 'IR4006,國際研究大樓4F (International Research Building 4F, 4006 Room)', 'Y', 'batch', NULL, '2025-10-07 16:45:10', NULL, 'system');

-- --------------------------------------------------------

--
-- 資料表結構 `time_slots`
--

CREATE TABLE `time_slots` (
  `slot_id` int NOT NULL COMMENT '時段ID',
  `slot_name` varchar(100) NOT NULL COMMENT '時段名稱',
  `start_time` time NOT NULL COMMENT '開始時間',
  `end_time` time NOT NULL COMMENT '結束時間',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '建檔日期',
  `updated_by` varchar(100) DEFAULT NULL COMMENT '更新人員'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='標準預約時段定義';

--
-- 傾印資料表的資料 `time_slots`
--

INSERT INTO `time_slots` (`slot_id`, `slot_name`, `start_time`, `end_time`, `update_date`, `create_date`, `updated_by`) VALUES
(1, 'A1', '08:10:00', '09:00:00', '2025-07-04 10:59:40', '2025-07-03 17:51:24', ''),
(2, 'A2', '09:10:00', '10:00:00', '2025-07-03 17:51:57', '2025-07-03 17:51:57', ''),
(3, 'A3', '10:10:00', '11:00:00', '2025-07-03 17:52:19', '2025-07-03 17:52:19', ''),
(4, 'A4', '11:10:00', '12:00:00', '2025-07-03 17:52:49', '2025-07-03 17:52:49', '');

-- --------------------------------------------------------

--
-- 資料表結構 `users`
--

CREATE TABLE `users` (
  `user_id` int NOT NULL COMMENT '使用者ID，自動遞增的主鍵',
  `userNo` varchar(50) NOT NULL COMMENT '使用者帳號，需唯一',
  `userPassword` varchar(255) NOT NULL COMMENT '使用者密碼（加密後存儲）',
  `email` varchar(100) NOT NULL COMMENT '電子郵件地址，需唯一',
  `phone` varchar(50) DEFAULT NULL COMMENT '電話號碼',
  `userName` varchar(100) DEFAULT NULL COMMENT '使用者姓名',
  `department` varchar(100) DEFAULT NULL COMMENT '服務單位',
  `startDay` date DEFAULT NULL COMMENT '帳號啟用日期',
  `endDay` date DEFAULT NULL COMMENT '帳號停用日期',
  `userRole` varchar(50) DEFAULT 'user' COMMENT '帳號權限（如：admin, user等）',
  `userStatus` char(1) DEFAULT 'N' COMMENT '啟用狀態（N未確認,Y啟用或D停用）',
  `forget_verify` varchar(50) DEFAULT NULL COMMENT '忘記密碼驗證',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '建檔日期',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `updated_by` varchar(100) DEFAULT NULL COMMENT '更新人員'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='使用者資料表';

--
-- 傾印資料表的資料 `users`
--

INSERT INTO `users` (`user_id`, `userNo`, `userPassword`, `email`, `phone`, `userName`, `department`, `startDay`, `endDay`, `userRole`, `userStatus`, `forget_verify`, `create_date`, `update_date`, `updated_by`) VALUES
(1, 'u01', '$2y$10$c8bBuEoAppTbN6lqciwdUOtolQd2vQFgGnyAo7DZ34Dl22lF4cg8O', 'aa@bb.cc', NULL, 'tester', '', '2025-06-01', '2099-07-12', 'admin', 'Y', NULL, '2025-06-05 17:58:34', '2025-06-05 17:58:33', ''),
(2, 'admin', '$2y$10$eA/HR.xHtidQLALyOk6KFO6scyA/HcNi.KVIPeU1Za1gNw46dHcbO', 'admin@bb.cc', NULL, 'Admin', '', '2025-07-01', NULL, 'admin', 'Y', NULL, '2025-07-04 10:09:21', '2025-07-04 10:09:21', 'u01'),
(3, 'ta001', '$2y$10$juQ350nxg06npgWxvJaEWee2CvcHHhEzTJrNc3IQucwqAuYtFnura', '5574932+0@gmail.com', '', '王小花', '', '2025-07-04', NULL, 'teacher', 'Y', NULL, '2025-07-04 15:07:42', '2025-08-18 14:02:50', 'tester'),
(4, 's002', '$2y$10$d7Trqz5JQBn0TPFVdiTqh.RZZqv.tEGYKegbB9Gd33rQnexzaX2eC', 's002@bb.cc', NULL, '丁二烯', NULL, NULL, NULL, 'student', 'Y', NULL, '2025-07-08 15:16:27', NULL, NULL),
(9, 's101', '$2y$10$yYTwE4VZAr7rCzxr2H5q/OAS.Fc6DN2Rs68.oHjzZfPB06YjudsKK', '5574932@gmail.com', NULL, 'may', NULL, NULL, NULL, 'student', 'Y', NULL, '2025-07-08 15:31:33', NULL, NULL),
(10, 'ta002', '$2y$10$UJ3eeWOFRr2IUrA2mEAB6uqErK/Gj5IVHTfaYvknaFETqDR9B0c0S', 'ta002@bb.cc', '', '林大目', '', '2025-07-11', NULL, 'teacher', 'Y', NULL, '2025-07-11 10:05:38', '2025-07-11 14:00:29', 'system'),
(11, 'ta003', '$2y$10$.V9m47EkM1fraWYj3w0MAerbWVReMMxZP1OBM/JLkvY2hTCv.j.J.', 'aaaa@nn.vv', '', '王小芬', '', '2025-07-17', NULL, 'teacher', 'Y', NULL, '2025-07-17 10:53:47', '2025-08-22 17:45:43', 'tester'),
(12, 's003', '$2y$10$Lo7wUGW.yaGTpHxESyatMOSFxH00yMqpz9jsh04fR/q8NbcCBFo3C', '5574932+03@gmail.com', NULL, 'aa', NULL, NULL, NULL, 'student', 'Y', NULL, '2025-08-21 16:11:05', NULL, NULL);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `v_satisfaction_statistics`
-- (請參考以下實際畫面)
--
CREATE TABLE `v_satisfaction_statistics` (
`teacher_id` int
,`teacherName` varchar(100)
,`total_surveys` bigint
,`avg_score` decimal(7,6)
,`avg_scheduling` decimal(7,4)
,`avg_location` decimal(7,4)
,`avg_knowledge` decimal(7,4)
,`avg_skills` decimal(7,4)
,`avg_interaction` decimal(7,4)
,`avg_preparation` decimal(7,4)
,`avg_methods` decimal(7,4)
,`avg_helpful` decimal(7,4)
,`avg_overall` decimal(7,4)
,`recommend_count` decimal(23,0)
,`recommend_rate` decimal(29,2)
);

-- --------------------------------------------------------

--
-- 替換檢視表以便查看 `v_satisfaction_survey`
-- (請參考以下實際畫面)
--
CREATE TABLE `v_satisfaction_survey` (
`survey_id` int
,`booking_id` int
,`student_id` int
,`teacher_id` int
,`session_date` date
,`session_time` varchar(50)
,`q1_practice` text
,`q2_scheduling` tinyint(1)
,`q3_location` tinyint(1)
,`q4_knowledge` tinyint(1)
,`q5_skills` tinyint(1)
,`q6_interaction` tinyint(1)
,`q7_preparation` tinyint(1)
,`q8_methods` tinyint(1)
,`q9_helpful` tinyint(1)
,`q10_overall` tinyint(1)
,`q11_recommend` enum('Yes','No')
,`q12_suggestions` text
,`average_score` decimal(3,2)
,`submit_date` datetime
,`ip_address` varchar(45)
,`create_date` datetime
,`update_date` datetime
,`updated_by` varchar(100)
,`student_name` varchar(50)
,`student_name_en` varchar(100)
,`teacher_name` varchar(100)
,`booking_date` date
,`booking_time` varchar(21)
);

-- --------------------------------------------------------

--
-- 檢視表結構 `v_satisfaction_statistics`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_satisfaction_statistics`  AS SELECT `t`.`teacher_id` AS `teacher_id`, `t`.`teacherName` AS `teacherName`, count(`ss`.`survey_id`) AS `total_surveys`, avg(`ss`.`average_score`) AS `avg_score`, avg(`ss`.`q2_scheduling`) AS `avg_scheduling`, avg(`ss`.`q3_location`) AS `avg_location`, avg(`ss`.`q4_knowledge`) AS `avg_knowledge`, avg(`ss`.`q5_skills`) AS `avg_skills`, avg(`ss`.`q6_interaction`) AS `avg_interaction`, avg(`ss`.`q7_preparation`) AS `avg_preparation`, avg(`ss`.`q8_methods`) AS `avg_methods`, avg(`ss`.`q9_helpful`) AS `avg_helpful`, avg(`ss`.`q10_overall`) AS `avg_overall`, sum((case when (`ss`.`q11_recommend` = 'Yes') then 1 else 0 end)) AS `recommend_count`, round(((sum((case when (`ss`.`q11_recommend` = 'Yes') then 1 else 0 end)) * 100.0) / count(`ss`.`survey_id`)),2) AS `recommend_rate` FROM (`teachers` `t` left join `satisfaction_survey` `ss` on((`t`.`teacher_id` = `ss`.`teacher_id`))) GROUP BY `t`.`teacher_id`, `t`.`teacherName` ;

-- --------------------------------------------------------

--
-- 檢視表結構 `v_satisfaction_survey`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v_satisfaction_survey`  AS SELECT `ss`.`survey_id` AS `survey_id`, `ss`.`booking_id` AS `booking_id`, `ss`.`student_id` AS `student_id`, `ss`.`teacher_id` AS `teacher_id`, `ss`.`session_date` AS `session_date`, `ss`.`session_time` AS `session_time`, `ss`.`q1_practice` AS `q1_practice`, `ss`.`q2_scheduling` AS `q2_scheduling`, `ss`.`q3_location` AS `q3_location`, `ss`.`q4_knowledge` AS `q4_knowledge`, `ss`.`q5_skills` AS `q5_skills`, `ss`.`q6_interaction` AS `q6_interaction`, `ss`.`q7_preparation` AS `q7_preparation`, `ss`.`q8_methods` AS `q8_methods`, `ss`.`q9_helpful` AS `q9_helpful`, `ss`.`q10_overall` AS `q10_overall`, `ss`.`q11_recommend` AS `q11_recommend`, `ss`.`q12_suggestions` AS `q12_suggestions`, `ss`.`average_score` AS `average_score`, `ss`.`submit_date` AS `submit_date`, `ss`.`ip_address` AS `ip_address`, `ss`.`create_date` AS `create_date`, `ss`.`update_date` AS `update_date`, `ss`.`updated_by` AS `updated_by`, `s`.`chinese_name` AS `student_name`, `s`.`english_name` AS `student_name_en`, `t`.`teacherName` AS `teacher_name`, `b`.`booking_date` AS `booking_date`, concat(`b`.`start_time`,'-',`b`.`end_time`) AS `booking_time` FROM (((`satisfaction_survey` `ss` join `bookings` `b` on((`ss`.`booking_id` = `b`.`booking_id`))) join `students` `s` on((`ss`.`student_id` = `s`.`student_id`))) join `teachers` `t` on((`ss`.`teacher_id` = `t`.`teacher_id`))) ;

--
-- 已傾印資料表的索引
--

--
-- 資料表索引 `bookings`
--
ALTER TABLE `bookings`
  ADD PRIMARY KEY (`booking_id`),
  ADD UNIQUE KEY `booking_no` (`booking_no`),
  ADD KEY `teacher_id` (`teacher_id`),
  ADD KEY `schedule_id` (`schedule_id`),
  ADD KEY `idx_booking_date` (`booking_date`),
  ADD KEY `idx_booking_status` (`booking_status`),
  ADD KEY `idx_student_teacher` (`student_id`,`teacher_id`);

--
-- 資料表索引 `class_statistics`
--
ALTER TABLE `class_statistics`
  ADD PRIMARY KEY (`stat_id`),
  ADD UNIQUE KEY `uk_month_teacher_student` (`stat_month`,`teacher_id`,`student_id`),
  ADD KEY `teacher_id` (`teacher_id`),
  ADD KEY `student_id` (`student_id`);

--
-- 資料表索引 `login_logs`
--
ALTER TABLE `login_logs`
  ADD PRIMARY KEY (`log_id`),
  ADD KEY `idx_student_id` (`student_id`),
  ADD KEY `idx_login_time` (`login_time`);

--
-- 資料表索引 `log_use`
--
ALTER TABLE `log_use`
  ADD PRIMARY KEY (`rid`);

--
-- 資料表索引 `meeting_rooms`
--
ALTER TABLE `meeting_rooms`
  ADD PRIMARY KEY (`room_id`);

--
-- 資料表索引 `password_resets`
--
ALTER TABLE `password_resets`
  ADD PRIMARY KEY (`reset_id`),
  ADD UNIQUE KEY `token` (`token`),
  ADD KEY `idx_email` (`email`),
  ADD KEY `idx_token` (`token`),
  ADD KEY `idx_expires` (`expires_at`);

--
-- 資料表索引 `registration_logs`
--
ALTER TABLE `registration_logs`
  ADD PRIMARY KEY (`log_id`),
  ADD KEY `idx_student_id` (`student_id`),
  ADD KEY `idx_created_at` (`created_at`);

--
-- 資料表索引 `remember_tokens`
--
ALTER TABLE `remember_tokens`
  ADD PRIMARY KEY (`token_id`),
  ADD UNIQUE KEY `token` (`token`),
  ADD KEY `student_id` (`student_id`),
  ADD KEY `idx_token` (`token`),
  ADD KEY `idx_expires` (`expires_at`);

--
-- 資料表索引 `reservations`
--
ALTER TABLE `reservations`
  ADD PRIMARY KEY (`reservation_id`),
  ADD KEY `fk_reservations_roomid` (`room_id`),
  ADD KEY `fk_reservations_userid` (`user_id`),
  ADD KEY `idx_reservations_rootid` (`root_id`);

--
-- 資料表索引 `reviews`
--
ALTER TABLE `reviews`
  ADD PRIMARY KEY (`review_id`),
  ADD UNIQUE KEY `uk_booking_reviewer` (`booking_id`,`reviewer_type`),
  ADD KEY `reviewer_id` (`reviewer_id`),
  ADD KEY `idx_reviewer` (`reviewer_type`,`reviewer_id`);

--
-- 資料表索引 `satisfaction_survey`
--
ALTER TABLE `satisfaction_survey`
  ADD PRIMARY KEY (`survey_id`),
  ADD UNIQUE KEY `uk_booking` (`booking_id`),
  ADD KEY `teacher_id` (`teacher_id`),
  ADD KEY `idx_session_date` (`session_date`),
  ADD KEY `idx_student_teacher` (`student_id`,`teacher_id`),
  ADD KEY `idx_submit_date` (`submit_date`),
  ADD KEY `idx_average_score` (`average_score`);

--
-- 資料表索引 `students`
--
ALTER TABLE `students`
  ADD PRIMARY KEY (`student_id`),
  ADD UNIQUE KEY `studentNo` (`studentNo`),
  ADD UNIQUE KEY `email` (`email`);

--
-- 資料表索引 `system_logs`
--
ALTER TABLE `system_logs`
  ADD PRIMARY KEY (`log_id`);

--
-- 資料表索引 `system_news`
--
ALTER TABLE `system_news`
  ADD PRIMARY KEY (`news_id`);

--
-- 資料表索引 `system_settings`
--
ALTER TABLE `system_settings`
  ADD PRIMARY KEY (`setting_id`),
  ADD UNIQUE KEY `setting_key` (`setting_key`);

--
-- 資料表索引 `teachers`
--
ALTER TABLE `teachers`
  ADD PRIMARY KEY (`teacher_id`),
  ADD UNIQUE KEY `user_id` (`user_id`);

--
-- 資料表索引 `teacher_class`
--
ALTER TABLE `teacher_class`
  ADD PRIMARY KEY (`record_id`),
  ADD KEY `idx_class_date` (`class_date`),
  ADD KEY `idx_teacher_date` (`teacher_id`,`class_date`),
  ADD KEY `idx_student_date` (`student_id`,`class_date`),
  ADD KEY `idx_schedule_date` (`schedule_id`,`class_date`),
  ADD KEY `idx_attendance` (`attendance_status`);

--
-- 資料表索引 `teacher_schedules`
--
ALTER TABLE `teacher_schedules`
  ADD PRIMARY KEY (`schedule_id`),
  ADD KEY `idx_available_date` (`available_date`),
  ADD KEY `idx_teacher_date` (`teacher_id`,`available_date`);

--
-- 資料表索引 `time_slots`
--
ALTER TABLE `time_slots`
  ADD PRIMARY KEY (`slot_id`);

--
-- 資料表索引 `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`user_id`),
  ADD UNIQUE KEY `userNo` (`userNo`),
  ADD UNIQUE KEY `email` (`email`);

--
-- 在傾印的資料表使用自動遞增(AUTO_INCREMENT)
--

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `bookings`
--
ALTER TABLE `bookings`
  MODIFY `booking_id` int NOT NULL AUTO_INCREMENT COMMENT '預約ID', AUTO_INCREMENT=23;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `class_statistics`
--
ALTER TABLE `class_statistics`
  MODIFY `stat_id` int NOT NULL AUTO_INCREMENT COMMENT '統計ID';

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `login_logs`
--
ALTER TABLE `login_logs`
  MODIFY `log_id` int NOT NULL AUTO_INCREMENT COMMENT '記錄ID', AUTO_INCREMENT=100;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `log_use`
--
ALTER TABLE `log_use`
  MODIFY `rid` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=60;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `meeting_rooms`
--
ALTER TABLE `meeting_rooms`
  MODIFY `room_id` int NOT NULL AUTO_INCREMENT COMMENT '教室ID', AUTO_INCREMENT=4;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `password_resets`
--
ALTER TABLE `password_resets`
  MODIFY `reset_id` int NOT NULL AUTO_INCREMENT COMMENT '重設ID', AUTO_INCREMENT=13;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `registration_logs`
--
ALTER TABLE `registration_logs`
  MODIFY `log_id` int NOT NULL AUTO_INCREMENT COMMENT '記錄ID', AUTO_INCREMENT=4;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `remember_tokens`
--
ALTER TABLE `remember_tokens`
  MODIFY `token_id` int NOT NULL AUTO_INCREMENT COMMENT 'Token ID', AUTO_INCREMENT=4;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `reservations`
--
ALTER TABLE `reservations`
  MODIFY `reservation_id` int NOT NULL AUTO_INCREMENT COMMENT '預約ID';

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `reviews`
--
ALTER TABLE `reviews`
  MODIFY `review_id` int NOT NULL AUTO_INCREMENT COMMENT '評價ID';

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `satisfaction_survey`
--
ALTER TABLE `satisfaction_survey`
  MODIFY `survey_id` int NOT NULL AUTO_INCREMENT COMMENT '調查表ID';

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `students`
--
ALTER TABLE `students`
  MODIFY `student_id` int NOT NULL AUTO_INCREMENT COMMENT '學生ID', AUTO_INCREMENT=6;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `system_logs`
--
ALTER TABLE `system_logs`
  MODIFY `log_id` int NOT NULL AUTO_INCREMENT COMMENT '日誌ID', AUTO_INCREMENT=45;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `system_news`
--
ALTER TABLE `system_news`
  MODIFY `news_id` int NOT NULL AUTO_INCREMENT COMMENT '公告編號', AUTO_INCREMENT=3;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `system_settings`
--
ALTER TABLE `system_settings`
  MODIFY `setting_id` int NOT NULL AUTO_INCREMENT COMMENT '設定ID', AUTO_INCREMENT=8;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `teachers`
--
ALTER TABLE `teachers`
  MODIFY `teacher_id` int NOT NULL AUTO_INCREMENT COMMENT '老師ID', AUTO_INCREMENT=4;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `teacher_class`
--
ALTER TABLE `teacher_class`
  MODIFY `record_id` int NOT NULL AUTO_INCREMENT COMMENT '上課記錄ID', AUTO_INCREMENT=17;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `teacher_schedules`
--
ALTER TABLE `teacher_schedules`
  MODIFY `schedule_id` int NOT NULL AUTO_INCREMENT COMMENT '排班ID', AUTO_INCREMENT=319;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `time_slots`
--
ALTER TABLE `time_slots`
  MODIFY `slot_id` int NOT NULL AUTO_INCREMENT COMMENT '時段ID', AUTO_INCREMENT=5;

--
-- 使用資料表自動遞增(AUTO_INCREMENT) `users`
--
ALTER TABLE `users`
  MODIFY `user_id` int NOT NULL AUTO_INCREMENT COMMENT '使用者ID，自動遞增的主鍵', AUTO_INCREMENT=15;

--
-- 已傾印資料表的限制式
--

--
-- 資料表的限制式 `bookings`
--
ALTER TABLE `bookings`
  ADD CONSTRAINT `bookings_ibfk_1` FOREIGN KEY (`student_id`) REFERENCES `students` (`student_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `bookings_ibfk_2` FOREIGN KEY (`teacher_id`) REFERENCES `teachers` (`teacher_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `bookings_ibfk_3` FOREIGN KEY (`schedule_id`) REFERENCES `teacher_schedules` (`schedule_id`) ON DELETE CASCADE;

--
-- 資料表的限制式 `class_statistics`
--
ALTER TABLE `class_statistics`
  ADD CONSTRAINT `class_statistics_ibfk_1` FOREIGN KEY (`teacher_id`) REFERENCES `teachers` (`teacher_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `class_statistics_ibfk_2` FOREIGN KEY (`student_id`) REFERENCES `students` (`student_id`) ON DELETE CASCADE;

--
-- 資料表的限制式 `login_logs`
--
ALTER TABLE `login_logs`
  ADD CONSTRAINT `login_logs_ibfk_1` FOREIGN KEY (`student_id`) REFERENCES `students` (`student_id`) ON DELETE CASCADE;

--
-- 資料表的限制式 `registration_logs`
--
ALTER TABLE `registration_logs`
  ADD CONSTRAINT `registration_logs_ibfk_1` FOREIGN KEY (`student_id`) REFERENCES `students` (`student_id`) ON DELETE CASCADE;

--
-- 資料表的限制式 `remember_tokens`
--
ALTER TABLE `remember_tokens`
  ADD CONSTRAINT `remember_tokens_ibfk_1` FOREIGN KEY (`student_id`) REFERENCES `students` (`student_id`) ON DELETE CASCADE;

--
-- 資料表的限制式 `reservations`
--
ALTER TABLE `reservations`
  ADD CONSTRAINT `fk_reservations_roomid` FOREIGN KEY (`room_id`) REFERENCES `meeting_rooms` (`room_id`),
  ADD CONSTRAINT `fk_reservations_userid` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`);

--
-- 資料表的限制式 `reviews`
--
ALTER TABLE `reviews`
  ADD CONSTRAINT `reviews_ibfk_1` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`booking_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `reviews_ibfk_2` FOREIGN KEY (`reviewer_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- 資料表的限制式 `satisfaction_survey`
--
ALTER TABLE `satisfaction_survey`
  ADD CONSTRAINT `satisfaction_survey_ibfk_1` FOREIGN KEY (`booking_id`) REFERENCES `bookings` (`booking_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `satisfaction_survey_ibfk_2` FOREIGN KEY (`student_id`) REFERENCES `students` (`student_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `satisfaction_survey_ibfk_3` FOREIGN KEY (`teacher_id`) REFERENCES `teachers` (`teacher_id`) ON DELETE CASCADE;

--
-- 資料表的限制式 `teachers`
--
ALTER TABLE `teachers`
  ADD CONSTRAINT `teachers_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE;

--
-- 資料表的限制式 `teacher_class`
--
ALTER TABLE `teacher_class`
  ADD CONSTRAINT `teacher_class_ibfk_1` FOREIGN KEY (`schedule_id`) REFERENCES `teacher_schedules` (`schedule_id`) ON DELETE CASCADE,
  ADD CONSTRAINT `teacher_class_ibfk_2` FOREIGN KEY (`teacher_id`) REFERENCES `teachers` (`teacher_id`) ON DELETE CASCADE;

--
-- 資料表的限制式 `teacher_schedules`
--
ALTER TABLE `teacher_schedules`
  ADD CONSTRAINT `teacher_schedules_ibfk_1` FOREIGN KEY (`teacher_id`) REFERENCES `teachers` (`teacher_id`) ON DELETE CASCADE;
COMMIT;

