package com.cpop.oam.business.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import com.cpop.core.base.entity.BaseEntity;
import com.cpop.core.base.entity.BaseInsertListener;
import com.cpop.core.base.entity.BaseUpdateListener;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.time.LocalDate;

/**
 * OAM-任务表 实体类。
 *
 * @author DB
 * @since 2023-09-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Table(value = "cp_oam_task", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false)
public class Task extends BaseEntity implements Serializable {

    /**
     * 主键
     */
    @Id
    private String id;

    /**
     * 任务类型(0:迭代;1:需求;2:投诉/工单)
     */
    private Integer taskType;

    /**
     * 主要负责员工id
     */
    private String responsibleStaffId;

    /**
     * 任务状态(-1:失败;0:待审核;1:待接受;2:进行中;3:待测试;5:暂停;6:强制办结;7:接收超时;8:待部署;9:已归档;10:审核不通过)
     */
    private Integer taskStatus;

    /**
     * 任务项(0:开发中;1:待测试:2:待部署;3:已归档;-1:逾期)
     */
    private Integer taskItem;

    /**
     * 任务进度(0:开发文档;1:原型涉及;2:UI涉及;3:前端开发;4:后端开发)
     */
    private String taskProgress;

    /**
     * 任务内容
     */
    private String taskContent;

    /**
     * 任务权重
     */
    private Integer taskWeight;

    /**
     * 任务评级(0:A;1:B;2:C;3:D;4:E)
     */
    private String taskRating;

    /**
     * 记录员工id
     */
    private String recordStaffId;

    /**
     * 附件地址
     */
    private String attachmentUrl;

    /**
     * 备注
     */
    private String remark;

    /**
     * 是否加急
     */
    private Boolean isUrgent;

    /**
     * 预期完成日期
     */
    private LocalDate expectedCompletionDate;

    /**
     * 完成日期
     */
    private LocalDate completionDate;

    /**
     * 任务接收时间
     */
    private LocalDateTime taskReceiptTime;

    /**主体 */
    private String subject;

    /**测试转部署文件 */
    private String testToFinishUrl;

    /**
     * 转测试时间
     */
    private LocalDateTime toTestTime;

    /**
    * 转部署时间
    */
    private LocalDateTime toDeployTime;

    /**
     * 是否删除(0否1是)
     */
    @Column(isLogicDelete = true)
    private Boolean isDelete;

}
