2018-09-16 19:09:40 +02:00
|
|
|
package models
|
2018-07-18 15:17:56 +02:00
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/jinzhu/gorm"
|
|
|
|
)
|
|
|
|
|
2018-11-06 19:02:03 +01:00
|
|
|
// Photo album
|
2018-07-18 15:17:56 +02:00
|
|
|
type Album struct {
|
|
|
|
gorm.Model
|
2018-09-19 11:16:18 +02:00
|
|
|
AlbumSlug string
|
|
|
|
AlbumName string
|
2018-09-27 08:59:53 +02:00
|
|
|
AlbumDescription string `gorm:"type:text;"`
|
|
|
|
AlbumNotes string `gorm:"type:text;"`
|
2018-09-19 11:16:18 +02:00
|
|
|
AlbumPhoto *Photo
|
|
|
|
AlbumPhotoID uint
|
|
|
|
Photos []Photo `gorm:"many2many:album_photos;"`
|
2018-07-18 15:17:56 +02:00
|
|
|
}
|