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/7/28 16:44
 */
@Entity
@Table(name = "ycq_headline_article_worker")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of= {"headlineId"})
@GenericGenerator(name = "idGenerator", strategy = "com.crunii.micro.core.distributed.DistributedSnowFlakeId")
@ApiModel(description = "青春头条点赞用户")
public class YcqHeadlineArticleWorker implements Serializable {

    private static final long serialVersionUID = 1L;

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

    @Column(name = "headline_id")
    @ApiModelProperty(value = "头条文章id")
    private Long headlineId;

    @Column(name = "worker_id")
    @ApiModelProperty(value = "用户id")
    private Integer workerId;

    @Column(name = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
}
