init
This commit is contained in:
commit
d69342b2e9
160 changed files with 28681 additions and 0 deletions
124
internal/tenant/models.go
Normal file
124
internal/tenant/models.go
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
package tenant
|
||||
|
||||
import "time"
|
||||
|
||||
type Post struct {
|
||||
ID string
|
||||
Slug string
|
||||
Title string
|
||||
Description string
|
||||
Tags []string
|
||||
CoverImage string
|
||||
ContentMD string
|
||||
ContentHTML string
|
||||
IsPublished bool
|
||||
MembersOnly bool
|
||||
PublishedAt *time.Time
|
||||
UpdatedAt *time.Time
|
||||
Aliases []string
|
||||
CreatedAt time.Time
|
||||
ModifiedAt time.Time
|
||||
}
|
||||
|
||||
type PostDraft struct {
|
||||
PostID string
|
||||
Slug string
|
||||
Title string
|
||||
Description string
|
||||
Tags []string
|
||||
CoverImage string
|
||||
MembersOnly bool
|
||||
ContentMD string
|
||||
ContentHTML string
|
||||
ModifiedAt time.Time
|
||||
}
|
||||
|
||||
type PostVersion struct {
|
||||
ID int64
|
||||
PostID string
|
||||
Slug string
|
||||
Title string
|
||||
Description string
|
||||
Tags []string
|
||||
CoverImage string
|
||||
ContentMD string
|
||||
ContentHTML string
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
type Asset struct {
|
||||
ID string
|
||||
Filename string
|
||||
R2Key string
|
||||
ContentType string
|
||||
Size int64
|
||||
Width int
|
||||
Height int
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
type Settings map[string]string
|
||||
|
||||
type Member struct {
|
||||
UserID string
|
||||
Email string
|
||||
Name string
|
||||
Tier string
|
||||
Status string
|
||||
ExpiresAt *time.Time
|
||||
SyncedAt time.Time
|
||||
}
|
||||
|
||||
type Comment struct {
|
||||
ID int64
|
||||
UserID string
|
||||
PostSlug string
|
||||
Content string
|
||||
ContentHTML string
|
||||
ParentID *int64
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
type Reaction struct {
|
||||
ID int64
|
||||
UserID string
|
||||
AnonID string
|
||||
PostSlug string
|
||||
Emoji string
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
type User struct {
|
||||
ID string
|
||||
Email string
|
||||
Name string
|
||||
AvatarURL string
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
type Session struct {
|
||||
Token string
|
||||
UserID string
|
||||
ExpiresAt time.Time
|
||||
}
|
||||
|
||||
type APIKey struct {
|
||||
Key string
|
||||
Name string
|
||||
CreatedAt time.Time
|
||||
LastUsedAt *time.Time
|
||||
}
|
||||
|
||||
type Plugin struct {
|
||||
ID string
|
||||
Name string
|
||||
Language string
|
||||
Source string
|
||||
Wasm []byte
|
||||
WasmSize int
|
||||
Hooks []string
|
||||
Enabled bool
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue