package com.zjty.tynotes.job.basic.entity.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zjty.tynotes.job.basic.entity.database.Attachment;
import com.zjty.tynotes.job.basic.entity.database.Work;
import com.zjty.tynotes.pas.entity.User;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;

import java.util.Date;
import java.util.List;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "返回任务信息的详情", description = "任务信息对象")
public class WorkVo {
    /**
     * id
     */
    @Id
    @ApiModelProperty(value = "id.若新增数据则不可附带id.更新已有数据则必须附带id.", example = "id", notes = "若新增数据则不可附带id.更新已有数据则必须附带id")
    private String id;

    /**
     * 上级任务id
     */
    @ApiModelProperty(value = "上级任务id", example = "superiorId")
    private String superiorId;
    /**
     * 标题
     */
    @ApiModelProperty(value = "标题", example = "请输入标题")
    private String title;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间", example = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 任务开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "开始时间", example = "yyyy-MM-dd HH:mm:ss")
    private Date stateTime;

    /**
     * 任务结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "结束时间", example = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;
    /**
     * 预计完成时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "预计完成时间", example = "yyyy-MM-dd HH:mm:ss")
    private Date completeTime;
    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "更新时间", example = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 提交时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "提交时间", example = "yyyy-MM-dd HH:mm:ss",name = "submitTime")
    private Date submitTime;

    /**
     * 审核时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "审核时间", example = "yyyy-MM-dd HH:mm:ss",name = "auditTime")
    private Date auditTime;
    /*相关用户 同一个人不能同时担任多种职位*/
    /**
     * 发布者id
     */
    @ApiModelProperty(value = "发布者的用户对象.", example = "对象")
    private User publisher;
    /**
     * 执行者id
     */
    @ApiModelProperty(value = "组长用户对象.", example = "id")
    private User executor;

    /**
     * 组员id集合
     */
    @ApiModelProperty(value = "组原id集合.", example = "[\"id\",\"id\"]")
    private List<User> crewList;

    /**
     * 附件id
     */
    @ApiModelProperty(value = "附件的id集合.", example = "[\"id\",\"id\"]")
    private List<Attachment> attachment;


    /*工作内容*/
    /**
     * 内容
     * 内容字数有上限3000个字，上限可设置。
     */
    @ApiModelProperty(value = "内容", example = "内容...............", notes = "内容字数有上限3000个字，上限可设置.")
    private String content;


    /**
     * 工作量
     */
    @ApiModelProperty(value = "工作量",example = "30")
    private int workload;

    /**
     * 工作状态
     * 目前有：未发布、进行中、待审核、待考评
     */
    @ApiModelProperty(value = "状态.进行中:underway、已提交:committed、已完结:finished", example = "finished")
    private String status;

    /**
     * 考评系数
     */
    @ApiModelProperty(value = "考评系数",example = "0.8")
    private float workCoefficient=0;

    /**
     * 是否记录个人工作量
     */
    @ApiModelProperty(value = "是否记录个人工作量",example = "1.是记录0.不记录")
    private int pWorkload=1;

    /**
     * 是否记录任务工作量
     */
    @ApiModelProperty(value = "是否记录任务工作量",example = "1.是记录0.不记录")
    private int workloadCount=1;


    /**
     * 主任务对象
     */
    @ApiModelProperty(value = "主任务对象")
    private Work workVos;
}
