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/2 9:38
 */
@Entity
@Table(name = "ycq_league_count")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of= {"leagueCountId"})
@GenericGenerator(name = "idGenerator", strategy = "com.crunii.micro.core.distributed.DistributedSnowFlakeId")
@ApiModel(description = "组织数量表")
public class YcqLeagueCount implements Serializable {

    private static final long serialVersionUID = 1L;

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

    @Column(name = "league_code")
    @ApiModelProperty(value = "组织编码")
    private String leagueCode;

    @Column(name = "league_count")
    @ApiModelProperty(value = "组织数量")
    private int leagueCount;

    @Column(name = "leading_organs")
    @ApiModelProperty(value = "团的领导机关")
    private int leadingOrgans;

    @Column(name = "committee")
    @ApiModelProperty(value = "团委")
    private int committee;

    @Column(name = "union_members")
    @ApiModelProperty(value = "团工委")
    private int unionMembers;

    @Column(name = "branch")
    @ApiModelProperty(value = "团支部")
    private int branch;

    @Column(name = "graduate_org")
    @ApiModelProperty(value = "毕业生团组织")
    private int graduateOrg;

    @Column(name = "wait_branch")
    @ApiModelProperty(value = "待结转团支部")
    private int waitBranch;

    @Column(name = "league_person")
    @ApiModelProperty(value = "组织人数")
    private int leaguePerson;

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

    @Column(name = "gen_branch")
    @ApiModelProperty(value = "团总支")
    private Integer genBranch;
}
