package com.ruoyi.generator.domain.Community;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
* 文章评价记录表
* @TableName community_article_comment
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("community_article_comment")
public class CommunityArticleComment implements Serializable {

    /**
    * 评论id
    */
    @NotNull(message="[评论id]不能为空")
    @ApiModelProperty("评论id")
    @TableId("id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    /**
    * 文章id
    */
    @ApiModelProperty("文章id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long articleId;
    /**
    * 评论人id
    */
    @ApiModelProperty("评论人id")
    private Long userId;

    /**
     * 评论内容
     */
    @ApiModelProperty("评论内容")
    private String content;

    /** 创建者 */
    private Long createBy;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 更新者 */
    private Long updateBy;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /** 是否删除 */
    private boolean isDelete;
}
