product

package
v0.0.0-...-e9b73c5 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateCategoryData

type CreateCategoryData struct {
	Name string `validate:"required"`
}

type Product

type Product struct {
	ID         uint
	CategoryID uint
	Name       string
	Price      int
	Stock      int
	Image      string
	Detail     string
	CreatedAt  time.Time
	UpdatedAt  time.Time
	DeletedAt  *time.Time
}

type Repository

type Repository interface {
	GetProduct(CategoryId int, param string) ([]Product, error)
	GetDetail(ProductId int) (Product, error)
}

type Service

type Service interface {
	GetProduct(CategoryId int, param string) ([]Product, error)
	GetDetail(ProductId int) (Product, error)
}

func NewService

func NewService(repository Repository) Service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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