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_collect
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("community_article_collect")
public class CommunityArticleCollect 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 createBy;

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

    /** 更新者 */
    @ApiModelProperty("更新者")
    private String updateBy;

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