1 Star 0 Fork 3

yswift/LearnJava

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Student.java 1.70 KB
一键复制 编辑 原始数据 按行查看 历史
yswift 提交于 2022-10-06 16:16 +08:00 . add 实验4 基础代码
package db.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.sql.Blob;
import java.sql.Date;
@Entity
public class Student {
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
private int id;
private String no;
private String name;
private int age;
private Date birthday;
private byte[] photo;
public Student() {
}
public Student(int id, String no, String name, int age, Date birthday) {
this.id = id;
this.no = no;
this.name = name;
this.age = age;
this.birthday = birthday;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getNo() {
return no;
}
public void setNo(String no) {
this.no = no;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public Date getBirthday() {
return birthday;
}
public void setBirthday(Date birthday) {
this.birthday = birthday;
}
public byte[] getPhoto() {
return photo;
}
public void setPhoto(byte[] photo) {
this.photo = photo;
}
@Override
public String toString() {
return "Student{" +
"id=" + id +
", no='" + no + '\'' +
", name='" + name + '\'' +
", age=" + age +
", birthday=" + birthday +
'}';
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/yswift/LearnJava.git
git@gitee.com:yswift/LearnJava.git
yswift
LearnJava
LearnJava
master

搜索帮助