1
Fork 0
photoview/api/graphql/models/share_token.go

25 lines
308 B
Go
Raw Normal View History

2020-02-09 21:25:33 +01:00
package models
2020-02-11 14:32:35 +01:00
import (
"time"
2020-07-10 18:35:37 +02:00
"gorm.io/gorm"
2020-02-11 14:32:35 +01:00
)
2020-02-09 21:25:33 +01:00
type ShareToken struct {
gorm.Model
2020-02-09 21:25:33 +01:00
Value string
OwnerID uint
Owner User
2020-02-09 21:25:33 +01:00
Expire *time.Time
Password *string
AlbumID *uint
Album Album
MediaID *uint
Media *Media
2020-02-09 21:25:33 +01:00
}
func (share *ShareToken) Token() string {
return share.Value
}