Course.java 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. package cn.seecoder.courselearning.po;
  2. import cn.seecoder.courselearning.vo.CourseVO;
  3. import lombok.NonNull;
  4. import java.util.Date;
  5. public class Course {
  6. private Integer id;
  7. private String name;
  8. private String type;
  9. private String intro;
  10. private String picture;
  11. private String school;
  12. private Date createTime;
  13. private Date deleteTime;
  14. private Integer cost;
  15. private Integer teacherId;
  16. private String teacherName;
  17. public Integer getId() {
  18. return id;
  19. }
  20. public void setId(Integer id) {
  21. this.id = id;
  22. }
  23. public String getName() {
  24. return name;
  25. }
  26. public void setName(String name) {
  27. this.name = name == null ? null : name.trim();
  28. }
  29. public String getType() {
  30. return type;
  31. }
  32. public void setType(String type) {
  33. this.type = type == null ? null : type.trim();
  34. }
  35. public String getIntro() {
  36. return intro;
  37. }
  38. public void setIntro(String intro) {
  39. this.intro = intro == null ? null : intro.trim();
  40. }
  41. public String getPicture() {
  42. return picture;
  43. }
  44. public void setPicture(String picture) {
  45. this.picture = picture == null ? null : picture.trim();
  46. }
  47. public String getSchool() {
  48. return school;
  49. }
  50. public void setSchool(String school) {
  51. this.school = school == null ? null : school.trim();
  52. }
  53. public Date getCreateTime() {
  54. return createTime;
  55. }
  56. public void setCreateTime(Date createTime) {
  57. this.createTime = createTime;
  58. }
  59. public Date getDeleteTime() {
  60. return deleteTime;
  61. }
  62. public void setDeleteTime(Date deleteTime) {
  63. this.deleteTime = deleteTime;
  64. }
  65. public Integer getCost() {
  66. return cost;
  67. }
  68. public void setCost(Integer cost) {
  69. this.cost = cost;
  70. }
  71. public Integer getTeacherId() {
  72. return teacherId;
  73. }
  74. public void setTeacherId(Integer teacherId) {
  75. this.teacherId = teacherId;
  76. }
  77. public String getTeacherName() {
  78. return teacherName;
  79. }
  80. public void setTeacherName(String teacherName) {
  81. this.teacherName = teacherName == null ? null : teacherName.trim();
  82. }
  83. public Course() {
  84. }
  85. public Course(@NonNull CourseVO courseVO){
  86. this.id = courseVO.getId();
  87. this.name = courseVO.getName();
  88. this.type = courseVO.getType();
  89. this.intro = courseVO.getIntro();
  90. this.picture = courseVO.getPicture();
  91. this.school = courseVO.getSchool();
  92. this.createTime = courseVO.getCreateTime();
  93. this.cost = courseVO.getCost();
  94. this.teacherId = courseVO.getTeacherId();
  95. this.teacherName = courseVO.getTeacherName();
  96. }
  97. }