hugo-cms/models/bundle.go

41 lines
799 B
Go
Raw Normal View History

2025-02-16 00:43:22 +00:00
package models
import "time"
const (
RootBundleName = "_root"
)
// NameProvenance encodes where the name came from, whether it was set by the user or autogenerated in some way
type NameProvenance int
const (
UserNameProvenance NameProvenance = iota
TitleNameProvenance NameProvenance = iota
DateNameProvenance NameProvenance = iota
)
type Bundle struct {
ID int64
SiteID int64
Name string
CreatedAt time.Time
UpdatedAt time.Time
}
type Page struct {
ID int64
SiteID int64
BundleID int64
Name string
NameProvenance NameProvenance
Title string
Role int64
Body string
State PostState
Props []byte
PublishDate time.Time
CreatedAt time.Time
UpdatedAt time.Time
}