package com.gameplatform.server.model.dto.cooldown;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDateTime;

/**
 * 内存冷却视图对象
 */
public class MachineCooldownView {
    private String machineId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime cooldownStartTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime cooldownEndTime;

    private String reason;
    private Long linkTaskId;
    private long remainingMinutes;
    private boolean active;

    public MachineCooldownView() {}

    public MachineCooldownView(String machineId,
                               LocalDateTime cooldownStartTime,
                               LocalDateTime cooldownEndTime,
                               String reason,
                               Long linkTaskId,
                               long remainingMinutes,
                               boolean active) {
        this.machineId = machineId;
        this.cooldownStartTime = cooldownStartTime;
        this.cooldownEndTime = cooldownEndTime;
        this.reason = reason;
        this.linkTaskId = linkTaskId;
        this.remainingMinutes = remainingMinutes;
        this.active = active;
    }

    public String getMachineId() { return machineId; }
    public void setMachineId(String machineId) { this.machineId = machineId; }

    public LocalDateTime getCooldownStartTime() { return cooldownStartTime; }
    public void setCooldownStartTime(LocalDateTime cooldownStartTime) { this.cooldownStartTime = cooldownStartTime; }

    public LocalDateTime getCooldownEndTime() { return cooldownEndTime; }
    public void setCooldownEndTime(LocalDateTime cooldownEndTime) { this.cooldownEndTime = cooldownEndTime; }

    public String getReason() { return reason; }
    public void setReason(String reason) { this.reason = reason; }

    public Long getLinkTaskId() { return linkTaskId; }
    public void setLinkTaskId(Long linkTaskId) { this.linkTaskId = linkTaskId; }

    public long getRemainingMinutes() { return remainingMinutes; }
    public void setRemainingMinutes(long remainingMinutes) { this.remainingMinutes = remainingMinutes; }

    public boolean isActive() { return active; }
    public void setActive(boolean active) { this.active = active; }
}


