123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344 |
- package com.qxgmat.data.dao.entity;
- import java.io.Serializable;
- import java.util.Date;
- import javax.persistence.*;
- @Table(name = "ad")
- public class Ad implements Serializable {
- @Id
- @Column(name = "`id`")
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- private Integer id;
- /**
- * 广告标题
- */
- @Column(name = "`title`")
- private String title;
- /**
- * 频道页面
- */
- @Column(name = "`channel`")
- private String channel;
- /**
- * 位置
- */
- @Column(name = "`place`")
- private String place;
- /**
- * 广告图片
- */
- @Column(name = "`image`")
- private String image;
- /**
- * 广告位置
- */
- @Column(name = "`position`")
- private Integer position;
- /**
- * 广告链接
- */
- @Column(name = "`link`")
- private String link;
- /**
- * 开始时间
- */
- @Column(name = "`start_time`")
- private Date startTime;
- /**
- * 结束时间
- */
- @Column(name = "`end_time`")
- private Date endTime;
- private static final long serialVersionUID = 1L;
- /**
- * @return id
- */
- public Integer getId() {
- return id;
- }
- /**
- * @param id
- */
- public void setId(Integer id) {
- this.id = id;
- }
- /**
- * 获取广告标题
- *
- * @return title - 广告标题
- */
- public String getTitle() {
- return title;
- }
- /**
- * 设置广告标题
- *
- * @param title 广告标题
- */
- public void setTitle(String title) {
- this.title = title;
- }
- /**
- * 获取频道页面
- *
- * @return channel - 频道页面
- */
- public String getChannel() {
- return channel;
- }
- /**
- * 设置频道页面
- *
- * @param channel 频道页面
- */
- public void setChannel(String channel) {
- this.channel = channel;
- }
- /**
- * 获取位置
- *
- * @return place - 位置
- */
- public String getPlace() {
- return place;
- }
- /**
- * 设置位置
- *
- * @param place 位置
- */
- public void setPlace(String place) {
- this.place = place;
- }
- /**
- * 获取广告图片
- *
- * @return image - 广告图片
- */
- public String getImage() {
- return image;
- }
- /**
- * 设置广告图片
- *
- * @param image 广告图片
- */
- public void setImage(String image) {
- this.image = image;
- }
- /**
- * 获取广告位置
- *
- * @return position - 广告位置
- */
- public Integer getPosition() {
- return position;
- }
- /**
- * 设置广告位置
- *
- * @param position 广告位置
- */
- public void setPosition(Integer position) {
- this.position = position;
- }
- /**
- * 获取广告链接
- *
- * @return link - 广告链接
- */
- public String getLink() {
- return link;
- }
- /**
- * 设置广告链接
- *
- * @param link 广告链接
- */
- public void setLink(String link) {
- this.link = link;
- }
- /**
- * 获取开始时间
- *
- * @return start_time - 开始时间
- */
- public Date getStartTime() {
- return startTime;
- }
- /**
- * 设置开始时间
- *
- * @param startTime 开始时间
- */
- public void setStartTime(Date startTime) {
- this.startTime = startTime;
- }
- /**
- * 获取结束时间
- *
- * @return end_time - 结束时间
- */
- public Date getEndTime() {
- return endTime;
- }
- /**
- * 设置结束时间
- *
- * @param endTime 结束时间
- */
- public void setEndTime(Date endTime) {
- this.endTime = endTime;
- }
- @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(", channel=").append(channel);
- sb.append(", place=").append(place);
- sb.append(", image=").append(image);
- sb.append(", position=").append(position);
- sb.append(", link=").append(link);
- sb.append(", startTime=").append(startTime);
- sb.append(", endTime=").append(endTime);
- sb.append("]");
- return sb.toString();
- }
- public static Ad.Builder builder() {
- return new Ad.Builder();
- }
- public static class Builder {
- private Ad obj;
- public Builder() {
- this.obj = new Ad();
- }
- /**
- * @param id
- */
- public Builder id(Integer id) {
- obj.setId(id);
- return this;
- }
- /**
- * 设置广告标题
- *
- * @param title 广告标题
- */
- public Builder title(String title) {
- obj.setTitle(title);
- return this;
- }
- /**
- * 设置频道页面
- *
- * @param channel 频道页面
- */
- public Builder channel(String channel) {
- obj.setChannel(channel);
- return this;
- }
- /**
- * 设置位置
- *
- * @param place 位置
- */
- public Builder place(String place) {
- obj.setPlace(place);
- return this;
- }
- /**
- * 设置广告图片
- *
- * @param image 广告图片
- */
- public Builder image(String image) {
- obj.setImage(image);
- return this;
- }
- /**
- * 设置广告位置
- *
- * @param position 广告位置
- */
- public Builder position(Integer position) {
- obj.setPosition(position);
- return this;
- }
- /**
- * 设置广告链接
- *
- * @param link 广告链接
- */
- public Builder link(String link) {
- obj.setLink(link);
- return this;
- }
- /**
- * 设置开始时间
- *
- * @param startTime 开始时间
- */
- public Builder startTime(Date startTime) {
- obj.setStartTime(startTime);
- return this;
- }
- /**
- * 设置结束时间
- *
- * @param endTime 结束时间
- */
- public Builder endTime(Date endTime) {
- obj.setEndTime(endTime);
- return this;
- }
- public Ad build() {
- return this.obj;
- }
- }
- }
|