package org.springblade.modules.article.entity;
|
|
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.fasterxml.jackson.annotation.JsonFormat;
|
import lombok.Data;
|
import org.springframework.format.annotation.DateTimeFormat;
|
import javax.validation.constraints.NotNull;
|
import java.io.Serializable;
|
import java.util.Date;
|
|
/**
|
* @author zhongrj
|
* @time 2021-06-07
|
*
|
*/
|
@Data
|
@TableName("sys_article")
|
public class Article implements Serializable {
|
|
/**
|
* 主键id,自增
|
*/
|
@TableId(value = "id",type = IdType.AUTO)
|
private Long id;
|
|
/**
|
* 标题
|
*/
|
@NotNull(message = "标题不能为空")
|
private String title;
|
|
/**
|
* 内容
|
*/
|
private String content;
|
|
/**
|
* logo 图片url
|
*/
|
private String url;
|
|
/**
|
* logo 图片url
|
*/
|
@TableField("video_url")
|
private String videoUrl;
|
|
/**
|
* 创建时间
|
*/
|
@TableField("create_time")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
@DateTimeFormat( pattern = "yyyy-MM-dd HH:mm:ss")
|
private Date createTime;
|
|
/**
|
* 更新时间
|
*/
|
@TableField("update_time")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
@DateTimeFormat( pattern = "yyyy-MM-dd HH:mm:ss")
|
private Date updateTime;
|
|
/**
|
* 发布来源id
|
*/
|
@TableField("source_id")
|
private String sourceId;
|
|
/**
|
* 发布来源名称
|
*/
|
@TableField("source_name")
|
private String sourceName;
|
|
/**
|
* 资讯类型,对应业务字典数据 articleType
|
*/
|
@TableField("article_type")
|
private String articleType;
|
|
/**
|
* 是否推荐 1:推荐 2:不推荐
|
*/
|
private Integer recommend;
|
|
/**
|
* 发布状态 0:未发布 1:已发布
|
*/
|
private String publish;
|
}
|