package com.example.dateplanner.models.entities;

import com.example.dateplanner.models.enums.EventType;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.Column;
import org.springframework.data.relational.core.mapping.Table;

import java.time.LocalDateTime;
import java.util.UUID;

@Data
@NoArgsConstructor
@Table(name = "tennis_events")
public class TennisEvent {
    @Id
    @Column("uuid")
    private UUID uuid;
    @NonNull
    @Column("club_uuid")
    private UUID clubUuid;
    @NonNull
    private String title;
    private String description;
    @NonNull
    private EventType type;

    @Column("start_datetime")
    @NonNull
    private LocalDateTime startDateTime;
    @Column("end_datetime")
    private LocalDateTime endDateTime;
    @Column("max_participants")
    private Integer maxParticipants;
    @Column("current_participants")
    private Integer currentParticipants = 0;
    @Column("take_part_price")
    private Double takePartPrice;
    private String rewards;
    private String requirements;
    private String contactEmail;
    private String contactPhone;
    private String imageUrl;
    @Column("registration_open")
    private Boolean registrationOpen = Boolean.TRUE;

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