package com.erp.report.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.Builder;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

import java.time.LocalDateTime;

/**
 * API拉取记录统计实体
 * 对应数据库表：pull_records
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("pull_records")
public class PullRecordEntity {

    @TableId(type = IdType.AUTO)
    private Long id;

    private String platformType;
    
    private String platformShopId;
    
    private String pullType;
    
    private LocalDateTime startTime;
    
    private LocalDateTime endTime;
    
    private Integer pulledCount;
    
    private String pullStatus; // success, failed, partial
    
    private String errorMsg;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    @TableLogic
    private LocalDateTime deletedAt;
}
