shop

package
v0.0.0-...-2b4ca68 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoMigrate

func AutoMigrate(db *gorm.DB)

Types

type Repository

type Repository interface {
	CreateShop(shop *Shop) error
}

type Service

type Service interface {
	CreateShop(userId, name, desc, country, region, city string) (*Shop, error)
}

func NewService

func NewService(r Repository) Service

type Shop

type Shop struct {
	gorm.Model
	ID          string `gorm:"type:uuid;primarykey"`
	UserID      string `gorm:"type:uuid"`
	Name        string `gorm:"type:varchar(32);not null"`
	Description string
	Country     string `gorm:"type:varchar(64)"`
	Region      string `gorm:"type:varchar(64)"`
	City        string `gorm:"type:varchar(64)"`
}

Jump to

Keyboard shortcuts

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