mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-25 07:30:46 +08:00
feat: add user leveling and experience system
This commit is contained in:
@@ -4,6 +4,7 @@ import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.annotations.CreationTimestamp;
|
||||
|
||||
/**
|
||||
* Reaction entity representing a user's reaction to a post or comment.
|
||||
@@ -37,4 +38,9 @@ public class Reaction {
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "comment_id")
|
||||
private Comment comment;
|
||||
|
||||
@CreationTimestamp
|
||||
@Column(nullable = false, updatable = false,
|
||||
columnDefinition = "DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6)")
|
||||
private java.time.LocalDateTime createdAt;
|
||||
}
|
||||
|
||||
@@ -39,6 +39,9 @@ public class User {
|
||||
|
||||
private String avatar;
|
||||
|
||||
@Column(nullable = false)
|
||||
private int experience = 0;
|
||||
|
||||
@Column(length = 1000)
|
||||
private String introduction;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user