
package com.tmerclub.cloud.multishop.dto;

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

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 公告DTO
 *
 * @author YXF
 * @date 2020-11-25 17:57:56
 */
@Data
public class NoticeDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @Schema(description = "公告id")
    private Long id;

    @Schema(description = "店铺id")
    private Long shopId;

    @NotNull(message = "标题不能为空")
    @Schema(description = "公告标题")
    private String title;

    @NotNull(message = "内容不能为空")
    @Schema(description = "公告内容")
    private String content;

    @Schema(description = "是否立即发送 1：立即发送    0：定时发送")
    private Integer immediatelySend;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date sendTime;

    @Schema(description = "类型(1:在商家端展示 2:在用户端展示 3：在供应商端展示)")
    private Integer type;

    @Schema(description = "类型不能为空（平台端同时创建多类型公告,用逗号隔开）(1:在商家端展示 2:在用户端展示 3：在供应商端展示)")
    private String types;

    @Schema(description = "商家可见范围 (为空则全部可见)")
    private String multiShopIds;

    @Schema(description = "用户可见范围 (为空则全部可见)")
    private String userIds;

    @Schema(description = "供应商可见范围 (为空则全部可见)")
    private String supplierIds;

    @Schema(description = "当前账号id(商家：租户id   用户：userId)")
    private Long accountId;

    @NotNull(message = "状态不能为空")
    @Schema(description = "状态(1:公布 0:撤回)")
    private Integer status;

    @NotNull(message = "是否置顶不能为空")
    @Schema(description = "是否置顶")
    private Integer isTop;

    @Schema(description = "发布时间")
    private Date publishTime;

    @Schema(description = "是否已读(1:已读 0:未读)")
    private Integer isLearning;

    @Schema(description = "发布开始日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @Schema(description = "发布结束日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;


}
