Can create new blogs

This commit is contained in:
cdricms
2025-02-21 19:46:36 +01:00
parent 7a97961fef
commit 4b005945b2
9 changed files with 362 additions and 99 deletions

View File

@@ -10,7 +10,7 @@ import (
type Blog struct {
bun.BaseModel `bun:"table:blogs"`
BlogID uuid.UUID `bun:"type:uuid,pk,default:gen_random_uuid()" json:"blogID"`
BlogID uuid.UUID `bun:"blog_id,type:uuid,pk,default:gen_random_uuid()" json:"blogID"`
Slug string `bun:"slug,unique,notnull" json:"slug"`
Content string `bun:"content,notnull" json:"content"`
Title string `bun:"title,notnull" json:"title"`