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

32 lines
612 B
Go

package domain
import (
"github.com/google/uuid"
"gorm.io/datatypes"
"gorm.io/gorm"
)
type IconRequest struct {
gorm.Model
Id uuid.UUID `gorm:"primarykey"`
CallerId string
ServiceName string
Issuers datatypes.JSON
Description string
LightIconUrl string
DarkIconUrl string
}
func (IconRequest) TableName() string {
return "icons_requests"
}
type IconsRequestsRepository interface {
Save(iconRequest *IconRequest) error
Update(iconRequest *IconRequest) error
Delete(iconRequest *IconRequest) error
FindById(id uuid.UUID) (*IconRequest, error)
FindAll() []*IconRequest
}