package 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;

@AllArgsConstructor
@NoArgsConstructor
@Data
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class BlackList {
    @JsonProperty("row_num")
    private Long rowNum;
    private Long id;
    private String guid;
    private String nickname;
    private STATUSTYPE status;
    private PERIOD period;
    //제재 사유
    private SANCTIONS sanctions;
    //제재 방식
    private SANCTIONSTYPE type;
    @JsonProperty("start_dt")
    private LocalDateTime startDt;
    @JsonProperty("end_dt")
    private LocalDateTime endDt;

    //등록자 이메일 주소
    @JsonProperty("create_by")
    private String createBy;

    @JsonProperty("create_dt")
    private String createDt;

    @JsonProperty("history")
    private List<BlackList> blackListHistory;

    //유효성 체크
    private boolean validate;

    public enum STATUSTYPE {
        WAIT,
        EXPIRATION,     // 제재 종료
        INPROGRESS,     // 제재 중
        FAIL
        ;
    }
}
