package com.gxwebsoft.oa.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

/**
 * 文章记录表
 *
 * @author WebSoft
 * @since 2022-11-16 11:21:42
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "Task对象", description = "文章记录表")
@TableName("oa_task")
public class Task implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "任务ID")
    @TableId(value = "task_id", type = IdType.AUTO)
    private Integer taskId;

    @ApiModelProperty(value = "任务名称")
    private String name;

    @ApiModelProperty(value = "任务类型")
    private String taskType;

    @ApiModelProperty(value = "工单附件")
    private String files;

    @ApiModelProperty(value = "开始时间")
    private Date startTime;

    @ApiModelProperty(value = "结束时间")
    private Date endTime;

    @ApiModelProperty(value = "任务内容")
    @TableField(exist = false)
    private String content;

    @ApiModelProperty(value = "任务状态")
    private Integer progress;

    @ApiModelProperty(value = "优先级")
    private String priority;

    @ApiModelProperty(value = "品质要求")
    private String quality;

    @ApiModelProperty(value = "时限(天)")
    private Integer day;

    @ApiModelProperty(value = "联系电话")
    private String phone;

    @ApiModelProperty(value = "用户ID")
    private Integer userId;

    @ApiModelProperty(value = "应用ID")
    private Integer appId;

    @ApiModelProperty(value = "机构id")
    private Integer organizationId;

    @ApiModelProperty(value = "客户ID")
    private Integer customerId;

    @ApiModelProperty(value = "项目ID")
    private Integer projectId;

    @ApiModelProperty(value = "资产ID")
    private Integer assetsId;

    @ApiModelProperty(value = "是否已查阅")
    private Integer isRead;

    @ApiModelProperty(value = "最后回复人ID")
    private Integer lastReadUser;

    @ApiModelProperty(value = "最后回复人头像")
    @TableField(exist = false)
    private String lastAvatar;

    @ApiModelProperty(value = "最后回复人昵称")
    @TableField(exist = false)
    private String lastNickname;

    @ApiModelProperty(value = "最后回复人姓名")
    @TableField(exist = false)
    private String lastRealName;

    @ApiModelProperty(value = "最后回复人公司名称")
    @TableField(exist = false)
    private String lastCompanyName;

    @ApiModelProperty(value = "排序(数字越小越靠前)")
    private Integer sortNumber;

    @ApiModelProperty(value = "备注")
    private String comments;

    @ApiModelProperty(value = "状态, 0待处理, 1已完成")
    private Integer status;

    @ApiModelProperty(value = "是否删除, 0否, 1是")
    @TableLogic
    private Integer deleted;

    @ApiModelProperty(value = "租户id")
    private Integer tenantId;

    @ApiModelProperty(value = "注册时间")
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    @ApiModelProperty(value = "用户昵称")
    @TableField(exist = false)
    private String nickname;

    @ApiModelProperty(value = "用户头像")
    @TableField(exist = false)
    private String avatar;

    @ApiModelProperty(value = "任务发起人ID")
    private Integer promoter;

    @ApiModelProperty(value = "发起人昵称")
    @TableField(exist = false)
    private String promoterName;

    @ApiModelProperty(value = "发起人别名")
    @TableField(exist = false)
    private String promoterAlias;

    @ApiModelProperty(value = "发起人头像")
    @TableField(exist = false)
    private String promoterAvatar;

    @ApiModelProperty(value = "发起人单位名称")
    @TableField(exist = false)
    private String promoterCompanyName;

    @ApiModelProperty(value = "受理人")
    private Integer commander;

    @ApiModelProperty(value = "受理人昵称")
    @TableField(exist = false)
    private String commanderName;

    @ApiModelProperty(value = "受理人别名")
    @TableField(exist = false)
    private String commanderAlias;

    @ApiModelProperty(value = "受理人真实姓名")
    @TableField(exist = false)
    private String commanderRealName;

    @ApiModelProperty(value = "受理人头像")
    @TableField(exist = false)
    private String commanderAvatar;

    @ApiModelProperty(value = "受理人单位名称")
    @TableField(exist = false)
    private String commanderCompanyName;

    @ApiModelProperty(value = "成员管理")
    @TableField(exist = false)
    private List<TaskUser> users;

    @ApiModelProperty(value = "应用名称")
    @TableField(exist = false)
    private String appName;

    @ApiModelProperty(value = "应用信息")
    @TableField(exist = false)
    private App appInfo;

}
