package com.example.demo.model;

import io.swagger.v3.oas.annotations.media.Schema;

/**
 * 操作日志实体。
 */
@Schema(description = "操作日志实体")
public class OperationLog {

    @Schema(description = "日志ID")
    private Long id;

    @Schema(description = "操作人")
    private String operator;

    @Schema(description = "操作时间")
    private String operationTime;

    @Schema(description = "操作类型：add/edit/delete/submit/review/reject/archive")
    private String operationType;

    @Schema(description = "业务类型")
    private String businessType;

    @Schema(description = "业务ID")
    private String businessId;

    @Schema(description = "操作前后数据（JSON格式）")
    private String dataDiff;

    @Schema(description = "IP地址")
    private String ipAddress;

    public OperationLog() {
    }

    public OperationLog(Long id, String operator, String operationTime, String operationType,
                        String businessType, String businessId, String dataDiff, String ipAddress) {
        this.id = id;
        this.operator = operator;
        this.operationTime = operationTime;
        this.operationType = operationType;
        this.businessType = businessType;
        this.businessId = businessId;
        this.dataDiff = dataDiff;
        this.ipAddress = ipAddress;
    }

    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }
    public String getOperator() { return operator; }
    public void setOperator(String operator) { this.operator = operator; }
    public String getOperationTime() { return operationTime; }
    public void setOperationTime(String operationTime) { this.operationTime = operationTime; }
    public String getOperationType() { return operationType; }
    public void setOperationType(String operationType) { this.operationType = operationType; }
    public String getBusinessType() { return businessType; }
    public void setBusinessType(String businessType) { this.businessType = businessType; }
    public String getBusinessId() { return businessId; }
    public void setBusinessId(String businessId) { this.businessId = businessId; }
    public String getDataDiff() { return dataDiff; }
    public void setDataDiff(String dataDiff) { this.dataDiff = dataDiff; }
    public String getIpAddress() { return ipAddress; }
    public void setIpAddress(String ipAddress) { this.ipAddress = ipAddress; }
}
