Initial commit
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type User struct {
|
||||
ID int64
|
||||
Username string
|
||||
PasswordHash string
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
type Photo struct {
|
||||
ID int64
|
||||
UserID int64
|
||||
Username string
|
||||
OriginalFilename string
|
||||
StoredFilename string
|
||||
MimeType string
|
||||
Width int
|
||||
Height int
|
||||
ExifJSON string
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
type Comment struct {
|
||||
ID int64
|
||||
PhotoID int64
|
||||
UserID int64
|
||||
Username string
|
||||
Body string
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
type PhotoDetail struct {
|
||||
Photo
|
||||
Comments []Comment
|
||||
}
|
||||
Reference in New Issue
Block a user