package com.yunfeiyun.agmp.common.web.system.domain;

import com.yunfeiyun.agmp.common.annotation.Excel;
import com.yunfeiyun.agmp.common.annotation.IdentifyId;
import com.yunfeiyun.agmp.common.core.domain.BaseEntity;
import com.yunfeiyun.agmp.common.xss.Xss;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

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

/**
 * 通知公告表 SysNotice
 * 
 * @author 杨晓辉
 */
public class SysNotice extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 公告ID */
    @IdentifyId
    private String noticeId;

    /** 公告标题 */
    private String noticeTitle;

    /** 公告类型（1通知 2公告） */
    private String noticeType;

    /** 公告内容 */
    private String noticeContent;

    /** 公告状态（0正常 1关闭） */
    private String noticeShowstatus;


    /** 角色创建者 */
    @Excel(name = "角色创建者")
    private String noticeCreator;

    /** 角色创建时间 */
    @Excel(name = "角色创建时间")
    private String noticeCreateddate;

    /** 角色更新者 */
    @Excel(name = "角色更新者")
    private String noticeModifier;

    /** 角色更新时间 */
    @Excel(name = "角色更新时间")
    private String noticeModifieddate;

    /** 角色备注 */
    @Excel(name = "角色备注")
    private String noticeRemark;


    public SysNotice()
    {
        setNoticeId(getId());
    }

    public String getNoticeId()
    {
        return noticeId;
    }

    public void setNoticeId(String noticeId)
    {
        this.noticeId = noticeId;
    }

    public void setNoticeTitle(String noticeTitle)
    {
        this.noticeTitle = noticeTitle;
    }

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

    public void setNoticeType(String noticeType)
    {
        this.noticeType = noticeType;
    }

    public String getNoticeType()
    {
        return noticeType;
    }

    public void setNoticeContent(String noticeContent)
    {
        this.noticeContent = noticeContent;
    }

    public String getNoticeContent()
    {
        return noticeContent;
    }

    public void setNoticeShowstatus(String noticeShowstatus)
    {
        this.noticeShowstatus = noticeShowstatus;
    }

    public String getNoticeShowstatus()
    {
        return noticeShowstatus;
    }


    public String getNoticeCreator()
    {
        return noticeCreator;
    }

    public void setNoticeCreator(String noticeCreator)
    {
        this.noticeCreator = noticeCreator;
    }

    public String getNoticeCreateddate()
    {
        return noticeCreateddate;
    }

    public void setNoticeCreateddate(String noticeCreateddate)
    {
        this.noticeCreateddate = noticeCreateddate;
    }

    public String getNoticeModifier()
    {
        return noticeModifier;
    }

    public void setNoticeModifier(String noticeModifier)
    {
        this.noticeModifier = noticeModifier;
    }

    public String getNoticeModifieddate()
    {
        return noticeModifieddate;
    }

    public void setNoticeModifieddate(String noticeModifieddate)
    {
        this.noticeModifieddate = noticeModifieddate;
    }

    public String getNoticeRemark()
    {
        return noticeRemark;
    }

    public void setNoticeRemark(String noticeRemark)
    {
        this.noticeRemark = noticeRemark;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("noticeId", getNoticeId())
            .append("noticeTitle", getNoticeTitle())
            .append("noticeType", getNoticeType())
            .append("noticeContent", getNoticeContent())
            .append("noticeShowstatus", getNoticeShowstatus())
            .append("noticeCreator", getNoticeCreator())
            .append("noticeCreateddate", getNoticeCreateddate())
            .append("noticeModifier", getNoticeModifier())
            .append("noticeModifieddate", getNoticeModifieddate())
            .append("noticeRemark", getNoticeRemark())
            .toString();
    }
}
