data-dump/src/main/java/com/celnet/datadump/entity/DataBatch.java

162 lines
4.1 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.celnet.datadump.entity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.baomidou.mybatisplus.annotation.*;
import com.celnet.datadump.config.excel.SyncStatusConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author Red
* @since 2022-11-25
*/
@Data
@TableName("data_batch")
@ContentRowHeight(20)
@ColumnWidth(25)
@ApiModel(value = "对象批次")
public class DataBatch implements Serializable, Cloneable {
private static final long serialVersionUID = 1L;
/**
* id
*/
@TableId(value = "id", type = IdType.AUTO)
@ApiModelProperty(value = "id")
private Integer id;
/**
* 记录类型
*/
@TableField("name")
@ExcelProperty(value = "api", index = 1)
@ApiModelProperty(value = "记录类型")
private String name;
/**
* 名称
*/
@TableField("label")
@ExcelProperty(value = "记录类型", index = 0)
@ApiModelProperty(value = "名称")
private String label;
/**
* 开始同步时间
*/
@TableField("sync_start_date")
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
@ExcelProperty(value = "同步时间范围(起始时间)", index = 2)
@ApiModelProperty(value = "开始同步时间")
private Date syncStartDate;
/**
* 结束同步时间
*/
@TableField("sync_end_date")
@DateTimeFormat("yyyy-MM-dd HH:mm:ss")
@ExcelProperty(value = "同步时间范围(截止时间)", index = 3)
@ApiModelProperty(value = "结束同步时间")
private Date syncEndDate;
/**
* 首次同步数据量
*/
@TableField("first_db_num")
@ExcelProperty(value = "同步数据量(本地数据库)首次", index = 4)
@ApiModelProperty(value = "首次同步数据量")
private Integer firstDbNum;
/**
* 首次查询数据量
*/
@TableField("first_sf_num")
@ExcelProperty(value = "参照数据量CRM系统首次", index = 5)
@ApiModelProperty(value = "首次查询数据量")
private Integer firstSfNum;
/**
* 同步数据量
*/
@TableField("db_num")
@ExcelProperty(value = "同步数据量(本地数据库)最新", index = 6)
@ApiModelProperty(value = "同步数据量")
private Integer dbNum;
/**
* 查询数据量
*/
@TableField("sf_num")
@ExcelProperty(value = "参照数据量CRM系统最新", index = 7)
@ApiModelProperty(value = "查询数据量")
private Integer sfNum;
/**
* 同步状态 1:正常 0:误差
*/
@TableField("sync_status")
@ExcelProperty(value = "数据核实情况", index = 8, converter = SyncStatusConverter.class)
@ApiModelProperty(value = "同步状态 1:正常 0:误差")
private Integer syncStatus;
/**
* 首次同步时间
*/
@TableField("first_sync_date")
@ExcelIgnore
@ApiModelProperty(value = "首次同步时间")
private Date firstSyncDate;
/**
* 创建时间
*/
@TableField(value = "created_date", fill = FieldFill.INSERT)
@ExcelIgnore
@ApiModelProperty(value = "创建时间")
private LocalDateTime createdDate;
/**
* 最后更新时间
*/
@TableField(value = "last_modified_date", fill = FieldFill.INSERT_UPDATE)
@ExcelIgnore
@ApiModelProperty(value = "最后更新时间")
private LocalDateTime lastModifiedDate;
/**
* sf新增数据量
*/
@TableField("sf_add_num")
private Integer sfAddNum;
/**
* sf更新数据量
*/
@TableField("sf_update_num")
private Integer sfUpdateNum;
@Override
public DataBatch clone() {
try {
return (DataBatch) super.clone();
} catch (CloneNotSupportedException e) {
throw new AssertionError();
}
}
}