package model

import (
	"fmt"

	"route256/cart/internal/domain/entity"
)

type Product struct {
	Name  string
	Price int32
	Sku   entity.Sku `validate:"gt=0"`
}

func (p *Product) Validate() error {
	if err := validate.Struct(p); err != nil {
		return fmt.Errorf("invalid requested values: %w", err)
	}

	return nil
}
