package com.caliverse.admin.domain.response;

import com.caliverse.admin.domain.entity.REPORTTYPE;
import com.caliverse.admin.domain.entity.STATUS;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;

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

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class UserReportResponse {
    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 int total;
        @JsonProperty("total_all")
        private int totalAll;
        @JsonProperty("page_no")
        private int pageNo;

        private Report report;
        private Reply reply;
        private List<Report> list;

        private int totalCnt;
        private int resolve;
        private int unresolve;
        private String rate;
    }
    @Data
    @Builder
    @AllArgsConstructor
    public static class Report {
        @JsonProperty("row_num")
        private Integer rowNum;
        private String pk;
        private String sk;
        @JsonProperty("reporter_guid")
        private String reporterGuid;
        @JsonProperty("reporter_nickname")
        private String reporterNickName;
        @JsonProperty("target_guid")
        private String targetGuid;
        @JsonProperty("target_nickname")
        private String targetNickName;
        @JsonProperty("report_type")
        private REPORTTYPE reportType;
        private String title;
        private String detail;
        private STATUS state;
        @JsonProperty("create_time")
        private LocalDateTime createTime;
        @JsonProperty("resolution_time")
        private LocalDateTime resolutionTime;
        @JsonProperty("manager_email")
        private String managerEmail;
    }
    @Data
    @Builder
    @AllArgsConstructor
    public static class Reply {
        private String title;
        private String detail;
        @JsonProperty("manager_email")
        private String managerEmail;
        @JsonProperty("manager_nickname")
        private String managerNickName;
        @JsonProperty("reporter_nickname")
        private String reporterNickName;
    }

}
