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 Event {
    private Long id;
    @JsonProperty("row_num")
    private Long rowNum;
    //우편 제목
    private String title;
    // 우편 내용
    private String content;
    // 아이템
    @JsonProperty("item_list")
    private List<Item> itemList;
    // 언어별 우편 리스트
    @JsonProperty("mail_list")
    private List<Message> mailList;
    // 시작 시간
    @JsonProperty("start_dt")
    private LocalDateTime startDt;
    // 종료 시간
    @JsonProperty("end_dt")
    private LocalDateTime endDt;
    //이벤트 상태
    private EVENTSTATUS status;
    //이벤트 타입
    @JsonProperty("event_type")
    private EVENTTYPE eventType;
    // 삭제 사유
    @JsonProperty("delete_desc")
    private String deleteDesc;
    // 추가 여부
    @JsonProperty("add_flag")
    private boolean addFlag;

    @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 EVENTSTATUS {
        WAIT,
        FINISH,
        FAIL,
        RUNNING,
        DELETE
        ;
    }
    public enum EVENTTYPE {
        ATTD,
        ;
    }
}
