Post type

This commit is contained in:
2024-07-22 01:19:23 +08:00
parent 3a5a84ae56
commit 045744aa18
3 changed files with 8 additions and 0 deletions

View File

@ -6,9 +6,15 @@ import (
"gorm.io/datatypes"
)
const (
PostTypeStory = "story"
PostTypeArticle = "article"
)
type Post struct {
BaseModel
Type string `json:"type"`
Body datatypes.JSONMap `json:"body"`
Language string `json:"language"`
Tags []Tag `json:"tags" gorm:"many2many:post_tags"`