package com.cpop.oam.business.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mybatisflex.annotation.Column;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

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

/**
 * 部门表Vo输出
 *
 * @author DB.lost
 * @since 2023-05-10
 */
@Data
@Accessors(chain = true)
@Schema(description = "部门表")
public class DeptVo {

    /**
     * 部门id
     */
    @Schema(description ="部门id")
    private String id;

    /**
     * 父部门id
     */
    @Schema(description ="父部门id")
    private String parentId;

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

    /**
     * 排序
     */
    @Schema(description ="排序")
    private Integer orderNo;

    /**
     * 负责人
     */
    @Schema(description ="负责人")
    private String leader;

    /**
     * 电话
     */
    @Schema(description ="电话")
    private String phone;

    /**
     * 邮箱
     */
    @Schema(description ="邮箱")
    private String email;

    /**
     * 部门状态:1正常,0停用
     */
    @Schema(description ="部门状态:1正常,0停用")
    private Boolean status;

    /**
     * 子部门
     */
    @Column(ignore = true)
    @Schema(description ="子部门集合")
    private List<DeptVo> children = new ArrayList<DeptVo>();

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    @Schema(description ="更新时间")
    private LocalDateTime updateTime;

    /**
     * 备注
     */
    @Schema(description ="备注")
    private String remark;
}
