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;

@AllArgsConstructor
@NoArgsConstructor
@Data
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class BattleEvent {
    private Long id;
    @JsonProperty("row_num")
    private Integer rowNum;
    @JsonProperty("group_id")
    private String groupId;
    @JsonProperty("event_id")
    private Integer eventId;
    @JsonProperty("event_name")
    private String eventName;
    @JsonProperty("repeat_type")
    private BATTLE_REPEAT_TYPE repeatType;
    @JsonProperty("event_operation_time")
    private Integer eventOperationTime;
    // 시작 일자
    @JsonProperty("event_start_dt")
    private LocalDateTime eventStartDt;
    // 종료 일자
    @JsonProperty("event_end_dt")
    private LocalDateTime eventEndDt;
    //전투 이벤트 상태
    private BATTLE_STATUS status;
    @JsonProperty("round_time")
    private Integer roundTime;
    @JsonProperty("round_count")
    private Integer roundCount;
    //포드 획득량
    @JsonProperty("round_pod")
    private Integer roundPod;
    @JsonProperty("hot_time")
    private Integer hotTime;
    @JsonProperty("config_id")
    private Integer configId;
    @JsonProperty("reward_group_id")
    private Integer rewardGroupId;
    @JsonProperty("instance_id")
    private Integer instanceId;

    private boolean deleted;

    @JsonProperty("create_by")
    private String createBy;
    @JsonProperty("create_dt")
    private LocalDateTime createDt;
    @JsonProperty("update_by")
    private String updateBy;
    @JsonProperty("update_dt")
    private LocalDateTime updateDt;

    public enum BATTLE_STATUS {
        WAIT,
        REGISTER,
        STOP,
        END,
        FAIL,
        CANCEL,
        RUNNING
        ;
    }

    public enum BATTLE_REPEAT_TYPE {
        NONE,
        DAY,        // 매일
        SUNDAY,     // 일요일
        MONDAY,     // 월요일
        TUESDAY,    // 화요일
        WEDNESDAY,  // 수요일
        THURSDAY,   // 목요일
        FRIDAY,     // 금요일
        SATURDAY    // 토요일
    }
}
