refazendo o order service

This commit is contained in:
unknown
2025-03-30 20:02:24 -03:00
parent 32bd7c14b3
commit 2fd5ae2b1f
13 changed files with 735 additions and 849 deletions

17
src/shared/ResultModel.ts Normal file
View File

@@ -0,0 +1,17 @@
export class ResultModel<T> {
constructor(
public success: boolean,
public message?: string,
public data?: T,
public error?: any
) {}
static success<T>(data?: T, message?: string): ResultModel<T> {
return new ResultModel<T>(true, message, data);
}
static failure<T>(message: string, error?: any): ResultModel<T> {
return new ResultModel<T>(false, message, undefined, error);
}
}