package com.snack.server.module.seckill.dto.req;

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

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 创建/更新抢购活动请求（管理端）
 */
@Data
@Schema(description = "创建/更新抢购活动")
public class SeckillActivitySaveReq implements Serializable {

    @Schema(description = "活动 ID（更新时必填）")
    private Long id;

    @NotBlank(message = "活动名称不能为空")
    @Schema(description = "活动名称")
    private String name;

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

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

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

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