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 qiaolin
 * @version 1.0
 * @date 2023/6/25 18:30
 */
@Entity
@Table(name = "ycq_study_placard")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of= {"leagueId"})
@GenericGenerator(name = "idGenerator", strategy = "com.crunii.micro.core.distributed.DistributedSnowFlakeId")
@ApiModel(description = "app首页热门课程表")
public class YcqStudyPlacard implements Serializable {

    private static final long serialVersionUID = 1L;

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

    @Column(name = "placard_url")
    @ApiModelProperty(value = "图片url")
    private String placardUrl;

    @Column(name = "placard_link")
    @ApiModelProperty(value = "跳转链接")
    private String placardLink;

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

    @Column(name = "placard_id")
    @ApiModelProperty(value = "海报ID")
    private String placardId;

    @Column(name = "state")
    @ApiModelProperty(value = "海报状态：1有效 0无效")
    private Integer state;

    @Column(name = "sys_code")
    @ApiModelProperty(value = "系统编码")
    private String sysCode;

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