database

package
v0.0.0-...-df3ea80 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	DB     *gorm.DB
	Logger zerolog.Logger
}

func (*Database) CreateService

func (d *Database) CreateService(service *types.Service) (*types.Service, error)

func (*Database) DeleteService

func (d *Database) DeleteService(id uint) error

func (*Database) GetServiceByID

func (d *Database) GetServiceByID(id uint) (*types.Service, error)

func (*Database) UpdateService

func (d *Database) UpdateService(service *types.Service) error

type Service

type Service struct {
	gorm.Model
	ParentID    *uint
	Name        string `gorm:"size:100"`
	Description string `gorm:"size:300"`
	Price       sql.NullFloat64
	PublicPrice bool
}

func (*Service) TableName

func (s *Service) TableName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL