package com.multictrl.modules.business.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

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

/**
 * 固件表
 *
 * @author Sdy
 * @since 1.0.0 2026-05-11
 */
@Data
@Schema(name = "固件表")
public class FirmwareDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键")
    @NotNull(message = "标识不能为空")
    private Long id;

    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    @Schema(description = "设备名称")
    private String deviceName;

    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    @Schema(description = "文件名称")
    private String fileName;

    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    @Schema(description = "固件版本")
    private String firmwareVersion;

    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    @Schema(description = "文件路径")
    private String path;

    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    @Schema(description = "文件长度")
    private Long fileSize;

    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    @Schema(description = "文件md5")
    private String fileMd5;

    @Schema(description = "备注")
    private String remark;

    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    @Schema(description = "发布时间")
    private Date releasedDate;

    @JsonProperty(access = JsonProperty.Access.READ_ONLY)
    @Schema(description = "创建时间")
    private Date createDate;
}
