clean: Article to Post in domain and related use cases

Renamed the 'Article' domain to 'Post' in order to better reflect the purpose and utility of the object. The change involved renaming all related use cases, classes, and other references from 'Article' to 'Post' and updating all functions and data types to work with Posts instead of Articles.
This commit is contained in:
Florian Sylvain
2023-09-06 01:56:27 +02:00
parent 46491a688b
commit 554fdc1989
18 changed files with 274 additions and 271 deletions
-37
View File
@@ -1,37 +0,0 @@
package article
import "time"
type Article struct {
ID uint32 `json:"id"`
Title string `json:"title"`
Body string `json:"body"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func FromApi(
title string,
body string,
) Article {
return Article{
Title: title,
Body: body,
}
}
func FromDb(
id uint32,
title string,
body string,
createdAt time.Time,
updatedAt time.Time,
) Article {
return Article{
ID: id,
Title: title,
Body: body,
CreatedAt: createdAt,
UpdatedAt: updatedAt,
}
}