chopme-frontend-common 1.0.36 → 1.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createRestaurantRatingSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.createRestaurantRatingSchema = zod_1.z.object({
|
|
6
|
+
rating: zod_1.z
|
|
7
|
+
.number({
|
|
8
|
+
error: "Rating is required",
|
|
9
|
+
})
|
|
10
|
+
.min(1, "Rating must be at least 1")
|
|
11
|
+
.max(5, "Rating cannot be greater than 5"),
|
|
12
|
+
comment: zod_1.z.string().trim().min(1, "Comment is required"),
|
|
13
|
+
});
|
package/build/dto/index.d.ts
CHANGED
package/build/dto/index.js
CHANGED
|
@@ -18,3 +18,4 @@ __exportStar(require("./create-client.dto"), exports);
|
|
|
18
18
|
__exportStar(require("./email-password-login.dto"), exports);
|
|
19
19
|
__exportStar(require("./update-address.dto"), exports);
|
|
20
20
|
__exportStar(require("./find-restaurant.dto"), exports);
|
|
21
|
+
__exportStar(require("./create-rating.dto"), exports);
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ICategoryEntity } from "./category.entity";
|
|
2
|
-
import { IRestaurantEntity } from "./restaurant.entity";
|
|
3
2
|
export type IMenu = {
|
|
4
3
|
id: string;
|
|
5
4
|
name: string;
|
|
6
|
-
|
|
5
|
+
restaurantId: string;
|
|
7
6
|
category: ICategoryEntity;
|
|
8
7
|
description?: string;
|
|
9
8
|
coverImage?: string;
|