package com.crunii.micro.domain.entity.main;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @author wangchen
 * @date 2023-06-28
 */
@Entity
@Table(name = "ycq_match_cover")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of = {"carouselId"})
@GenericGenerator(name = "idGenerator", strategy = "com.crunii.micro.core.distributed.DistributedSnowFlakeId")
@ApiModel(description = "封面图片")
public class YcqMatchCover implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(generator = "idGenerator")
    @Column(name = "cover_id")
    @ApiModelProperty(value = "主键id")
    private Long coverId;

    @Column(name = "article_id")
    @ApiModelProperty(value = "文章id")
    private Long articleId;

    @Column(name = "file_name")
    @ApiModelProperty(value = "文件名称")
    private String fileName;

    @Column(name = "file_type")
    @ApiModelProperty(value = "文件类型")
    private String fileType;

    @Column(name = "file_size")
    @ApiModelProperty(value = "文件大小")
    private String fileSize;

    @Column(name = "pic_width")
    @ApiModelProperty(value = "图片宽度")
    private Integer picWidth;

    @Column(name = "pic_height")
    @ApiModelProperty(value = "图片宽度")
    private Integer picHeight;

    @Column(name = "file_key")
    @ApiModelProperty(value = "图片key")
    private String fileKey;

    @Column(name = "state")
    @ApiModelProperty(value = "状态")
    private Integer state;
}

