mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-10 09:00:53 +08:00
31 lines
572 B
Java
31 lines
572 B
Java
package com.openisle.model;
|
|
|
|
import jakarta.persistence.*;
|
|
import lombok.Data;
|
|
|
|
import java.time.LocalDate;
|
|
|
|
/**
|
|
* Invite token entity tracking usage counts.
|
|
*/
|
|
@Data
|
|
@Entity
|
|
public class InviteToken {
|
|
@Id
|
|
private String token;
|
|
|
|
/**
|
|
* Short token used in invite links. Existing records may have this field null
|
|
* and fall back to {@link #token} for backward compatibility.
|
|
*/
|
|
@Column(unique = true)
|
|
private String shortToken;
|
|
|
|
@ManyToOne
|
|
private User inviter;
|
|
|
|
private LocalDate createdDate;
|
|
|
|
private int usageCount;
|
|
}
|