package com.model; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; /** * Students entity. @author MyEclipse Persistence Tools */ @Entity @Table(name = "students", catalog = "hibernate") public class Students implements java.io.Serializable { // Fields private Integer sid; private String name; private String gender; private Date birthday; private String address; // Constructors /** default constructor */ public Students() { } /** minimal constructor */ public Students(Integer sid) { this.sid = sid; } /** full constructor */ public Students(Integer sid, String name, String gender, Date birthday, String address) { this.sid = sid; this.name = name; this.gender = gender; this.birthday = birthday; this.address = address; } // Property accessors @Id @Column(name = "sid", unique = true, nullable = false) public Integer getSid() { return this.sid; } public void setSid(Integer sid) { this.sid = sid; } @Column(name = "name", length = 50) public String getName() { return this.name; } public void setName(String name) { this.name = name; } @Column(name = "gender", length = 50) public String getGender() { return this.gender; } public void setGender(String gender) { this.gender = gender; } @Column(name = "birthday", length = 19) public Date getBirthday() { return this.birthday; } public void setBirthday(Date birthday) { this.birthday = birthday; } @Column(name = "address", length = 200) public String getAddress() { return this.address; } public void setAddress(String address) { this.address = address; } }
时间: 2024-10-03 14:01:16