课程增加简介字段

This commit is contained in:
none
2023-03-21 15:03:21 +08:00
parent 57535a2ce7
commit a2a1206ec7
5 changed files with 33 additions and 19 deletions

View File

@@ -4,6 +4,7 @@ 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.util.Date;
@@ -12,14 +13,13 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
/**
*
* @TableName courses
*/
@TableName(value ="courses")
@TableName(value = "courses")
@Data
public class Course implements Serializable {
/**
*
*
*/
@TableId(type = IdType.AUTO)
private Integer id;
@@ -39,6 +39,12 @@ public class Course implements Serializable {
*/
private Integer charge;
/**
* 课程简介
*/
@JsonProperty("short_desc")
private String shortDesc;
/**
* 1:必修,0:选修
*/
@@ -81,15 +87,16 @@ public class Course implements Serializable {
}
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.getThumb() == null ? other.getThumb() == null : this.getThumb().equals(other.getThumb()))
&& (this.getCharge() == null ? other.getCharge() == null : this.getCharge().equals(other.getCharge()))
&& (this.getClassHour() == null ? other.getClassHour() == null : this.getClassHour().equals(other.getClassHour()))
&& (this.getIsShow() == null ? other.getIsShow() == null : this.getIsShow().equals(other.getIsShow()))
&& (this.getIsRequired() == null ? other.getIsRequired() == null : this.getIsRequired().equals(other.getIsRequired()))
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
&& (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()))
&& (this.getDeletedAt() == null ? other.getDeletedAt() == null : this.getDeletedAt().equals(other.getDeletedAt()));
&& (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
&& (this.getThumb() == null ? other.getThumb() == null : this.getThumb().equals(other.getThumb()))
&& (this.getCharge() == null ? other.getCharge() == null : this.getCharge().equals(other.getCharge()))
&& (this.getClassHour() == null ? other.getClassHour() == null : this.getClassHour().equals(other.getClassHour()))
&& (this.getIsShow() == null ? other.getIsShow() == null : this.getIsShow().equals(other.getIsShow()))
&& (this.getIsRequired() == null ? other.getIsRequired() == null : this.getIsRequired().equals(other.getIsRequired()))
&& (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
&& (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()))
&& (this.getDeletedAt() == null ? other.getDeletedAt() == null : this.getDeletedAt().equals(other.getDeletedAt()))
&& (this.getShortDesc() == null ? other.getShortDesc() == null : this.getShortDesc().equals(other.getShortDesc()));
}
@Override
@@ -100,6 +107,7 @@ public class Course implements Serializable {
result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
result = prime * result + ((getThumb() == null) ? 0 : getThumb().hashCode());
result = prime * result + ((getCharge() == null) ? 0 : getCharge().hashCode());
result = prime * result + ((getShortDesc() == null) ? 0 : getShortDesc().hashCode());
result = prime * result + ((getClassHour() == null) ? 0 : getClassHour().hashCode());
result = prime * result + ((getIsShow() == null) ? 0 : getIsShow().hashCode());
result = prime * result + ((getIsRequired() == null) ? 0 : getIsRequired().hashCode());
@@ -119,6 +127,7 @@ public class Course implements Serializable {
sb.append(", title=").append(title);
sb.append(", thumb=").append(thumb);
sb.append(", charge=").append(charge);
sb.append(", shortDesc=").append(shortDesc);
sb.append(", classHour=").append(classHour);
sb.append(", isShow=").append(isShow);
sb.append(", isRequired=").append(isRequired);