package com.zhongshu.card.server.core.domain.school;

import com.zhongshu.card.server.core.domain.base.SuperMain;
import com.zhongshu.card.server.core.domain.org.Role;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.checkerframework.common.aliasing.qual.NonLeaked;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * 学校公告
 *
 * @author TRX
 * @date 2024/6/7
 */
@Data
@Document
@AllArgsConstructor
@NoArgsConstructor
@NonLeaked
public class NoticeInfo extends SuperMain {
    @Schema(description = "标题")
    private String title;

    @Schema(description = "内容")
    private String content;

    @Schema(description = "发布对象")
    private String author;

    @Schema(description = "阅读次数")
    private Long viewTimes = 0L;

    @Schema(description = "是否置顶")
    private Boolean isTopping = Boolean.FALSE;

    @Schema(description = "置顶时间")
    private Long toppingTime = 0L;

    public static NoticeInfo build(String id) {
        NoticeInfo entity = new NoticeInfo();
        entity.setId(id);
        return entity;
    }
}
