39 lines
616 B
Go
39 lines
616 B
Go
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
|
|
}
|