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 16:32
 */
@Entity
@Table(name = "YCQ_FILE_LABEL_RELATION")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of= {"id"})
@GenericGenerator(name = "idGenerator", strategy = "com.crunii.micro.core.distributed.DistributedSnowFlakeId")
@ApiModel(description = "文件与标签关联表")
public class YcqFileLabelRelation 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 Long fileId;

    @Column(name = "label_id")
    @ApiModelProperty(value = "标签id")
    private String labelId;

    @Column(name = "label_name")
    @ApiModelProperty(value = "标签名称")
    private String labelName;
}
