Create post with realm

This commit is contained in:
2025-02-20 21:30:21 +08:00
parent 5ce0e33359
commit e1f1cd5130
5 changed files with 36 additions and 2 deletions

View File

@ -32,8 +32,8 @@ type Post struct {
Type string `json:"type"`
Body datatypes.JSONMap `json:"body" gorm:"index:,type:gin"`
Language string `json:"language"`
Alias *string `json:"alias"`
AliasPrefix *string `json:"alias_prefix"`
Alias *string `json:"alias" gorm:"index"`
AliasPrefix *string `json:"alias_prefix" gorm:"index"`
Tags []Tag `json:"tags" gorm:"many2many:post_tags"`
Categories []Category `json:"categories" gorm:"many2many:post_categories"`
Reactions []Reaction `json:"reactions"`