feat: draft/online post field #26

This commit is contained in:
Florian Sylvain
2024-06-14 16:40:01 +02:00
parent 0759ab6d70
commit c69876a704
11 changed files with 111 additions and 13 deletions
+3
View File
@@ -11,6 +11,7 @@ type Post struct {
Title string `json:"title"`
Body string `json:"body"`
Images []*domain.Image `json:"images"`
IsOnline bool `json:"is_online"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
@@ -30,6 +31,7 @@ func FromDb(
title string,
body string,
images []*entity.Image,
isOnline bool,
createdAt time.Time,
updatedAt time.Time,
) Post {
@@ -49,6 +51,7 @@ func FromDb(
Title: title,
Body: body,
Images: domainImages,
IsOnline: isOnline,
CreatedAt: createdAt,
UpdatedAt: updatedAt,
}