package com.lesingle.creation.vo.department;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 部门响应 VO
 */
@Data
@Schema(description = "部门响应")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class DepartmentVO {

    @Schema(description = "部门 ID")
    private Long id;

    @Schema(description = "租户 ID")
    private Long tenantId;

    @Schema(description = "部门名称")
    private String name;

    @Schema(description = "部门编码")
    private String code;

    @Schema(description = "父部门 ID")
    private Long parentId;

    @Schema(description = "部门描述")
    private String description;

    @Schema(description = "排序")
    private Integer sort;

    @Schema(description = "有效状态")
    private Integer validState;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    @Schema(description = "子部门列表")
    private List<DepartmentVO> children;
}
