mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 19:53:21 +02:00
feat: draft/online post field #26
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user