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

23 lines
323 B
Go

package models
import (
"time"
)
type ShareToken struct {
Model
Value string `gorm:"not null"`
OwnerID int `gorm:"not null"`
Owner User
Expire *time.Time
Password *string
AlbumID *int
Album *Album
MediaID *int
Media *Media
}
func (share *ShareToken) Token() string {
return share.Value
}