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

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
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 = "管理后台 - Banner保存 Request VO")
@Data
public class BannerSaveReqVO {

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

    @Schema(description = "Banner图片URL", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://example.com/banner.jpg")
    @NotBlank(message = "Banner图片URL不能为空")
    private String imageUrl;

    @Schema(description = "说明", example = "说明")
    private String description;

    @Schema(description = "上架时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime onlineTime;

    @Schema(description = "下架时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime offlineTime;

    @Schema(description = "推送类型：1-社区文章，2-社区活动，3-外部链接", example = "1")
    private Integer pushType;

    @Schema(description = "推送目标", example = "文章ID/活动ID/外部链接URL")
    private String pushTarget;

    @Schema(description = "排序", example = "0")
    private Integer sort;

}

