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

import cn.hutool.core.date.DateTime;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonRawValue;
import com.storlead.framework.annotate.AnnotateEnumType;
import com.storlead.framework.annotate.Dict;
import com.storlead.framework.annotate.OrgAutoMateAnnotate;
import com.storlead.sales.pojo.entity.customer.WorkOrderEntity;
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.util.Date;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "WorkOrderChageUserDTO", description = "工单分配工单、转他人处理DTO")
public class WorkOrderChageUserDTO extends WorkOrderEntity {
    private static final long serialVersionUID = 1L;

    private String categoryName;

    @JsonRawValue
    private String sysUserId;

    /**
     * 用户名 api传提交申请的人
     */
    private String userName;

    private String urgentStatusName;

    private String orderStatusName;

    private String workOrderIds;

    private String remark;

    private String fileUrl;
    //项目编码
    private String projectNum;

    // orderType 工单情景 1：撤销工单，2：退回工单，3：完成工单，4：确认不通过工单，5：确认通过工单， 6再次发起工单
    @ApiModelProperty(value = "工单情景 1：撤销工单，2：退回工单，3：完成工单，4：确认不通过工单，5：确认通过工单， 6再次发起工单")
    private Integer orderType;

    @ApiModelProperty("指派人的 username,给工单系统查出ID")
    private String assignUsername;

    /**
     * 详情页等待时间
     */
    private String waitTimeStr;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date showTime;

//    @ApiModelProperty(value = "归属人员")
//    @OrgAutoMateAnnotate(valueField = "ownerByName",annotateType = AnnotateEnumType.USER)
//    private Long ownerBy;

    @ApiModelProperty(value = "归属人员")
    private String ownerByName;

//    private List<WorkOrderAnnex> annexList;
}
