Started working on the blogs

This commit is contained in:
cdricms
2025-02-21 17:49:42 +01:00
parent de828d4c13
commit 7a97961fef
9 changed files with 178 additions and 79 deletions

View File

@@ -13,12 +13,11 @@ type Blog struct {
BlogID uuid.UUID `bun:"type:uuid,pk,default:gen_random_uuid()" json:"blogID"`
Slug string `bun:"slug,unique,notnull" json:"slug"`
Content string `bun:"content,notnull" json:"content"`
Label string `bun:"label" json:"label"`
Title string `bun:"title,notnull" json:"title"`
AuthorID uuid.UUID `bun:"author_id,type:uuid,notnull" json:"authorID"`
Published time.Time `bun:"published,default:current_timestamp" json:"published"`
Summary string `bun:"summary" json:"summary"`
Image string `bun:"image" json:"image"`
Href string `bun:"href" json:"href"`
Author User `bun:"rel:belongs-to,join:author_id=user_id" json:"author"`
}