mirror of
https://github.com/Floriansylvain/RenewCMS.git
synced 2026-08-19 11:43:22 +02:00
24 lines
380 B
Go
24 lines
380 B
Go
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,
|
|
}
|
|
}
|