package com.storlead.sales.pojo.dto.customer;

import cn.hutool.core.date.DateTime;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "WorkOrderAddDTO", description = "工单添加DTO")
public class WorkOrderAddDTO {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "工单主键id")
    private Long id;

    @ApiModelProperty(value = "关联客户ID")
    private Long customerId;

    @ApiModelProperty(value = "订单ID")
    private Long orderFormId;

    @ApiModelProperty(value = "联系人ID")
    private Long liaisonId;

    @ApiModelProperty(value = "工单标题")
    private String title;

    @ApiModelProperty(value = "工单内容")
    private String content;

    @ApiModelProperty(value = "期望完成时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JSONField(format ="yyyy-MM-dd")
    private Date expectTime;

    @ApiModelProperty(value = "实际完成时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JSONField(format ="yyyy-MM-dd")
    private Date actualTime;

//    @ApiModelProperty(value = "提醒用户id，逗号隔开")
    private String remindUserIds;

    @ApiModelProperty(value = "最后处理人id")
    private Integer currentUserId;

    @ApiModelProperty(value = "最后处理人")
    private String currentUserName;

    @ApiModelProperty(value = "工单类型id")
    private Integer workOrderCategoryId;

    @ApiModelProperty(value = "工单紧急状态：1:非常紧急，2:紧急，3:一般")
    private Integer urgentStatus;

    @ApiModelProperty(value = "工单的状态：1待处理，2已撤销，3被退回，4已完成，5已确认")
    private Integer orderStatus;

    @ApiModelProperty(value = "订单发起次数")
    private Integer orderCount;

    @ApiModelProperty(value = "退回原因备注")
    private String remark;

    @ApiModelProperty(value = "撤销、拒绝时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JSONField(format ="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime revokeTime;

    @ApiModelProperty(value = "工单来源")
    private String orderFrom;

    @ApiModelProperty(value = "再次发起说明")
    private String orderAgain;

    @ApiModelProperty(value = "归属人员")
    private Long ownerBy;

    @ApiModelProperty(value = "附件idList")
    private List<Long> resourceIdList;
}
