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 create 2023/5/31 16:44
 */
@Entity
@Table(name = "ycq_file_record")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of= {"fileRecordId"})
@GenericGenerator(name = "idGenerator", strategy = "com.crunii.micro.core.distributed.DistributedSnowFlakeId")
@ApiModel(description = "文件详细表")
public class YcqFileRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(generator = "idGenerator")
    @Column(name = "file_record_id")
    @ApiModelProperty(value = "逻辑id")
    private Long fileRecordId;

    @Column(name = "upload_id")
    @ApiModelProperty(value = "上传id")
    private Long uploadId;

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

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

    @Column(name = "file_key")
    @ApiModelProperty(value = "文件key")
    private String fileKey;

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

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

    @Column(name = "is_pic")
    @ApiModelProperty(value = "是否图片 0否 1是")
    private Integer isPic;

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

    @Column(name = "sort")
    @ApiModelProperty(value = "排序")
    private Integer sort;
}

