|
|
@ -1,27 +1,52 @@
|
|
|
|
package com.zsz.pojo;
|
|
|
|
package com.zsz.pojo;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 导入 MyBatis-Plus 框架中用于指定主键生成类型的注解,此处会用到自增类型
|
|
|
|
import com.baomidou.mybatisplus.annotation.IdType;
|
|
|
|
import com.baomidou.mybatisplus.annotation.IdType;
|
|
|
|
|
|
|
|
// 导入 MyBatis-Plus 框架中用于标记实体类主键字段的注解
|
|
|
|
import com.baomidou.mybatisplus.annotation.TableId;
|
|
|
|
import com.baomidou.mybatisplus.annotation.TableId;
|
|
|
|
|
|
|
|
// 导入 MyBatis-Plus 框架中用于指定实体类对应数据库表名的注解
|
|
|
|
import com.baomidou.mybatisplus.annotation.TableName;
|
|
|
|
import com.baomidou.mybatisplus.annotation.TableName;
|
|
|
|
|
|
|
|
// 导入 Lombok 库的注解,用于自动生成全参构造函数
|
|
|
|
import lombok.AllArgsConstructor;
|
|
|
|
import lombok.AllArgsConstructor;
|
|
|
|
|
|
|
|
// 导入 Lombok 库的注解,用于自动生成常用的 getter、setter、toString、equals、hashCode 等方法
|
|
|
|
import lombok.Data;
|
|
|
|
import lombok.Data;
|
|
|
|
|
|
|
|
// 导入 Lombok 库的注解,用于自动生成无参构造函数
|
|
|
|
import lombok.NoArgsConstructor;
|
|
|
|
import lombok.NoArgsConstructor;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 学生实体类,用于封装学生的相关信息,和数据库中的 tb_student 表对应。
|
|
|
|
|
|
|
|
* 通过 Lombok 注解简化代码,利用 MyBatis-Plus 注解进行数据库映射配置。
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
// 自动生成 getter、setter、toString、equals、hashCode 等方法
|
|
|
|
@Data
|
|
|
|
@Data
|
|
|
|
|
|
|
|
// 自动生成包含所有字段的全参构造函数
|
|
|
|
@AllArgsConstructor
|
|
|
|
@AllArgsConstructor
|
|
|
|
|
|
|
|
// 自动生成无参构造函数
|
|
|
|
@NoArgsConstructor
|
|
|
|
@NoArgsConstructor
|
|
|
|
|
|
|
|
// 指定该实体类对应数据库中的 tb_student 表
|
|
|
|
@TableName("tb_student")
|
|
|
|
@TableName("tb_student")
|
|
|
|
public class Student {
|
|
|
|
public class Student {
|
|
|
|
@TableId(value = "id",type = IdType.AUTO)
|
|
|
|
// 标记 id 字段为主键,并且采用数据库自增的方式生成主键值
|
|
|
|
|
|
|
|
@TableId(value = "id", type = IdType.AUTO)
|
|
|
|
private Integer id;
|
|
|
|
private Integer id;
|
|
|
|
|
|
|
|
// 学生学号
|
|
|
|
private String sno;
|
|
|
|
private String sno;
|
|
|
|
|
|
|
|
// 学生姓名
|
|
|
|
private String name;
|
|
|
|
private String name;
|
|
|
|
|
|
|
|
// 学生性别
|
|
|
|
private char gender;
|
|
|
|
private char gender;
|
|
|
|
|
|
|
|
// 学生登录密码
|
|
|
|
private String password;
|
|
|
|
private String password;
|
|
|
|
|
|
|
|
// 学生电子邮箱
|
|
|
|
private String email;
|
|
|
|
private String email;
|
|
|
|
|
|
|
|
// 学生联系电话
|
|
|
|
private String telephone;
|
|
|
|
private String telephone;
|
|
|
|
|
|
|
|
// 学生家庭住址
|
|
|
|
private String address;
|
|
|
|
private String address;
|
|
|
|
|
|
|
|
// 学生个人简介
|
|
|
|
private String introducation;
|
|
|
|
private String introducation;
|
|
|
|
|
|
|
|
// 学生头像图片的存储路径
|
|
|
|
private String portraitPath;
|
|
|
|
private String portraitPath;
|
|
|
|
|
|
|
|
// 学生所在班级名称
|
|
|
|
private String clazzName;
|
|
|
|
private String clazzName;
|
|
|
|
}
|
|
|
|
}
|