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 baoxy
 * @date 2023-06-27
 */
@Entity
@Table(name = "ycq_article_detail")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of = {"articleId"})
@GenericGenerator(name = "idGenerator", strategy = "com.crunii.micro.core.distributed.DistributedSnowFlakeId")
@ApiModel(description = "团委组织表")
public class YcqArticleDetail implements Serializable {

    private static final long serialVersionUID = 1L;

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

    @Column(name = "article_title")
    @ApiModelProperty(value = "文章标题")
    private String articleTitle;

    @Column(name = "article_type")
    @ApiModelProperty(value = "文章类别")
    private int articleType;

    @Column(name = "carousel")
    @ApiModelProperty(value = "轮播 0无 1展示 2不展示 3展示到期")
    private int carousel;

    @Column(name = "have_carousel")
    @ApiModelProperty(value = "是否设置轮播 0否 1是")
    private int haveCarousel;

    @Column(name = "article_state")
    @ApiModelProperty(value = "文章本身状态")
    private int articleState;

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

    @Column(name = "org_name")
    @ApiModelProperty(value = "组织名称")
    private String orgName;

    @Column(name = "show_due")
    @ApiModelProperty(value = "展示到期 0否 1是")
    private int showDue;

    @Column(name = "publish_time")
    @ApiModelProperty(value = "发布时间")
    private Date publishTime;

    @Column(name = "login_id")
    @ApiModelProperty(value = "发布人id")
    private int loginId;

    @Column(name = "login_name")
    @ApiModelProperty(value = "发布人")
    private String loginName;

    @Column(name = "start_show_time")
    @ApiModelProperty(value = "展示周期开始时间")
    private Date startShowTime;

    @Column(name = "end_show_time")
    @ApiModelProperty(value = "展示周期结束时间")
    private Date endShowTime;

    @Column(name = "start_enroll_time")
    @ApiModelProperty(value = "报名开始时间")
    private Date startEnrollTime;

    @Column(name = "end_enroll_time")
    @ApiModelProperty(value = "报名结束时间")
    private Date endEnrollTime;

    @Column(name = "article_content")
    @ApiModelProperty(value = "文章内容")
    private String articleContent;

    @Column(name = "file_key")
    @ApiModelProperty(value = "文章封面")
    private String fileKey;

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

    @Column(name = "create_worker")
    @ApiModelProperty(value = "创建人id")
    private int createWorker;

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

    @Column(name = "update_worker")
    @ApiModelProperty(value = "更新人id")
    private int updateWorker;

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

    @Column(name = "match_id")
    @ApiModelProperty(value = "关联赛事id")
    private Long matchId;

    @Column(name = "round_id")
    @ApiModelProperty(value = "关联场次id")
    private Long roundId;
}

