package com.njcn.rdms.module.system.controller.admin.user.vo.userManagementRelation;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

@Schema(description = "管理后台 - 我的下属树 Response VO")
@Data
public class MySubordinateTreeRespVO {

    @Schema(description = "用户 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2042074259501088770")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "戴坤")
    private String userNickname;

    @Schema(description = "是否为根节点", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
    private Boolean isRoot;

    @Schema(description = "下属总人数（递归）", requiredMode = Schema.RequiredMode.REQUIRED, example = "18")
    private Integer subordinateCount;

    @Schema(description = "子节点")
    private List<MySubordinateTreeRespVO> children;
}
