Alterado end point api/v1/delivery/schedule para mostrar a capacidade e saldo da capacidade com 3 casas decimais e criado peso adicional para mostrar a data de entrega na abertura da venda
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
export interface Contract {
|
||||
errors: any[],
|
||||
validade(model: any): boolean,
|
||||
export interface Contract {
|
||||
errors: any[],
|
||||
validade(model: any): boolean,
|
||||
}
|
||||
@@ -1,19 +1,19 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { Flunt } from 'src/utils/flunt';
|
||||
import { DictionaryModel } from './../domain/models/dictionary.model';
|
||||
import { Contract } from './contract';
|
||||
|
||||
@Injectable()
|
||||
export class CreateDictionaryContract implements Contract {
|
||||
|
||||
errors: any[];
|
||||
|
||||
validade(model: DictionaryModel): boolean {
|
||||
const flunt = new Flunt();
|
||||
flunt.isRequired(model.nick, "Informe a abreviatura do dicionário.");
|
||||
flunt.hasMinLen(model.word, 5, "Nome do dicionário deve conter no mínimo 5 caracteres.");
|
||||
this.errors = flunt.errors;
|
||||
return flunt.errors.length == 0;
|
||||
}
|
||||
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { Flunt } from 'src/utils/flunt';
|
||||
import { DictionaryModel } from './../domain/models/dictionary.model';
|
||||
import { Contract } from './contract';
|
||||
|
||||
@Injectable()
|
||||
export class CreateDictionaryContract implements Contract {
|
||||
|
||||
errors: any[];
|
||||
|
||||
validade(model: DictionaryModel): boolean {
|
||||
const flunt = new Flunt();
|
||||
flunt.isRequired(model.nick, "Informe a abreviatura do dicionário.");
|
||||
flunt.hasMinLen(model.word, 5, "Nome do dicionário deve conter no mínimo 5 caracteres.");
|
||||
this.errors = flunt.errors;
|
||||
return flunt.errors.length == 0;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user