package com.engine.salary.entity.auth.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AuthTreeDTO {
    private Long roleEmpId;

    private List<Role> roles;

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Role {
        private Long roleId;

        private String roleName;

        private List<Resource> resources;
        private List<Opt> opts;
        private List<Data> datas;

        @lombok.Data
        @Builder
        @NoArgsConstructor
        @AllArgsConstructor
        public static class Resource {
            private Long resourceId;
            private String resourceName;
            private String resourceType;
        }

        @lombok.Data
        @Builder
        @NoArgsConstructor
        @AllArgsConstructor
        public static class Opt {
            private Long optId;
            private String page;
            private String opt;
        }

        @lombok.Data
        @Builder
        @NoArgsConstructor
        @AllArgsConstructor
        public static class Data {
            private Long dataId;
            private Long employeeId;
        }
    }
}

