package com.iformall.domain.po;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Table(name = "wx_topic")
public class WxTopic implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
    protected Long id;
	/*租户ID**/
	@io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId")
	private String tenantId;
	/*名称**/
	@io.swagger.annotations.ApiModelProperty(value="名称",name="name")
	private String name;
	/*标题**/
	@io.swagger.annotations.ApiModelProperty(value="标题",name="title")
	private String title;
	/*内容**/
	@io.swagger.annotations.ApiModelProperty(value="内容",name="content")
	private String content;
	/*封面**/
	@io.swagger.annotations.ApiModelProperty(value="封面",name="cover")
	private String cover;
	/*广告图**/
	@io.swagger.annotations.ApiModelProperty(value="广告图",name="advert")
	private String advert;
	/*开始时间**/
	@io.swagger.annotations.ApiModelProperty(value="开始时间",name="beginTime")
	private Date beginTime;
	/*结束时间**/
	@io.swagger.annotations.ApiModelProperty(value="结束时间",name="endTime")
	private Date endTime;
	/*状态1投放2作废**/
	@io.swagger.annotations.ApiModelProperty(value="状态1生效2失效3作废",name="status")
	private Integer status;
	@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createtime")
	private Date createtime;
	@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime")
	private Date updatetime;
	/*背景颜色*/
	@io.swagger.annotations.ApiModelProperty(value="背景颜色",name="bgColor")
	private String bgColor;

	/*优惠券ids**/
	@io.swagger.annotations.ApiModelProperty(value="优惠券ids",name="couponIds")
	@Transient
	private String couponIds;
	/*商品列表**/
	@io.swagger.annotations.ApiModelProperty(value="商品列表",name="couponList")
	@Transient
	private List<WxCoupon> couponList;
	//状态，一个或者多个
	@Transient
	private String statusStr;
	@Transient
	protected List<Integer> statusList;
	//查询下架状态
	@Transient
	private boolean queryDownLineStatus;
	@io.swagger.annotations.ApiModelProperty(value="上架标志 1正在上架",name="isOnline")
	@Transient
	private Integer isOnline;
	@Transient
	private Long couponChannelId;


	public Long getCouponChannelId() {
		return couponChannelId;
	}

	public void setCouponChannelId(Long couponChannelId) {
		this.couponChannelId = couponChannelId;
	}

    @Transient
    @io.swagger.annotations.ApiModelProperty(value="小程序路径",name="weappPath")
    private String weappPath;

    @Transient
    @io.swagger.annotations.ApiModelProperty(value="小程序二维码Scene",name="weappScene")
    private String weappScene;

	public Integer getIsOnline() {
		return isOnline;
	}

	public void setIsOnline(Integer isOnline) {
		this.isOnline = isOnline;
	}

	public boolean isQueryDownLineStatus() {
		return queryDownLineStatus;
	}

	public void setQueryDownLineStatus(boolean queryDownLineStatus) {
		this.queryDownLineStatus = queryDownLineStatus;
	}

	public List<Integer> getStatusList() {
		return statusList;
	}

	public void setStatusList(List<Integer> statusList) {
		this.statusList = statusList;
	}

	public String getBgColor() {
		return bgColor;
	}

	public void setBgColor(String bgColor) {
		this.bgColor = bgColor;
	}

	public String getStatusStr() {
		return statusStr;
	}

	public void setStatusStr(String statusStr) {
		this.statusStr = statusStr;
	}

	public List<WxCoupon> getCouponList() {
		return couponList;
	}

	public void setCouponList(List<WxCoupon> couponList) {
		this.couponList = couponList;
	}

	public String getCouponIds() {
		return couponIds;
	}

	public void setCouponIds(String couponIds) {
		this.couponIds = couponIds;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getTenantId() {
		return tenantId;
	}

	public void setTenantId(String tenantId) {
		this.tenantId = tenantId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getCover() {
		return cover;
	}

	public void setCover(String cover) {
		this.cover = cover;
	}

	public String getAdvert() {
		return advert;
	}

	public void setAdvert(String advert) {
		this.advert = advert;
	}

	public Date getBeginTime() {
		return beginTime;
	}

	public void setBeginTime(Date beginTime) {
		this.beginTime = beginTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public Date getUpdatetime() {
		return updatetime;
	}

	public void setUpdatetime(Date updatetime) {
		this.updatetime = updatetime;
	}

    public String getWeappPath() {
        if(id == null)
            return "pages/index/index";
	    return "pages/index/index?type=td&id="+id;
    }

    public String getWeappScene() {
	    if(id == null)
	        return "";
        return "t:td:" + id;
    }
}
