package com.qmth.teachcloud.mark.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author xf
 * @since 2023-12-08
 */
@TableName("scan_log")
@ApiModel(value = "ScanLog对象", description = "")
public class ScanLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "学校代码")
    @MppMultiId(value = "school_code")
    private String schoolCode;
    @ApiModelProperty(value = "设备号")
    @MppMultiId(value = "device_code")
    private String deviceCode;

    @ApiModelProperty(value = "文件名")
    @MppMultiId(value = "file_name")
    private String fileName;

    @ApiModelProperty(value = "错误文件类型，崩溃异常文件：COLLAPSE，正常文件：NORMAL")
    @MppMultiId(value = "type")
    private String type;

    @ApiModelProperty(value = "扫描端日志")
    private String md5;

    @ApiModelProperty(value = "扫描账号")
    private String loginName;

    @ApiModelProperty(value = "地址")
    @TableField(value = "path", updateStrategy = FieldStrategy.IGNORED)
    private String path;

    @ApiModelProperty(value = "上传时间")
    private Long uploadTime;

    @TableField(exist = false)
    private String pathUrl;

    public ScanLog() {
    }

    public ScanLog(String schoolCode, String deviceCode, String fileName, String type) {
        this.schoolCode = schoolCode;
        this.deviceCode = deviceCode;
        this.fileName = fileName;
        this.type = type;
    }

    public String getSchoolCode() {
        return schoolCode;
    }

    public void setSchoolCode(String schoolCode) {
        this.schoolCode = schoolCode;
    }

    public String getDeviceCode() {
        return deviceCode;
    }

    public void setDeviceCode(String deviceCode) {
        this.deviceCode = deviceCode;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getMd5() {
        return md5;
    }

    public void setMd5(String md5) {
        this.md5 = md5;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public Long getUploadTime() {
        return uploadTime;
    }

    public void setUploadTime(Long uploadTime) {
        this.uploadTime = uploadTime;
    }

    public String getPathUrl() {
        return pathUrl;
    }

    public void setPathUrl(String pathUrl) {
        this.pathUrl = pathUrl;
    }

    @Override
    public String toString() {
        return "ScanLog{" +
                "schoolCode=" + schoolCode +
                ", deviceCode=" + deviceCode +
                ", fileName=" + fileName +
                ", md5=" + md5 +
                ", path=" + path +
                ", uploadTime=" + uploadTime +
                "}";
    }
}
