package com.ema.admin.modules.system.entity;

import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.ema.common.domain.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.io.Serializable;

/**
 *  部门信息实体类。
 *
 * @author LIJIAN
 * @since 2026-05-12
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel("部门信息")
@Table("sys_department")
public class SysDepartment extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 部门id
     */
    @Id(keyType = KeyType.Generator, value = "snowFlakeId")
    @ApiModelProperty("部门id")
    private String id;

    /**
     * 部门编码
     */
    @ApiModelProperty("部门编码")
    private String deptCode;

    /**
     * 部门名称
     */
    @ApiModelProperty("部门名称")
    private String deptName;

    /**
     * 上级部门ID
     */
    @ApiModelProperty("上级部门ID")
    private String parentId;

    /**
     * 显示顺序
     */
    @ApiModelProperty("显示顺序")
    private Integer sort;

}
