This commit is contained in:
Jay
2018-04-17 17:16:03 +08:00
parent 880a32a9c8
commit a45b1f3603
6 changed files with 181 additions and 10 deletions
+16
View File
@@ -0,0 +1,16 @@
package models
import (
"time"
)
// Album model
type Album struct {
ID string `xorm:"id"`
UID string `xorm:"uid"`
Name string `xorm:"name"`
Public bool `xorm:"public default false"`
Ctime time.Time `xorm:"ctime created"`
Mtime time.Time `xorm:"mtime updated"`
Photos []*Photo `xorm:"-"`
}
+13
View File
@@ -0,0 +1,13 @@
package models
import "time"
// Photo model
type Photo struct {
ID string `xorm:"id"`
Album string `xorm:"album"`
Name string `xorm:"name"`
Thumbnail string `xorm:"thumbnail"`
Ctime time.Time `xorm:"ctime"`
Mtime time.Time `xorm:"mtime"`
}