package com.ruoyi.cms.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.xss.Xss;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

@Data
@ApiModel("APP通知")
@TableName(value = "app_notice")
public class AppNotice extends BaseEntity
{
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableId(value = "notice_id",type = IdType.AUTO)
    @ApiModelProperty("公司id")
    private Long noticeId;

    @Xss(message = "消息标题不能包含脚本字符")
    @NotBlank(message = "消息标题不能为空")
    @Size(min = 0, max = 50, message = "消息标题不能超过50个字符")
    private String noticeTitle;

    @ApiModelProperty("消息类型")
    private String noticeType;

    @ApiModelProperty("消息内容")
    private String noticeContent;

    @ApiModelProperty("消息状态 0正常 1关闭")
    private String status;

}
