123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174 |
- package com.futu.goose.course.pojo;
- import com.baomidou.mybatisplus.annotation.IdType;
- import com.baomidou.mybatisplus.annotation.TableField;
- import com.baomidou.mybatisplus.annotation.TableId;
- import com.baomidou.mybatisplus.annotation.TableName;
- import java.io.Serializable;
- import java.math.BigDecimal;
- import java.util.Date;
- import lombok.Data;
- /**
- * 课程表
- * @TableName course
- */
- @TableName(value ="course")
- @Data
- public class Course implements Serializable {
- /**
- * 课程ID(雪花ID)
- */
- @TableId
- private Long id;
- /**
- * 课程标题
- */
- private String title;
- /**
- * 课程副标题
- */
- private String subtitle;
- /**
- * 封面图URL
- */
- private String coverImage;
- /**
- * 分类ID
- */
- private Long categoryId;
- /**
- * 主讲教师ID
- */
- private Long teacherId;
- /**
- * 课程价格
- */
- private BigDecimal price;
- /**
- * 原价
- */
- private BigDecimal originalPrice;
- /**
- * 总课时数
- */
- private Integer duration;
- /**
- * 状态:0-未发布,1-已发布,2-已下架
- */
- private Integer status;
- /**
- * 课程详情
- */
- private String description;
- /**
- * 学习目标
- */
- private String learnGoals;
- /**
- * 学习要求
- */
- private String requirements;
- /**
- * 创建时间
- */
- private Date createTime;
- /**
- * 更新时间
- */
- private Date updateTime;
- @TableField(exist = false)
- private static final long serialVersionUID = 1L;
- @Override
- public boolean equals(Object that) {
- if (this == that) {
- return true;
- }
- if (that == null) {
- return false;
- }
- if (getClass() != that.getClass()) {
- return false;
- }
- Course other = (Course) that;
- return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
- && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
- && (this.getSubtitle() == null ? other.getSubtitle() == null : this.getSubtitle().equals(other.getSubtitle()))
- && (this.getCoverImage() == null ? other.getCoverImage() == null : this.getCoverImage().equals(other.getCoverImage()))
- && (this.getCategoryId() == null ? other.getCategoryId() == null : this.getCategoryId().equals(other.getCategoryId()))
- && (this.getTeacherId() == null ? other.getTeacherId() == null : this.getTeacherId().equals(other.getTeacherId()))
- && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
- && (this.getOriginalPrice() == null ? other.getOriginalPrice() == null : this.getOriginalPrice().equals(other.getOriginalPrice()))
- && (this.getDuration() == null ? other.getDuration() == null : this.getDuration().equals(other.getDuration()))
- && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
- && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
- && (this.getLearnGoals() == null ? other.getLearnGoals() == null : this.getLearnGoals().equals(other.getLearnGoals()))
- && (this.getRequirements() == null ? other.getRequirements() == null : this.getRequirements().equals(other.getRequirements()))
- && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
- && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
- }
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
- result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
- result = prime * result + ((getSubtitle() == null) ? 0 : getSubtitle().hashCode());
- result = prime * result + ((getCoverImage() == null) ? 0 : getCoverImage().hashCode());
- result = prime * result + ((getCategoryId() == null) ? 0 : getCategoryId().hashCode());
- result = prime * result + ((getTeacherId() == null) ? 0 : getTeacherId().hashCode());
- result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
- result = prime * result + ((getOriginalPrice() == null) ? 0 : getOriginalPrice().hashCode());
- result = prime * result + ((getDuration() == null) ? 0 : getDuration().hashCode());
- result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
- result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
- result = prime * result + ((getLearnGoals() == null) ? 0 : getLearnGoals().hashCode());
- result = prime * result + ((getRequirements() == null) ? 0 : getRequirements().hashCode());
- result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
- result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
- return result;
- }
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append(getClass().getSimpleName());
- sb.append(" [");
- sb.append("Hash = ").append(hashCode());
- sb.append(", id=").append(id);
- sb.append(", title=").append(title);
- sb.append(", subtitle=").append(subtitle);
- sb.append(", coverImage=").append(coverImage);
- sb.append(", categoryId=").append(categoryId);
- sb.append(", teacherId=").append(teacherId);
- sb.append(", price=").append(price);
- sb.append(", originalPrice=").append(originalPrice);
- sb.append(", duration=").append(duration);
- sb.append(", status=").append(status);
- sb.append(", description=").append(description);
- sb.append(", learnGoals=").append(learnGoals);
- sb.append(", requirements=").append(requirements);
- sb.append(", createTime=").append(createTime);
- sb.append(", updateTime=").append(updateTime);
- sb.append(", serialVersionUID=").append(serialVersionUID);
- sb.append("]");
- return sb.toString();
- }
- }
|