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.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@AllArgsConstructor
@NoArgsConstructor
@Data
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class LandAuction {
    private Long id;
    @JsonProperty("row_num")
    private Integer rowNum;
    //랜드 id
    @JsonProperty("land_id")
    private Integer landId;
    @JsonProperty("land_name")
    private String landName;
    @JsonProperty("land_size")
    private String landSize;
    @JsonProperty("land_socket")
    private Integer landSocket;
    @JsonProperty("auction_seq")
    private Integer auctionSeq;
    // 언어별 내용 리스트
    @JsonProperty("message_list")
    private List<Message> messageList;
    // 예약 시작 시간
    @JsonProperty("resv_start_dt")
    private LocalDateTime resvStartDt;
    // 예약 종료 시간
    @JsonProperty("resv_end_dt")
    private LocalDateTime resvEndDt;
    // 경매 시작 시간
    @JsonProperty("auction_start_dt")
    private LocalDateTime auctionStartDt;
    // 예약 종료 시간
    @JsonProperty("auction_end_dt")
    private LocalDateTime auctionEndDt;
    //경매 상태
    private AUCTION_STATUS status;
    //입찰 재화
    @JsonProperty("currency_type")
    private String currencyType;
    //경매 시작가
    @JsonProperty("start_price")
    private Double startPrice;
    //낙찰 정산일
    @JsonProperty("close_end_dt")
    private LocalDateTime closeEndDt;
    //낙찰 가격
    @JsonProperty("close_price")
    private Double closePrice;
    //낙찰자
    @JsonProperty("bidder_guid")
    private String bidderGuid;
    @JsonProperty("bidder_nickname")
    private String bidderNickname;

    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 AUCTION_STATUS {
        WAIT,
        RESV_START,
        RESV_END,
        AUCTION_START,
        AUCTION_END,
        CANCEL,
        FAIL
        ;
    }
}
