feat(15-01): add journal categories, tags, settings, and author slug
Squash the remaining golem15_journal_* tables plus the backend_users author slug so a host migrate matches the frozen PHP schema. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
26
models/tag.go
Normal file
26
models/tag.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
// Tag is a journal tag stored on golem15_journal_tags. It is not translatable.
|
||||
type Tag struct {
|
||||
ID uint `gorm:"column:id;primaryKey"`
|
||||
Name string `gorm:"column:name"`
|
||||
Slug string `gorm:"column:slug"`
|
||||
Description *string `gorm:"column:description"`
|
||||
CreatedAt *time.Time `gorm:"column:created_at"`
|
||||
UpdatedAt *time.Time `gorm:"column:updated_at"`
|
||||
}
|
||||
|
||||
func (Tag) TableName() string { return "golem15_journal_tags" }
|
||||
|
||||
func (Tag) MorphName() string { return `Golem15\Journal\Models\Tag` }
|
||||
|
||||
// Fillable is JOURNAL-001.
|
||||
func (Tag) Fillable() []string {
|
||||
return []string{"name", "slug", "description"}
|
||||
}
|
||||
|
||||
func init() {
|
||||
Register(Tag{})
|
||||
}
|
||||
Reference in New Issue
Block a user