package com.caliverse.admin.domain.response;

import com.caliverse.admin.domain.entity.Authority;
import com.caliverse.admin.domain.entity.Groups;
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 org.springframework.http.HttpStatus;

import java.util.List;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class GroupResponse {
    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;

        @JsonProperty("group_id")
        private Long groupId;
        @JsonProperty("group_nm")
        private String groupNm;

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

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