package com.xindazhou.business.controller.admin.message.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;

@Schema(description = "管理后台 - 服务消息新增/修改 Request VO")
@Data
public class ServiceMessageSaveReqVO {

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

    @Schema(description = "消息类型：notice-通知，announcement-公告，reminder-提醒", requiredMode = Schema.RequiredMode.REQUIRED, example = "notice")
    @NotBlank(message = "消息类型不能为空")
    private String messageType;

    @Schema(description = "消息标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "系统通知")
    @NotBlank(message = "消息标题不能为空")
    private String title;

    @Schema(description = "消息内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "这是一条系统通知...")
    @NotBlank(message = "消息内容不能为空")
    private String content;

    @Schema(description = "目标类型：all-全部用户，user-指定用户，group-用户组", example = "all")
    private String targetType;

    @Schema(description = "目标ID列表（JSON数组）", example = "[1,2,3]")
    private String targetIds;

    @Schema(description = "发送时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime sendTime;

    @Schema(description = "状态：0-草稿，1-已发送", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
    @NotNull(message = "状态不能为空")
    private Integer status;

}

