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

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 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.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "OperationLogListVO", description = "通用日志列表VO")
public class OperationLogListVO extends SysBaseField {
    @ApiModelProperty(value = "日志主键")
    private Long id;

    @ApiModelProperty(value = "表名")
    private String tableName;

    @ApiModelProperty(value = "操作类型：1新增、2编辑、3删除")
    private Integer operationType;

    @ApiModelProperty(value = "操作类型：1新增、2编辑、3删除")
    private String operationTypeName;

    @ApiModelProperty(value = "业务类型")
    private String resourceType;

    @ApiModelProperty(value = "业务类型关联ID")
    private Long resourceTypeId;

    @ApiModelProperty(value = "字段名")
    private String fieldName;

    @ApiModelProperty(value = "swagger注解值")
    private String swaggerTitle;

    @ApiModelProperty(value = "旧值")
    private String oldValue;

    @ApiModelProperty(value = "新值")
    private String newValue;

    @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 operationTime;

    @ApiModelProperty(value = "操作记录")
    private String operator;

    @ApiModelProperty(value = "来源: 0:从OA数据同步,1:自维护")
    private Integer dataSource;

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

    @ApiModelProperty(value = "创建人员姓名")
    private String createByName;

    @ApiModelProperty(value = "跟进人员头像")
    private String createByAvatar;

    @ApiModelProperty(value = "归属人员职位")
    private String ownerByJobName;

}
