entity

package
v0.0.0-...-d9e78da Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Order

type Order struct {
	ID         string
	Price      float64
	Tax        float64
	FinalPrice float64
}

func NewOrder

func NewOrder(id string, price float64, tax float64) (*Order, error)

func (*Order) CalculateFinalPrice

func (o *Order) CalculateFinalPrice() error

func (*Order) IsValid

func (o *Order) IsValid() error

type OrderRepositoryInterface

type OrderRepositoryInterface interface {
	Save(order *Order) error
	List() ([]Order, error)
}

Jump to

Keyboard shortcuts

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