2020-02-09 21:25:33 +01:00
|
|
|
package models
|
|
|
|
|
2020-02-11 14:32:35 +01:00
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
2020-02-09 21:25:33 +01:00
|
|
|
|
|
|
|
type ShareToken struct {
|
2020-11-28 21:29:31 +01:00
|
|
|
Model
|
2020-11-28 21:49:33 +01:00
|
|
|
Value string `gorm:"not null"`
|
|
|
|
OwnerID int `gorm:"not null"`
|
2020-11-26 20:48:04 +01:00
|
|
|
Owner User
|
2020-02-09 21:25:33 +01:00
|
|
|
Expire *time.Time
|
|
|
|
Password *string
|
2020-11-28 21:29:31 +01:00
|
|
|
AlbumID *int
|
2020-11-28 21:49:33 +01:00
|
|
|
Album *Album
|
2020-11-28 21:29:31 +01:00
|
|
|
MediaID *int
|
2020-11-26 20:48:04 +01:00
|
|
|
Media *Media
|
2020-02-09 21:25:33 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func (share *ShareToken) Token() string {
|
|
|
|
return share.Value
|
|
|
|
}
|