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.Data;

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

/**
* 合集关联文章
* @TableName community_collection_article
*/
@Data
@TableName("community_collection_article")
public class CommunityCollectionArticle 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 collectionId;
    /**
    * 文章id
    */
    @ApiModelProperty("文章id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long articleId;
    /**
     * 是否删除
     */
    @ApiModelProperty("是否删除")
    private boolean isDelete;
    /**
    * 创建人
    */
    @ApiModelProperty("创建人")
    private Long createBy;
    /**
    * 更新人
    */
    @ApiModelProperty("更新人")
    private Long updateBy;
    /**
    * 创建时间
    */
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
    * 更新时间
    */
    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
}
