package com.webchat.repository.entity;


import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * 公众号文章实体
 */
@Data
@Entity
@Table(name = "web_chat_article")
public class ArticleEntity extends BaseEntity {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    protected Long id;

    /**
     * 绑定公众号
     */
    @Column(name = "public_account")
    private String publicAccount;

    /**
     * 作者
     */
    @Column(name = "author")
    private String author;

    /**
     * 文章标题
     */
    @Column(name = "title")
    private String title;

    /**
     * 文章封面主图
     */
    @Column(name = "cover")
    private String cover;

    /**
     * 文章总结
     */
    @Column(name = "description")
    private String description;

    /**
     * 文章正文
     */
    @Column(name = "content")
    private String content;

    /**
     * 文章标签
     */
    @Column(name = "signs")
    private String signs;

    /**
     * 计划推送时间
     */
    @Column(name = "plan_push_date")
    private Date planPushDate;

    /**
     * 文章状态
     *
     * @see com.webchat.common.enums.ArticleStatusEnum
     */
    @Column(name = "status")
    private Integer status;

}
