classroom表代码生成配置(主表)
student表代码生成配置(子表)
设置“班级”菜单
班级列表页面
点击“三年级二班”,显示班级中的学生列表页面
班级表
CREATE TABLE `classroom` (
`classroom_id` int NOT NULL AUTO_INCREMENT,
`classroom_name` varchar(45) COLLATE utf8mb4_da_0900_ai_ci DEFAULT NULL,
`classroom_leader` varchar(45) COLLATE utf8mb4_da_0900_ai_ci DEFAULT NULL,
`status` char(1) COLLATE utf8mb4_da_0900_ai_ci DEFAULT '0',
`create_by` varchar(45) COLLATE utf8mb4_da_0900_ai_ci DEFAULT NULL,
`create_date` datetime DEFAULT NULL,
`update_by` varchar(45) COLLATE utf8mb4_da_0900_ai_ci DEFAULT NULL,
`update_date` datetime DEFAULT NULL,
`remarks` varchar(45) COLLATE utf8mb4_da_0900_ai_ci DEFAULT NULL,
PRIMARY KEY (`classroom_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_da_0900_ai_ci COMMENT='班级';
学生表
CREATE TABLE `student` (
`student_id` int NOT NULL AUTO_INCREMENT,
`cstudent_name` varchar(45) COLLATE utf8mb4_da_0900_ai_ci DEFAULT NULL,
`student_age` int COLLATE utf8mb4_da_0900_ai_ci DEFAULT NULL,
`status` char(1) COLLATE utf8mb4_da_0900_ai_ci DEFAULT '0',
`create_by` varchar(45) COLLATE utf8mb4_da_0900_ai_ci DEFAULT NULL,
`create_date` datetime DEFAULT NULL,
`update_by` varchar(45) COLLATE utf8mb4_da_0900_ai_ci DEFAULT NULL,
`update_date` datetime DEFAULT NULL,
`remarks` varchar(45) COLLATE utf8mb4_da_0900_ai_ci DEFAULT NULL,
`classroom_id` int COLLATE utf8mb4_da_0900_ai_ci DEFAULT NULL,
PRIMARY KEY (`student_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_da_0900_ai_ci COMMENT='学生';