package com.inspect.system.domain;

import com.inspect.base.core.web.domain.BaseEntity;
import com.inspect.base.core.xss.Xss;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

import lombok.Setter;

@Setter
public class SysNotice extends BaseEntity {
    private static final long serialVersionUID = 1L;
    private Long noticeId;
    private String noticeTitle;
    private String noticeType;
    private String noticeContent;
    private String status;

    public Long getNoticeId() {
        return this.noticeId;
    }

    @Xss(
            message = "公告标题不能包含脚本字符"
    )
    @NotBlank(
            message = "公告标题不能为空"
    )
    @Size(
            min = 0,
            max = 50,
            message = "公告标题不能超过50个字符"
    )
    public String getNoticeTitle() {
        return this.noticeTitle;
    }

    public String getNoticeType() {
        return this.noticeType;
    }

    public String getNoticeContent() {
        return this.noticeContent;
    }

    public String getStatus() {
        return this.status;
    }

    @Override
    public String toString() {
        return "SysNotice{" +
                "noticeId=" + noticeId +
                ", noticeTitle='" + noticeTitle + '\'' +
                ", noticeType='" + noticeType + '\'' +
                ", noticeContent='" + noticeContent + '\'' +
                ", status='" + status + '\'' +
                '}';
    }
}
