net.guerlab.smart.article.service.entity.SimpleArticle Maven / Gradle / Ivy
package net.guerlab.smart.article.service.entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import net.guerlab.smart.article.core.domain.ArticleDTO;
import net.guerlab.smart.article.core.eneity.Attachments;
import net.guerlab.smart.platform.commons.domain.MultiId;
import net.guerlab.smart.platform.commons.entity.BaseOrderEntity;
import net.guerlab.spring.commons.dto.DefaultConvertDTO;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.time.LocalDateTime;
/**
* 简单文章
*
* @author guer
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Table(name = "article_article")
public class SimpleArticle extends BaseOrderEntity implements DefaultConvertDTO {
/**
* 文章ID
*/
@Id
private Long articleId;
/**
* 唯一key
*/
@Column(name = "uniqueKey", updatable = false)
private String uniqueKey;
/**
* 文章分类ID
*/
@Column(name = "articleCategoryId", nullable = false)
private Long articleCategoryId;
/**
* 文章分类名称
*/
@Column(name = "articleCategoryName", nullable = false)
private String articleCategoryName;
/**
* 文章分类类型
*/
private String articleCategoryType;
/**
* 次要文章分类ID列表
*/
@Column(name = "secondaryArticleCategoryIds", nullable = false)
private MultiId secondaryArticleCategoryIds;
/**
* 文章分类ID列表
*/
@Column(name = "articleCategoryIds", nullable = false)
private MultiId articleCategoryIds;
/**
* 标题
*/
@Column(name = "title", nullable = false)
private String title;
/**
* 封面URL
*/
private String coverUrl;
/**
* 作者
*/
private String author;
/**
* 发布时间
*/
@Column(name = "releaseTime", nullable = false)
private LocalDateTime releaseTime;
/**
* 简介
*/
private String synopsis;
/**
* 已发布标志
*/
@Column(name = "published", nullable = false)
private Boolean published;
/**
* 原文链接
*/
private String originalLink;
/**
* 总是跳转标志
*/
@Column(name = "alwaysRedirect", nullable = false)
private Boolean alwaysRedirect;
/**
* 更新时间
*/
@Column(name = "updateTime", nullable = false)
private LocalDateTime updateTime;
/**
* 附件列表
*/
@Column(name = "attachments", nullable = false)
private Attachments attachments;
/**
* 包含附件标志
*/
@Column(name = "hasAttachment", nullable = false)
private Boolean hasAttachment;
/**
* 阅读量
*/
@Column(name = "viewNumber", nullable = false, updatable = false)
private Long viewNumber;
}