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

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.storlead.framework.mybatis.entity.SysBaseField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 操作日志表
 * </p>
 *
 * @author YPZ
 * @since 2024-06-18
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("operation_log")
@ApiModel(value="OperationLogEntity对象", description="操作日志表")
public class OperationLogEntity extends SysBaseField {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "日志主键")
    private Long id;

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

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

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

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

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

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

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

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

    @ApiModelProperty(value = "操作时间")
    @TableField("operation_time")
    private LocalDateTime operationTime;

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

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


}
