adicionado 0 na escal de nota

This commit is contained in:
Luiz Silva 2026-01-05 08:57:14 -03:00
parent 0bbd04ee45
commit e8ca410b94
8 changed files with 72 additions and 15 deletions

View file

@ -53,7 +53,8 @@ func ValidatePedidoInput(in *contratos.PedidoInput) error {
func ValidatePatchInput(in *contratos.PatchInput) error {
if in.Nota != nil {
if *in.Nota < 1 || *in.Nota > 10 {
// Regra do produto: escala NPS é 010.
if *in.Nota < 0 || *in.Nota > 10 {
return errors.New("nota invalida")
}
}