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 wangchen create 2023/5/31 16:44
 */
@Entity
@Table(name = "ycq_league_nation")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of= {"leagueNationId"})
@GenericGenerator(name = "idGenerator", strategy = "com.crunii.micro.core.distributed.DistributedSnowFlakeId")
@ApiModel(description = "团委组织年龄表")
public class YcqLeagueNation implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(generator = "idGenerator")
    @Column(name = "league_nation_id")
    @ApiModelProperty(value = "主键")
    private String leagueNationId;

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

    @Column(name = "nation_id")
    @ApiModelProperty(value = "民族id")
    private String nationId;

    @Column(name = "member_num")
    @ApiModelProperty(value = "人数")
    private String memberNum;

    @Column(name = "league_id")
    @ApiModelProperty(value = "组织编码")
    private String leagueId;
}

