123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398 |
- package com.qxgmat.data.dao.entity;
- import com.alibaba.fastjson.JSONObject;
- import java.io.Serializable;
- import java.math.BigDecimal;
- import java.util.Date;
- import javax.persistence.*;
- @Table(name = "course_package")
- public class CoursePackage implements Serializable {
- @Id
- @Column(name = "`id`")
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- private Integer id;
- /**
- * 学科
- */
- @Column(name = "`struct_id`")
- private Integer structId;
- /**
- * 套餐名称
- */
- @Column(name = "`title`")
- private String title;
- /**
- * 套餐价格
- */
- @Column(name = "`price`")
- private BigDecimal price;
- /**
- * 包含课程
- */
- @Column(name = "`course_ids`")
- private Integer[] courseIds;
- /**
- * 是否精选:首页推荐
- */
- @Column(name = "`is_special`")
- private Integer isSpecial;
- /**
- * 赠品:json
- */
- @Column(name = "`gift`")
- private JSONObject gift;
- /**
- * 销售数量
- */
- @Column(name = "`sale_number`")
- private Integer saleNumber;
- @Column(name = "`create_time`")
- private Date createTime;
- @Column(name = "`update_time`")
- private Date updateTime;
- /**
- * 套餐简介
- */
- @Column(name = "`description`")
- private String description;
- private static final long serialVersionUID = 1L;
- /**
- * @return id
- */
- public Integer getId() {
- return id;
- }
- /**
- * @param id
- */
- public void setId(Integer id) {
- this.id = id;
- }
- /**
- * 获取学科
- *
- * @return struct_id - 学科
- */
- public Integer getStructId() {
- return structId;
- }
- /**
- * 设置学科
- *
- * @param structId 学科
- */
- public void setStructId(Integer structId) {
- this.structId = structId;
- }
- /**
- * 获取套餐名称
- *
- * @return title - 套餐名称
- */
- public String getTitle() {
- return title;
- }
- /**
- * 设置套餐名称
- *
- * @param title 套餐名称
- */
- public void setTitle(String title) {
- this.title = title;
- }
- /**
- * 获取套餐价格
- *
- * @return price - 套餐价格
- */
- public BigDecimal getPrice() {
- return price;
- }
- /**
- * 设置套餐价格
- *
- * @param price 套餐价格
- */
- public void setPrice(BigDecimal price) {
- this.price = price;
- }
- /**
- * 获取包含课程
- *
- * @return course_ids - 包含课程
- */
- public Integer[] getCourseIds() {
- return courseIds;
- }
- /**
- * 设置包含课程
- *
- * @param courseIds 包含课程
- */
- public void setCourseIds(Integer[] courseIds) {
- this.courseIds = courseIds;
- }
- /**
- * 获取是否精选:首页推荐
- *
- * @return is_special - 是否精选:首页推荐
- */
- public Integer getIsSpecial() {
- return isSpecial;
- }
- /**
- * 设置是否精选:首页推荐
- *
- * @param isSpecial 是否精选:首页推荐
- */
- public void setIsSpecial(Integer isSpecial) {
- this.isSpecial = isSpecial;
- }
- /**
- * 获取赠品:json
- *
- * @return gift - 赠品:json
- */
- public JSONObject getGift() {
- return gift;
- }
- /**
- * 设置赠品:json
- *
- * @param gift 赠品:json
- */
- public void setGift(JSONObject gift) {
- this.gift = gift;
- }
- /**
- * 获取销售数量
- *
- * @return sale_number - 销售数量
- */
- public Integer getSaleNumber() {
- return saleNumber;
- }
- /**
- * 设置销售数量
- *
- * @param saleNumber 销售数量
- */
- public void setSaleNumber(Integer saleNumber) {
- this.saleNumber = saleNumber;
- }
- /**
- * @return create_time
- */
- public Date getCreateTime() {
- return createTime;
- }
- /**
- * @param createTime
- */
- public void setCreateTime(Date createTime) {
- this.createTime = createTime;
- }
- /**
- * @return update_time
- */
- public Date getUpdateTime() {
- return updateTime;
- }
- /**
- * @param updateTime
- */
- public void setUpdateTime(Date updateTime) {
- this.updateTime = updateTime;
- }
- /**
- * 获取套餐简介
- *
- * @return description - 套餐简介
- */
- public String getDescription() {
- return description;
- }
- /**
- * 设置套餐简介
- *
- * @param description 套餐简介
- */
- public void setDescription(String description) {
- this.description = description;
- }
- @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(", structId=").append(structId);
- sb.append(", title=").append(title);
- sb.append(", price=").append(price);
- sb.append(", courseIds=").append(courseIds);
- sb.append(", isSpecial=").append(isSpecial);
- sb.append(", gift=").append(gift);
- sb.append(", saleNumber=").append(saleNumber);
- sb.append(", createTime=").append(createTime);
- sb.append(", updateTime=").append(updateTime);
- sb.append(", description=").append(description);
- sb.append("]");
- return sb.toString();
- }
- public static CoursePackage.Builder builder() {
- return new CoursePackage.Builder();
- }
- public static class Builder {
- private CoursePackage obj;
- public Builder() {
- this.obj = new CoursePackage();
- }
- /**
- * @param id
- */
- public Builder id(Integer id) {
- obj.setId(id);
- return this;
- }
- /**
- * 设置学科
- *
- * @param structId 学科
- */
- public Builder structId(Integer structId) {
- obj.setStructId(structId);
- return this;
- }
- /**
- * 设置套餐名称
- *
- * @param title 套餐名称
- */
- public Builder title(String title) {
- obj.setTitle(title);
- return this;
- }
- /**
- * 设置套餐价格
- *
- * @param price 套餐价格
- */
- public Builder price(BigDecimal price) {
- obj.setPrice(price);
- return this;
- }
- /**
- * 设置包含课程
- *
- * @param courseIds 包含课程
- */
- public Builder courseIds(Integer[] courseIds) {
- obj.setCourseIds(courseIds);
- return this;
- }
- /**
- * 设置是否精选:首页推荐
- *
- * @param isSpecial 是否精选:首页推荐
- */
- public Builder isSpecial(Integer isSpecial) {
- obj.setIsSpecial(isSpecial);
- return this;
- }
- /**
- * 设置赠品:json
- *
- * @param gift 赠品:json
- */
- public Builder gift(JSONObject gift) {
- obj.setGift(gift);
- return this;
- }
- /**
- * 设置销售数量
- *
- * @param saleNumber 销售数量
- */
- public Builder saleNumber(Integer saleNumber) {
- obj.setSaleNumber(saleNumber);
- return this;
- }
- /**
- * @param createTime
- */
- public Builder createTime(Date createTime) {
- obj.setCreateTime(createTime);
- return this;
- }
- /**
- * @param updateTime
- */
- public Builder updateTime(Date updateTime) {
- obj.setUpdateTime(updateTime);
- return this;
- }
- /**
- * 设置套餐简介
- *
- * @param description 套餐简介
- */
- public Builder description(String description) {
- obj.setDescription(description);
- return this;
- }
- public CoursePackage build() {
- return this.obj;
- }
- }
- }
|