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

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.storlead.framework.mybatis.query.QueryBaseEntity;
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.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "OperationLogSearchDTO", description = "通用日志查询DTO")
public class OperationLogSearchDTO extends QueryBaseEntity {

    @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")
    @ApiModelProperty(value = "开始时间")
    private LocalDateTime beginTime;

    @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")
    @ApiModelProperty(value = "开始时间")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "日志主键")
    private Long id;

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

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

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

}
