package org.shop.crop.dao;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("crop_files")
public class CropFile {

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

    @TableField(value = "cropid")
    private String cropId;

    private String sdkFileId;         // 企微返回的 sdkfileid

    private String msgType;           // image/voice/video/file

    private Long seq;                 // 对应消息的 seq

    private String url;               // 下载后上传 OSS 的地址

    private String ext;          // 可选：原始文件名（后续可补充）

    private Integer status = 0; // 0 pending, 1 success, 2 failed

    private String errorMsg;          // 失败原因

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

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