feat: images
This commit is contained in:
1 parent
eb98a1003e
commit
c25fb1b0a3
19 files changed
+387
-100
No files matched your search
@@ -0,0 +1,23 @@
|
||||
package image
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type Image struct {
|
||||
ID uint32
|
||||
Path string
|
||||
PostID uint32
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
func FromDB(id uint32, path string, postId uint32, createdAt time.Time, updatedAt time.Time) Image {
|
||||
return Image{
|
||||
ID: id,
|
||||
Path: path,
|
||||
PostID: postId,
|
||||
CreatedAt: createdAt,
|
||||
UpdatedAt: updatedAt,
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user