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_upload_info")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of= {"uploadId"})
@GenericGenerator(name = "idGenerator", strategy = "com.crunii.micro.core.distributed.DistributedSnowFlakeId")
@ApiModel(description = "上传文件信息表")
public class YcqUploadInfo implements Serializable {

    private static final long serialVersionUID = 1L;

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

    @Column(name = "upload_worker_id")
    @ApiModelProperty(value = "上传人id")
    private Integer uploadWorkerId;

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

    @Column(name = "org_id")
    @ApiModelProperty(value = "组织id")
    private String orgId;

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

    @Column(name = "is_album")
    @ApiModelProperty(value = "是否图册，1：是 0：否 ")
    private Integer isAlbum;

    @Column(name = "img_num")
    @ApiModelProperty(value = "图片张数")
    private Integer imgNum;

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

    @Column(name = "audit_status")
    @ApiModelProperty(value = "审核状态")
    private Integer auditStatus;

    @Column(name = "update_time")
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

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

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

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

    @Column(name = "upload_worker_name")
    @ApiModelProperty(value = "上传人姓名")
    private String uploadWorkerName;

    @Column(name = "file_title")
    @ApiModelProperty(value = "文件标题")
    private String fileTitle;

    @Column(name = "push_time")
    @ApiModelProperty(value = "文件标题")
    private Date pushTime;
}

