package com.cab.model;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

public class CabLiveContent {
    private Integer contentId;

    private String contentTitle;

    private Date createDate;

    private Date endDate;

    private Date preheatDate;

    private String preheatImg;

    private Date startDate;

    private String status;

    private String thumbMinUrl;

    private String thumbUrl;

    private Integer userCount;

    private Integer userId;

    private String videoTime;

    private String videoUrl;

    private String contentDetail;


    public Integer getContentId() {
        return contentId;
    }

    public void setContentId(Integer contentId) {
        this.contentId = contentId;
    }

    public String getContentTitle() {
        return contentTitle;
    }

    public void setContentTitle(String contentTitle) {
        this.contentTitle = contentTitle == null ? null : contentTitle.trim();
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Date getPreheatDate() {
        return preheatDate;
    }

    public void setPreheatDate(Date preheatDate) {
        this.preheatDate = preheatDate;
    }

    public String getPreheatImg() {
        return preheatImg;
    }

    public void setPreheatImg(String preheatImg) {
        this.preheatImg = preheatImg == null ? null : preheatImg.trim();
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    public String getThumbMinUrl() {
        return thumbMinUrl;
    }

    public void setThumbMinUrl(String thumbMinUrl) {
        this.thumbMinUrl = thumbMinUrl == null ? null : thumbMinUrl.trim();
    }

    public String getThumbUrl() {
        return thumbUrl;
    }

    public void setThumbUrl(String thumbUrl) {
        this.thumbUrl = thumbUrl == null ? null : thumbUrl.trim();
    }

    public Integer getUserCount() {
        return userCount;
    }

    public void setUserCount(Integer userCount) {
        this.userCount = userCount;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getVideoTime() {
        return videoTime;
    }

    public void setVideoTime(String videoTime) {
        this.videoTime = videoTime == null ? null : videoTime.trim();
    }

    public String getVideoUrl() {
        return videoUrl;
    }

    public void setVideoUrl(String videoUrl) {
        this.videoUrl = videoUrl == null ? null : videoUrl.trim();
    }

    public String getContentDetail() {
        return contentDetail;
    }

    public void setContentDetail(String contentDetail) {
        this.contentDetail = contentDetail == null ? null : contentDetail.trim();
    }


    public static String isBaseCheck(CabLiveContent cabLiveContent){
        String result = null;
        Date now = new Date();
        if(cabLiveContent.getPreheatDate().getTime()-now.getTime()<=0){
            result="预热时间应大于当前时间！";
            return result;
        }
        if(cabLiveContent.getStartDate().getTime()-now.getTime()<=0){
            result="开始时间应大于结束时间！";
            return result;
        }
        if(cabLiveContent.getEndDate().getTime()-now.getTime()<=0){
            result="结束时间应大于结束时间！";
            return result;
        }
        if(cabLiveContent.getEndDate().getTime()-cabLiveContent.getStartDate().getTime()<=0){
            result="开始时间应大于结束时间！";
            return result;
        }
        if(cabLiveContent.getStartDate().getTime()-cabLiveContent.getPreheatDate().getTime()<=0){
            result="预热时间应大于开始时间！";
            return result;
        }
        return null;
    }
}