mirror of
https://github.com/navidrome/navidrome.git
synced 2024-09-11 20:12:54 +02:00
![Yash Jipkate](/assets/img/avatar_default.png)
* Initial draft - UNTESTED * changes to Save() and Update() * apply col filter and limit nanoid * remove columns to not update
25 lines
637 B
Go
25 lines
637 B
Go
package model
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type Share struct {
|
|
ID string `json:"id" orm:"column(id)"`
|
|
Name string `json:"name"`
|
|
Description string `json:"description"`
|
|
ExpiresAt time.Time `json:"expiresAt"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
LastVisitedAt time.Time `json:"lastVisitedAt"`
|
|
ResourceIDs string `json:"resourceIds" orm:"column(resource_ids)"`
|
|
ResourceType string `json:"resourceType"`
|
|
VisitCount int `json:"visitCount"`
|
|
}
|
|
|
|
type Shares []Share
|
|
|
|
type ShareRepository interface {
|
|
Put(s *Share) error
|
|
GetAll(options ...QueryOptions) (Shares, error)
|
|
}
|