Shioriko/pkg/database/post.go
2021-05-11 17:50:34 +07:00

18 lines
351 B
Go

package database
import (
"time"
)
type Post struct {
ID string `gorm:"size:36"`
UserID string
User User
BlobID string
Blob Blob `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
SourceURL string
Tags []Tag `gorm:"many2many:post_tags;constraint:OnDelete:CASCADE"`
CreatedAt time.Time
UpdatedAt time.Time
}