package com.sunxung.factoring.entity.weekWorkPlan;

import java.util.Date;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import com.alibaba.fastjson.annotation.JSONField;
import com.sunxung.factoring.component.annotation.ObjectValidator;
import com.sunxung.factoring.entity.BaseEntity;
import com.sunxung.factoring.entity.sys.Dictionary;
import com.sunxung.factoring.entity.sys.User;

/**
 * @Description:周工作计划实体类
 * @author:wuduanli
 * @e-mail:1912942707@qq.com
 * @date:2018年1月2日 下午3:05:24
 */
public class WeekWorkPlan extends BaseEntity {

    private static final long serialVersionUID = 1L;
    /** 上周计划ID **/
    private Long lastWorkId;
    /** 下周继续工作计划 **/
    private WeekWorkPlan nextWeekWorkPlan;
    /** 对应用户 **/
    @ObjectValidator(message = "对应用户不能为空", groups = {
            Add.class
    })
    private User user;
    /** 标题 **/
    @Length(min = 1, max = 25, message = "标题必须在1-25字之间", groups = {
            Add.class, Update.class
    })
    private String title;
    /** 工作内容 **/
    @Length(min = 1, max = 1500, message = "工作内容必须在1-1500字之间", groups = {
            Add.class, Update.class
    })
    private String workContent;
    /** 任务状态 **/
    @ObjectValidator(message = "任务状态不能为空", groups = {
            Add.class, Update.class
    })
    private Dictionary workState;
    /** 优先级 **/
    @NotBlank(message = "优先级不能为空", groups = {
            Add.class, Update.class
    })
    private String level;
    /** 一周的开始时间 **/
    @JSONField(format = "yyyy-MM-dd")
    @NotNull(message = "一周的开始时间不能为空", groups = {
            Add.class, Update.class
    })
    private Date startTime;
    /** 一周的结束时间 **/
    @JSONField(format = "yyyy-MM-dd")
    @NotNull(message = "一周的结束时间不能为空", groups = {
            Add.class, Update.class
    })
    private Date endTime;
    /** 对应周 **/
    @NotNull(message = "对应周不能为空", groups = {
            Add.class, Update.class
    })
    private Integer weekth;
    /** 计划工作时间 **/
    @JSONField(format = "yyyy-MM-dd")
    @NotNull(message = "开始时间不能为空", groups = {
            Add.class, Update.class
    })
    private Date workTime;

    public Long getLastWorkId() {
        return lastWorkId;
    }

    public void setLastWorkId(Long lastWorkId) {
        this.lastWorkId = lastWorkId;
    }

    public WeekWorkPlan getNextWeekWorkPlan() {
        return nextWeekWorkPlan;
    }

    public void setNextWeekWorkPlan(WeekWorkPlan nextWeekWorkPlan) {
        this.nextWeekWorkPlan = nextWeekWorkPlan;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public String getTitle() {
        return title;
    }

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

    public String getWorkContent() {
        return workContent;
    }

    public void setWorkContent(String workContent) {
        this.workContent = workContent;
    }

    public Dictionary getWorkState() {
        return workState;
    }

    public void setWorkState(Dictionary workState) {
        this.workState = workState;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

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

    public Integer getWeekth() {
        return weekth;
    }

    public void setWeekth(Integer weekth) {
        this.weekth = weekth;
    }

    public Date getWorkTime() {
        return workTime;
    }

    public void setWorkTime(Date workTime) {
        this.workTime = workTime;
    }
}
