package org.springblade.file.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Size;
import lombok.Data;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 *  业务解压任务明细对象
 * @author bfhuange
 * @date 2024/11/08
 */
@Data
@Schema(description = "业务解压任务明细对象")
public class BusinessUnzipDetailListVO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     *  主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(description = "主键")
    private Long id;
    /**
     * 附件id
     */
    @Schema(description = "附件id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long attachmentId;

    //==========================附件属性=============================
    /**
     * 压缩文件所在压缩包相对路径
     */
    @Schema(description = "压缩文件所在压缩包相对路径")
    private String dir;
    /**
     * 附件名
     */
    @Schema(description = "附件名")
    private String attachmentName;
    /**
     * 附件大小(单位:B)
     */
    @Schema(description = "附件大小(单位:B)")
    private long size;
    /**
     * objectKey
     */
    @Schema(description = "华为OBS objectKey")
    private String objectKey;
    /**
     * 附件描述
     */
    @Schema(description = "附件描述")
    @Size(max = 100, message = "附件描述长度不能超过100")
    private String desc;
    /**
     * 排序
     */
    @Schema(description = "排序")
    private Integer sort;
    /**
     * 上传人id
     */
    @Schema(description = "上传人id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long uploadUserId;
    /**
     * 上传人姓名
     */
    @Schema(description = "上传人姓名")
    private String uploadUserName;
    /**
     * 上传人姓名
     */
    @Schema(description = "上传人姓名")
    private String createUserName;
    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
    @Schema(description = "创建时间")
    private Date createTime;
}
