2fas-server/internal/api/icons/domain/icon.go
2022-12-31 10:22:38 +01:00

35 lines
491 B
Go

package domain
import (
"github.com/google/uuid"
"gorm.io/gorm"
)
const (
Light string = "light"
Dark = "dark"
)
type Icon struct {
gorm.Model
Id uuid.UUID `gorm:"primarykey"`
Name string
Type string
Url string
Width int
Height int
}
func (Icon) TableName() string {
return "icons"
}
type IconsRepository interface {
Save(icon *Icon) error
Update(icon *Icon) error
Delete(icon *Icon) error
FindById(id uuid.UUID) (*Icon, error)
FindAll() []*Icon
}