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 RankingSchedule {
    private Long id;
    @JsonProperty("row_num")
    private Integer rowNum;
    private String guid;
    private String title;
    @JsonProperty("meta_id")
    private Integer metaId;
    @JsonProperty("event_action_id")
    private Integer eventActionId;
    // 시작 일자
    @JsonProperty("start_dt")
    private LocalDateTime startDt;
    // 종료 일자
    @JsonProperty("end_dt")
    private LocalDateTime endDt;
    @JsonProperty("base_dt")
    private LocalDateTime baseDt;
    //이벤트 상태
    private EVENT_STATUS status;
    @JsonProperty("refresh_interval")
    private Integer refreshInterval;
    @JsonProperty("initialization_interval")
    private Integer initializationInterval;
    @JsonProperty("snapshot_interval")
    private Integer snapshotInterval;

    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 EVENT_STATUS {
        WAIT,
        FINISH,
        FAIL,
        RUNNING,
        ;
    }
}
