package com.ruoyi.generator.domain.Community;

import com.baomidou.mybatisplus.annotation.TableField;
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 java.io.Serializable;
import java.util.Date;

/**
 * 文章上传的图片
 * @TableName community_article_images
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("community_article_images")
public class CommunityArticleImages implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 图片id
     */
    @ApiModelProperty("图片id")
    @TableId("id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 文章id
     */
    @ApiModelProperty("文章id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long articleId;

    /**
     * 图片地址
     */
    @ApiModelProperty("图片地址")
    @TableField("image_url")
    private String imageUrl;



    /** 创建者 */
    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;
}