package com.snack.server.module.seckill.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

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

/**
 * 抢购活动 VO（用户端列表 + 详情）
 */
@Data
@Schema(description = "抢购活动")
public class SeckillActivityVO implements Serializable {

    @Schema(description = "活动 ID")
    private Long id;

    @Schema(description = "活动名称")
    private String name;

    @Schema(description = "活动封面图")
    private String cover;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "开始时间")
    private LocalDateTime startTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "结束时间")
    private LocalDateTime endTime;

    /** 动态计算：未开始/进行中/已结束 */
    @Schema(description = "状态：0-未开始 1-进行中 2-已结束")
    private Integer status;

    @Schema(description = "状态文本")
    private String statusText;

    @Schema(description = "距离开始/结束的秒数（负数表示已结束）")
    private Long countdownSeconds;

    @Schema(description = "活动说明")
    private String description;

    @Schema(description = "活动商品列表")
    private List<SeckillProductVO> products;
}
