package com.example.dateplanner.models.entities;

import com.example.dateplanner.models.enums.DatingTime;
import com.example.dateplanner.models.enums.DatingType;
import com.example.dateplanner.models.enums.PriceType;
import jakarta.persistence.Table;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.Column;
import java.time.LocalDateTime;
import java.util.*;

@Data
@NoArgsConstructor
@Table(name = "dating_places")
public class DatingPlace {
    @Id
    private UUID uuid;
    private String title;
    private String photo;
    private String description;
    @Column("organization_uuid")
    private UUID organizationUuid;
    @Column("dating_type")
    private DatingType datingType;
    private long price = 0;
    @Column("price_type")
    private PriceType priceType;
    @Column("dating_time")
    private DatingTime datingTime;
    @Column("start_time")
    private LocalDateTime startTime = null; // если это одноразовое событие
    private Long duration = null; // длительность мероприятия
    @Column("schedule_uuids")
    private List<UUID> scheduleUuids = new ArrayList<>(); // если многоразовое событие
    private String location;
    private String coordinates;
    private int views = 0; // просмотры
    @Column("in_favourite")
    private int inFavourite = 0;
    private Double rating = null;
    @Column("expiration_date")
    private LocalDateTime expirationDate = null;

    private boolean enabled = true;

    @Column("created_at")
    private LocalDateTime createdAt;
    @Column("updated_at")
    private LocalDateTime updatedAt;

}
