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

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.FieldFill;
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 com.storlead.framework.annotate.AnnotateEnumType;
import com.storlead.framework.annotate.Dict;
import com.storlead.framework.annotate.OrgAutoMateAnnotate;
import com.storlead.framework.mybatis.entity.SysBaseField;
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.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "WorkOrderViewLogListVO", description = "工单查看用户列表VO")
public class WorkOrderViewLogListVO extends SysBaseField {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "工单订单表id")
    @TableField("work_order_id")
    private Long workOrderId;

    @ApiModelProperty(value = "系统用户id")
    @TableField("user_id")
    @OrgAutoMateAnnotate(valueField = "userName",annotateType = AnnotateEnumType.USER)
    private Long userId;

    @ApiModelProperty(value = "系统用户姓名")
    @TableField("user_name")
    private String userName;

    @ApiModelProperty(value = "查看次数")
    @TableField("view_count")
    private Integer viewCount;

    @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")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

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