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;

/**
 * @author: LG
 * @date: 2023/6/5 17:41
 */
@Entity
@Table(name = "YCQ_FILE")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of= {"id"})
@GenericGenerator(name = "idGenerator", strategy = "com.crunii.micro.core.distributed.DistributedSnowFlakeId")
@ApiModel(description = "文件表")
public class YcqFile implements Serializable {

    private static final long serialVersionUID = 1L;

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

    @Column(name = "file_id")
    @ApiModelProperty(value = "文件id")
    private String fileId;

    @Column(name = "upload_worker_id")
    @ApiModelProperty(value = "上传作者id")
    private String uploadWorkerId;

    @Column(name = "required_integral")
    @ApiModelProperty(value = "所需积分")
    private Integer requiredIntegral;

    @Column(name = "describe")
    @ApiModelProperty(value = "描述")
    private String describe;

    @Column(name = "upload_time")
    @ApiModelProperty(value = "上传时间")
    private java.util.Date uploadTime;

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


    @Column(name = "update_time")
    @ApiModelProperty(value = "更新时间")
    private java.util.Date updateTime;

    @Column(name = "update_worker_id")
    @ApiModelProperty(value = "修改人id")
    private String updateWorkerId;

    @Column(name = "audit_status")
    @ApiModelProperty(value = "审核状态（0：未通过，1：审核通过，-1：审核中）")
    private Integer auditStatus;

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

    @Column(name = "upload_worker_org")
    @ApiModelProperty(value = "上传人组织id")
    private String uploadWorkerOrg;

    @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 String fileSize;

    @Column(name = "number")
    @ApiModelProperty(value = "下载量")
    private String number;
}
