2fas-server/internal/api/icons/domain/icons_collection.go

29 lines
590 B
Go
Raw Normal View History

2022-12-31 10:22:38 +01:00
package domain
import (
"github.com/google/uuid"
"gorm.io/datatypes"
"gorm.io/gorm"
)
type IconsCollection struct {
gorm.Model
Id uuid.UUID `gorm:"primarykey"`
Name string
Description string
Icons datatypes.JSON
}
func (IconsCollection) TableName() string {
return "icons_collections"
}
type IconsCollectionRepository interface {
Save(iconsCollection *IconsCollection) error
Update(iconsCollection *IconsCollection) error
Delete(iconsCollection *IconsCollection) error
FindById(id uuid.UUID) (*IconsCollection, error)
FindAll() []*IconsCollection
}