package com.platform.modules.live.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.enums.FieldStrategy;
import com.platform.modules.live.vo.AppSceneEntityVo;
import org.apache.commons.lang.StringUtils;
import org.hibernate.validator.constraints.NotBlank;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.platform.modules.live.constants.SceneConstants;
import com.platform.modules.live.utils.SceneUUIDGenUtils;
import com.platform.modules.live.vo.SceneEntityVo;

import io.swagger.annotations.ApiModelProperty;
/**
 * 现场表
 * 
 * @author TROY
 * @email 
 * @date 2019-01-19 14:50:50
 */
@TableName("live_scene")
public class LiveSceneEntity implements Serializable {
	private static final long serialVersionUID = 1L;
	
	//数据ID
	@NotBlank(message = "id不能为空")
	private Integer id;
	//现场标题
	@NotBlank(message = "title不能为空")
	private String title;
	//现场类型
	@NotBlank(message = "sceneType不能为空")
	private Integer sceneType;
	//标题图
	@NotBlank(message = "titleImage不能为空")
	private String titleImage;
	//视频地址
	@NotBlank(message = "videoUrl")
	private String videoUrl;
	//现场简介
	@NotBlank(message = "liveDesc不能为空")
//	@TableField(strategy=FieldStrategy.IGNORED)
	private String liveDesc;
	//现场简介链接
	@NotBlank(message = "liveDescHref不能为空")
	private String liveDescHref;
	//直播时间
	@NotBlank(message = "liveStart不能为空")
	private Date liveStart;
	//直播地点
	@NotBlank(message = "livePosition不能为空")
	private String livePosition;
	//直播状态
	@NotBlank(message = "liveState不能为空")
	private Integer liveState;
	//现场备注
	@NotBlank(message = "sceneMark不能为空")
//	@TableField(strategy=FieldStrategy.IGNORED)
	private String sceneMark;
	//现场状态
	@NotBlank(message = "sceneState不能为空")
	private Integer sceneState;
	//导播状态
	@NotBlank(message = "directState不能为空")
	private Integer directState;
	//流程ID
	@NotBlank(message = "processId不能为空")
	private Integer processId;
	//现场唯一标识
	@NotBlank(message = "sceneSign不能为空")
	private String sceneSign;
	//提交审核时间
	@NotBlank(message = "submitDate不能为空")
	private Date submitDate;
	//创建时间
	@NotBlank(message = "createDate不能为空")
	private Date createDate;
	//创建人
	@NotBlank(message = "creatorId不能为空")
	private Integer creatorId;
	//修改时间
	@NotBlank(message = "updateDate不能为空")
	private Date updateDate;
	//修改人
	@NotBlank(message = "updatorId不能为空")
	private Integer updatorId;
	//是否删除
	@NotBlank(message = "deleteFlag不能为空")
	private Integer deleteFlag;
	//导播开始时间
	@NotBlank(message = "directStart不能为空")
	private Date directStart;
	//导播结束时间
	@NotBlank(message = "directEnd不能为空")
	private Date directEnd;
	//导播室ID
	@NotBlank(message = "casterId不能为空")
	private Integer casterId;
	//直播结束时间
	@NotBlank(message = "liveEnd不能为空")
	private Date liveEnd;
	//允许评论
	@NotBlank(message = "allowComment不能为空")
	private Integer allowComment;

	@TableField(exist=false)
	@ApiModelProperty(value = "")
	private String creatorName;
	//总访问数
	@TableField(exist=false)
	@ApiModelProperty(value = "总访问数")
	private Integer views;
	//前端显示访问数
	@TableField(exist=false)
	@ApiModelProperty(value = "前端显示访问数")
	private Integer viewsShow;
	//总评论数
	@TableField(exist=false)
	@ApiModelProperty(value = "总评论数")
	private Integer comments;
	//前端显示评论数
	@TableField(exist=false)
	@ApiModelProperty(value = "前端显示评论数")
	private Integer commentsShow;

	@ApiModelProperty(value = "实际开始时间")
	private Date actualLiveStart;
	@ApiModelProperty(value = "实际结束时间")
	private Date actualLiveEnd;
	//是否置顶 0未置顶 1 置顶
	@ApiModelProperty(value = "是否置顶 0未置顶 1 置顶")
	private Integer isTop;
	//排序，数字越大，排序越靠前
	@ApiModelProperty(value = "排序，数字越大，排序越靠前")
	private Integer priority;
	//实际审核人Id
	@NotBlank(message = "实际审核人Id")
	private Integer auditorId;
	//审核时间
	@NotBlank(message = "审核时间")
	private Date auditDate;
/*	//审核人名（多人）
	@ApiModelProperty(value = "审核人名（多选）")
	private String auditorsName;*/
	//栏目名称（多选）
	@TableField(strategy = FieldStrategy.IGNORED)
	@ApiModelProperty(value = "栏目名称（多选）")
	private String channelsName;
	//栏目ID
	@TableField(exist=false)
	@ApiModelProperty(value = "栏目ID")
	private List<Integer> channelIdList;
	//栏目名称
	@TableField(exist=false)
	@ApiModelProperty(value = "栏目名称;")
	private List<String> channelNameList;
	//栏目ID
	@TableField(exist=false)
	@ApiModelProperty(value = "栏目ID")
	private String channelsId;
	/**
	 * 租户ID
	 * */
	@ApiModelProperty(value = "租户ID")
	private Long tenantId;
	/**
	 * 机构名称
	 * */
	@ApiModelProperty(value = "机构名称")
	@TableField(exist = false)
	private String tenantName;

	/**
	 * 20210419_Matt
	 *
	 * 是否自动开关播，0：关闭；1：启用
	 * */
	@ApiModelProperty(value = "是否自动开关播，0：关闭；1：启用")
	private Integer isAutoLive;

	public LiveSceneEntity() {

	}

	public LiveSceneEntity(Integer id) {
		this.id = id;
	}

	public LiveSceneEntity(SceneEntityVo vo) {
		if (null == vo) {
			return;
		}
		this.id = vo.getId();
		this.title = vo.getTitle();
		this.sceneType = vo.getSceneType();
		this.titleImage = vo.getTitleImage();
		this.videoUrl = vo.getVideoUrl();
		this.liveDesc = vo.getLiveDesc();
		this.liveDescHref = vo.getLiveDescHref();
		this.liveStart = vo.getLiveStart();
		this.livePosition = vo.getLivePosition();
		this.liveState = vo.getLiveState();
		this.sceneMark = vo.getSceneMark();
		this.sceneState = vo.getSceneState();
		this.directState = vo.getDirectState();
		this.sceneSign = vo.getSceneSign();
		this.createDate = vo.getCreateDate();
		this.creatorId = vo.getCreatorId();
		this.actualLiveEnd = vo.getActualLiveEnd();
		this.actualLiveStart = vo.getActualLiveStart();
		this.liveEnd = vo.getLiveEnd();
		this.isTop = vo.getIsTop();
		this.priority = vo.getPriority();
		this.allowComment = vo.getAllowComment();
		this.channelsName = vo.getChannelsName();
		this.channelIdList = vo.getChannelIdList();
		this.channelNameList = vo.getChannelNameList();
		this.tenantId = vo.getTenantId();

		this.isAutoLive = vo.getIsAutoLive();
	}

	public LiveSceneEntity(AppSceneEntityVo vo) {
		if (null == vo) {
			return;
		}
		this.id = vo.getId();
		this.title = vo.getTitle();
		this.sceneType = vo.getSceneType();
		this.titleImage = vo.getTitleImage();
		this.videoUrl = vo.getVideoUrl();
		this.liveDesc = vo.getLiveDesc();
		this.liveStart = vo.getLiveStart();
		this.livePosition = vo.getLivePosition();
		this.sceneMark = vo.getSceneMark();
		this.creatorId = vo.getCreatorId();
		this.createDate = vo.getCreateDate();
		this.updatorId = vo.getUpdatorId();
		this.updateDate = vo.getUpdateDate();
		this.liveEnd = vo.getLiveEnd();
		this.allowComment = vo.getAllowComment();
		this.channelIdList = vo.getChannelIdList();
		this.channelNameList = vo.getChannelNameList();

		this.isAutoLive = vo.getIsAutoLive();
	}

	public void init() {
		if(null == deleteFlag) {
			this.deleteFlag = 0;
		}
		if(StringUtils.isBlank(sceneSign)) {
			this.sceneSign = SceneUUIDGenUtils.generateShortUuid();
		}
		if(null == directState) {
			this.directState = SceneConstants.DIRECT_STATE_OFF;
		}
		if(null == sceneState) {
			this.sceneState = SceneConstants.SCENE_DRAFT;
		}
		if(null == liveState) {
			this.liveState = SceneConstants.LIVE_STATE_NOTICE;
		}
		if(null == isTop) {
			this.isTop = 0;
		}
		if(null == priority) {
			this.priority = 0;
		}
		if (null == allowComment) {
			this.allowComment = SceneConstants.AllowComment.ALLOW_COMMENT.getValue();
		}
	}

	/**
	 * 设置：数据ID
	 */
	public void setId(Integer id) {
		this.id = id;
	}
	/**
	 * 获取：数据ID
	 */
	public Integer getId() {
		return id;
	}
	/**
	 * 设置：现场标题
	 */
	public void setTitle(String title) {
		this.title = title;
	}
	/**
	 * 获取：现场标题
	 */
	public String getTitle() {
		return title;
	}
	/**
	 * 设置：现场类型
	 */
	public void setSceneType(Integer sceneType) {
		this.sceneType = sceneType;
	}
	/**
	 * 获取：现场类型
	 */
	public Integer getSceneType() {
		return sceneType;
	}
	/**
	 * 设置：标题图
	 */
	public void setTitleImage(String titleImage) {
		this.titleImage = titleImage;
	}
	/**
	 * 获取：标题图
	 */
	public String getTitleImage() {
		return titleImage;
	}
	/**
	 * 获取：视频地址
	 */
	public String getVideoUrl() {
		return videoUrl;
	}
	/**
	 * 设置：视频地址
	 */
	public void setVideoUrl(String videoUrl) {
		this.videoUrl = videoUrl;
	}

	/**
	 * 设置：现场简介
	 */
	public void setLiveDesc(String liveDesc) {
		this.liveDesc = liveDesc;
	}
	/**
	 * 获取：现场简介
	 */
	public String getLiveDesc() {
		return liveDesc;
	}
	/**
	 * 设置：直播时间
	 */
	public void setLiveStart(Date liveStart) {
		this.liveStart = liveStart;
	}
	/**
	 * 获取：直播时间
	 */
	public Date getLiveStart() {
		return liveStart;
	}
	/**
	 * 设置：直播地点
	 */
	public void setLivePosition(String livePosition) {
		this.livePosition = livePosition;
	}
	/**
	 * 获取：直播地点
	 */
	public String getLivePosition() {
		return livePosition;
	}
	/**
	 * 设置：直播状态
	 */
	public void setLiveState(Integer liveState) {
		this.liveState = liveState;
	}
	/**
	 * 获取：直播状态
	 */
	public Integer getLiveState() {
		return liveState;
	}
	/**
	 * 设置：现场备注
	 */
	public void setSceneMark(String sceneMark) {
		this.sceneMark = sceneMark;
	}
	/**
	 * 获取：现场备注
	 */
	public String getSceneMark() {
		return sceneMark;
	}
	/**
	 * 设置：现场状态
	 */
	public void setSceneState(Integer sceneState) {
		this.sceneState = sceneState;
	}
	/**
	 * 获取：现场状态
	 */
	public Integer getSceneState() {
		return sceneState;
	}
	/**
	 * 设置：导播状态
	 */
	public void setDirectState(Integer directState) {
		this.directState = directState;
	}
	/**
	 * 获取：导播状态
	 */
	public Integer getDirectState() {
		return directState;
	}
	/**
	 * 设置：流程ID
	 */
	public void setProcessId(Integer processId) {
		this.processId = processId;
	}
	/**
	 * 获取：流程ID
	 */
	public Integer getProcessId() {
		return processId;
	}
	/**
	 * 设置：现场唯一标识
	 */
	public void setSceneSign(String sceneSign) {
		this.sceneSign = sceneSign;
	}
	/**
	 * 获取：现场唯一标识
	 */
	public String getSceneSign() {
		return sceneSign;
	}
	/**
	 * 设置：创建时间
	 */
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	/**
	 * 获取：创建时间
	 */
	public Date getCreateDate() {
		return createDate;
	}
	/**
	 * 设置：创建人
	 */
	public void setCreatorId(Integer creatorId) {
		this.creatorId = creatorId;
	}
	/**
	 * 获取：创建人
	 */
	public Integer getCreatorId() {
		return creatorId;
	}
	/**
	 * 设置：修改时间
	 */
	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}
	/**
	 * 获取：修改时间
	 */
	public Date getUpdateDate() {
		return updateDate;
	}
	/**
	 * 设置：修改人
	 */
	public void setUpdatorId(Integer updatorId) {
		this.updatorId = updatorId;
	}
	/**
	 * 获取：修改人
	 */
	public Integer getUpdatorId() {
		return updatorId;
	}
	/**
	 * 设置：是否删除
	 */
	public void setDeleteFlag(Integer deleteFlag) {
		this.deleteFlag = deleteFlag;
	}
	/**
	 * 获取：是否删除
	 */
	public Integer getDeleteFlag() {
		return deleteFlag;
	}

	public Date getSubmitDate() {
		return submitDate;
	}

	public void setSubmitDate(Date submitDate) {
		this.submitDate = submitDate;
	}

	public Date getDirectStart() {
		return directStart;
	}

	public void setDirectStart(Date directStart) {
		this.directStart = directStart;
	}

	public Date getDirectEnd() {
		return directEnd;
	}

	public void setDirectEnd(Date directEnd) {
		this.directEnd = directEnd;
	}

	public Integer getCasterId() {
		return casterId;
	}

	public void setCasterId(Integer casterId) {
		this.casterId = casterId;
	}

	public Date getLiveEnd() {
		return liveEnd;
	}

	public void setLiveEnd(Date liveEnd) {
		this.liveEnd = liveEnd;
	}

	public String getCreatorName() {
		return creatorName;
	}

	public void setCreatorName(String creatorName) {
		this.creatorName = creatorName;
	}
	
	public Integer getViews() {
		return views;
	}

	public void setViews(Integer views) {
		this.views = views;
	}

	public Integer getViewsShow() {
		return viewsShow;
	}

	public void setViewsShow(Integer viewsShow) {
		this.viewsShow = viewsShow;
	}

	public Integer getComments() {
		return comments;
	}

	public void setComments(Integer comments) {
		this.comments = comments;
	}

	public Integer getCommentsShow() {
		return commentsShow;
	}

	public void setCommentsShow(Integer commentsShow) {
		this.commentsShow = commentsShow;
	}

	public Date getActualLiveStart() {
		return actualLiveStart;
	}

	public void setActualLiveStart(Date actualLiveStart) {
		this.actualLiveStart = actualLiveStart;
	}

	public Date getActualLiveEnd() {
		return actualLiveEnd;
	}

	public void setActualLiveEnd(Date actualLiveEnd) {
		this.actualLiveEnd = actualLiveEnd;
	}

	public Integer getIsTop() {
		return isTop;
	}

	public void setIsTop(Integer isTop) {
		this.isTop = isTop;
	}

	public Integer getPriority() {
		return priority;
	}

	public void setPriority(Integer priority) {
		this.priority = priority;
	}

	public Integer getAllowComment() {
		return allowComment;
	}

	public void setAllowComment(Integer allowComment) {
		this.allowComment = allowComment;
	}

	public Integer getAuditorId() {
		return auditorId;
	}

	public void setAuditorId(Integer auditorId) {
		this.auditorId = auditorId;
	}

	public Date getAuditDate() {
		return auditDate;
	}

	public void setAuditDate(Date auditDate) {
		this.auditDate = auditDate;
	}

	/*public String getAuditorsName() {
		return auditorsName;
	}

	public void setAuditorsName(String auditorsName) {
		this.auditorsName = auditorsName;
	}*/

	public String getChannelsName() {
		return channelsName;
	}

	public void setChannelsName(String channelsName) {
		this.channelsName = channelsName;
	}

	public List<Integer> getChannelIdList() {
		return channelIdList;
	}

	public void setChannelIdList(List<Integer> channelIdList) {
		this.channelIdList = channelIdList;
	}

	public List<String> getChannelNameList() {
		return channelNameList;
	}

	public void setChannelNameList(List<String> channelNameList) {
		this.channelNameList = channelNameList;
	}

	public String getChannelsId() {
		return channelsId;
	}

	public void setChannelsId(String channelsId) {
		this.channelsId = channelsId;
	}

	public String getLiveDescHref() {
		return liveDescHref;
	}

	public void setLiveDescHref(String liveDescHref) {
		this.liveDescHref = liveDescHref;
	}

	public Long getTenantId() {
		return tenantId;
	}

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

	public String getTenantName() {
		return tenantName;
	}

	public void setTenantName(String tenantName) {
		this.tenantName = tenantName;
	}

	public Integer getIsAutoLive() {
		return isAutoLive;
	}

	public void setIsAutoLive(Integer isAutoLive) {
		this.isAutoLive = isAutoLive;
	}
}
