package cd.casic.module.machine.controller.vo;

import cd.casic.framework.commons.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Schema(description = "管理后台 - 密钥信息 Response VO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true) // 添加链式调用支持
public class SecretKeyVO extends PageParam {

    @Schema(description = "密钥ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long id;

    @Schema(description = "密钥名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "生产环境密钥")
    private String name;

    @Schema(description = "密钥描述", example = "用于加密敏感数据的密钥")
    private String description;

    @Schema(description = "密钥密码", example = "******")
    private String password;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2023-06-15T10:30:00")
    private LocalDateTime createTime;

    @Schema(description = "更新时间", example = "2023-06-15T10:30:00")
    private LocalDateTime updateTime;

    @Schema(description = "关联的机器ID列表", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1024, 2048]")
    private List<Long> machineInfoIds;

    @Schema(description = "私钥", requiredMode = Schema.RequiredMode.REQUIRED, example = "******")
    private String privateKey;

    @Schema(description = "公钥", requiredMode = Schema.RequiredMode.REQUIRED, example = "******")
    private String publicKey;

    @Schema(description = "绑定/解绑密钥",example = "true")
    private Boolean enableBind;
}
