package online.wesal.wesal.entity;

import jakarta.persistence.*;
import java.time.LocalDate;

@Entity
@Table(name = "puzzles")
public class Puzzle {
    
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    
    @Column(nullable = false, unique = true)
    private LocalDate date;
    
    @Column(nullable = false, length = 5)
    private String word;
    
    public Puzzle() {}
    
    public Puzzle(LocalDate date, String word) {
        this.date = date;
        this.word = word;
    }
    
    public Long getId() {
        return id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    
    public LocalDate getDate() {
        return date;
    }
    
    public void setDate(LocalDate date) {
        this.date = date;
    }
    
    public String getWord() {
        return word;
    }
    
    public void setWord(String word) {
        this.word = word;
    }
}