package de.oaa.xxx.games.chastity.unlock;

import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;

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

@Getter
@Setter
@Entity
@Table(name = "unlock_code_history")
public class UnlockCodeHistoryEntity {

    @Id
    @GeneratedValue(strategy = GenerationType.UUID)
    @Setter(lombok.AccessLevel.NONE)
    private UUID id;

    @Column(nullable = false)
    private UUID userId;

    @Column(nullable = false)
    private UUID lockId;

    @Column
    private String lockName;

    @Column(nullable = false)
    private String unlockCode;

    /** GREEN_CARD | HYGIENE_OPEN | HYGIENE_CLOSE | KEYHOLDER_UNLOCK */
    @Column(nullable = false)
    private String source;

    @Column(nullable = false)
    private LocalDateTime receivedAt;
}
