probo/models/collection.go

31 lines
439 B
Go
Raw Normal View History

2023-10-07 11:43:12 +02:00
package models
2023-11-13 21:01:12 +01:00
type Filter struct {
Tags []*Tag
}
2023-10-07 11:43:12 +02:00
type Collection struct {
2023-10-28 20:50:06 +02:00
Meta
2023-11-13 21:01:12 +01:00
Name string `json:"name"`
Filter *Filter `json:"filter"`
2023-10-07 11:43:12 +02:00
2023-10-28 20:50:06 +02:00
Quizzes []*Quiz `json:"quizzes" gorm:"many2many:collection_quizzes"`
2023-10-07 11:43:12 +02:00
}
2023-11-13 21:01:12 +01:00
func (c *Collection) String() string {
return c.Name
}
func (c *Collection) GetID() string {
return c.ID
}
func (c *Collection) SetID(id string) {
c.ID = id
}
func (c *Collection) GetHash() string {
return ""
}