30 lines
439 B
Go
30 lines
439 B
Go
package models
|
|
|
|
type Filter struct {
|
|
Tags []*Tag
|
|
}
|
|
|
|
type Collection struct {
|
|
Meta
|
|
|
|
Name string `json:"name"`
|
|
Filter *Filter `json:"filter"`
|
|
|
|
Quizzes []*Quiz `json:"quizzes" gorm:"many2many:collection_quizzes"`
|
|
}
|
|
|
|
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 ""
|
|
}
|