mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-24 15:10:48 +08:00
Add category module and require post category
This commit is contained in:
@@ -30,6 +30,10 @@ public class Post {
|
||||
@JoinColumn(name = "author_id")
|
||||
private User author;
|
||||
|
||||
@ManyToOne(optional = false, fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "category_id")
|
||||
private Category category;
|
||||
|
||||
@Column(nullable = false)
|
||||
private long views = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user