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")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of= {"leagueId"})
@GenericGenerator(name = "idGenerator", strategy = "com.crunii.micro.core.distributed.DistributedSnowFlakeId")
@ApiModel(description = "团委组织表")
public class YcqLeague  implements Serializable {

    private static final long serialVersionUID = 1L;

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

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

    @Column(name = "parent_league_code")
    @ApiModelProperty(value = "父类组织编码")
    private String parentLeagueCode;

    @Column(name = "league_type")
    @ApiModelProperty(value = "组织类别")
    private String leagueType;

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

    @Column(name = "league_full_name")
    @ApiModelProperty(value = "组织全称")
    private String leagueFullName;

    @Column(name = "is_leaf")
    @ApiModelProperty(value = "是否子节点 0 否 1 是")
    private int isLeaf;

    @Column(name = "type")
    @ApiModelProperty(value = "类型")
    private Integer type;

    @Column(name = "sys_type")
    @ApiModelProperty(value = "系统分类")
    private String sysType;

    @Column(name = "query_type")
    @ApiModelProperty(value = "查询类型")
    private int queryType;
}

