package com.app.entity.info;

import com.app.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;

/**
 * 功能描述：新闻资讯
 *
 * @Author 梁展鹏
 * @Date 2021/1/14 15:55
 */
@ApiModel("新闻资讯")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("t_news")
public class News extends BaseEntity {

    @ApiModelProperty("标题")
    @NotEmpty
    @TableField("title")
    private String title;

    @ApiModelProperty("图片")
    @NotEmpty
    @TableField("images")
    private String images;

    @ApiModelProperty("发布机构/人")
    @NotEmpty
    @TableField("author")
    private String author;

    @ApiModelProperty("内容")
    @NotEmpty
    @TableField("content")
    private String content;

    @ApiModelProperty("机构id")
    @NotEmpty
    @TableField(value = "organ_id")
    private String organId;

    @ApiModelProperty("阅读数")
    @NotEmpty
    @TableField("read_num")
    private Long readNum;

}
