package com.xindazhou.business.controller.admin.community.activity.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

import static com.xindazhou.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 活动保存 Request VO")
@Data
public class ActivitySaveReqVO {

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

    @Schema(description = "活动编号", example = "ACT001")
    private String activityId;

    @Schema(description = "活动名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "活动名称")
    @NotBlank(message = "活动名称不能为空")
    private String name;

    @Schema(description = "活动类型：1-线上活动，2-线下活动", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "活动类型不能为空")
    private Integer type;

    @Schema(description = "封面图URL", example = "https://example.com/cover.jpg")
    private String coverUrl;

    @Schema(description = "活动地点", example = "北京市")
    private String location;

    @Schema(description = "活动开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "活动开始时间不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime startTime;

    @Schema(description = "活动结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "活动结束时间不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime endTime;

    @Schema(description = "报名开始时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime registerStartTime;

    @Schema(description = "报名结束时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime registerEndTime;

    @Schema(description = "发送对象", example = "全部用户")
    private String recipients;

    @Schema(description = "报名积分", example = "100")
    private Integer registerPoints;

    @Schema(description = "活动内容", example = "活动内容")
    private String content;

}

