domain

package
v0.0.0-...-79a4a49 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Product

type Product struct {
	ID           string       `json:"id"`
	Name         string       `json:"name" binding:"required"`
	Description  string       `json:"description"`
	ImageURL     string       `json:"image_url"`
	Price        float64      `json:"price" binding:"required"`
	Quantity     int32        `json:"quantity" binding:"required"`
	DepartmentID string       `json:"department_id" binding:"required"`
	CreatedAt    time.Time    `json:"created_at"`
	UpdatedAt    time.Time    `json:"updated_at"`
	DeletedAt    sql.NullTime `json:"-"`
}

func NewProduct

func NewProduct(name, description, imageUrl string, price float64, quantity int32, departmentID string) *Product

func (*Product) IsValid

func (p *Product) IsValid() bool

Jump to

Keyboard shortcuts

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