package com.caliverse.admin.domain.response;

import com.caliverse.admin.domain.entity.*;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

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

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class AdminResponse {
    private int status;

    private String result;

    @JsonProperty("data")
    private ResultData resultData;

    @Data
    @Builder
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public static class ResultData {

        private String message;

        private Long id;

        private String name;

        private String password;

        private String email;

        @JsonProperty("auth_list")
        private List<Authority> authorityList;

        private STATUS status;

        private LocalDateTime expiredDt;

        private Long groupId;

        @JsonProperty("auth_level_type")
        private EAuthAdminLevelType authLevelType;

        @JsonProperty("list")
        private List<Admin> adminList;

        private int total;
        @JsonProperty("total_all")
        private int totalAll;
        @JsonProperty("page_no")
        private int pageNo;
    }

}
