时间:2021-07-01 10:21:17 帮助过:3人阅读
package model; import java.util.Date; /** * Created by yinus * Date:2016/4/6 * Time:18:44 */ public class Course { private int id; private String title; private Date createTime; private Date updateTime; public Course() { } public Course(int id, String title) { this.id = id; this.title = title; this.createTime = new Date(); this.updateTime = new Date(); } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Date getUpdateTime() { return updateTime; } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } @Override public String toString() { return "id:"+this.getId()+" name:"+this.getTitle()+" createTime:"+this.getCreateTime()+" updateTime:"+this.getUpdateTime(); } }
package model; import java.util.Date; /** * Created by yinus * Date:2016/4/6 * Time:18:44 */ public class Student { private int id; private String name; private Date createTime; private Date updateTime; public Student() {} public Student(int id, String name) { this.id = id; this.name = name; this.createTime = new Date(); this.updateTime = new Date(); } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Date getUpdateTime() { return updateTime; } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } @Override public String toString() { return "id:"+this.getId()+" name:"+this.getName()+" createTime:"+this.getCreateTime()+" updateTime:"+this.getUpdateTime(); } }
第二次数据库作业--model
标签: