@floristcloud/api-lib 1.2.109 → 1.2.110
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.
- package/build/commands/client/get-client-calculate.query.js +6 -4
- package/build/commands/consignment/execute-consignment-product-update.command.js +5 -4
- package/build/commands/integration/moysklad/execute-moysklad-import.command.js +3 -2
- package/build/commands/integration/moysklad/preview-moysklad-products.query.js +3 -2
- package/build/commands/integration/moysklad/scan-moysklad-import.query.js +3 -2
- package/build/commands/order/create-order.command.js +2 -1
- package/build/commands/order/update-order.command.js +3 -2
- package/build/commands/order/webshop/get-order-sales-by-month.query.js +2 -1
- package/build/commands/order-product/create-order-product.command.js +2 -1
- package/build/commands/order-product/group/price-valuation-execute.command.js +3 -1
- package/build/commands/order-product/update-order-product.command.js +2 -1
- package/build/commands/payment-invoice/create-payment-invoice.command.js +3 -1
- package/build/commands/payment-invoice/pay-payment-invoice.command.js +3 -1
- package/build/commands/pre-order-collection-item/execute-pre-order-collection-item-update.command.js +3 -2
- package/build/commands/pre-order-collection-item/multiplicity-option/create-pre-order-collection-item-multiplicity-option.command.js +2 -1
- package/build/commands/pre-order-collection-item/multiplicity-option/update-pre-order-collection-item-multiplicity-option.command.js +2 -1
- package/build/commands/product/create-product.command.js +4 -3
- package/build/commands/product/group/update-group-product-prices.command.js +3 -2
- package/build/commands/product/group/update-group-product-update-batch.command.js +4 -3
- package/build/commands/product/multiplicity-option/create-product-multiplicity-option.command.js +2 -1
- package/build/commands/product/multiplicity-option/update-product-multiplicity-option.command.js +2 -1
- package/build/commands/product/update-product.command.js +4 -3
- package/build/commands/report/get-cash-flow.query.js +8 -5
- package/build/commands/report/get-daily-orders-summary.query.js +2 -1
- package/build/commands/report/get-report-for-period.query.js +10 -9
- package/build/commands/report/get-report-group-by-client.query.js +11 -10
- package/build/commands/report/get-report-group-by-position.query.js +15 -14
- package/build/commands/report/get-sales-summary.query.js +13 -11
- package/build/commands/transaction/generate-check-transaction.command.js +2 -1
- package/build/commands/transaction/generate-pre-payment-check.command.js +2 -1
- package/build/commands/transaction/get-sum-transaction-by-money-account.query.js +3 -1
- package/build/commands/transaction/get-transaction-summary.query.js +5 -3
- package/build/commands/write-off/get-write-off-sum-by-order.query.js +3 -1
- package/build/commands/write-off/update-write-off-price.command.js +2 -1
- package/build/schemas/action-log/action-log-money.schema.js +28 -0
- package/build/schemas/action-log/index.js +1 -0
- package/build/schemas/action-log/order-info.schema.js +3 -2
- package/build/schemas/action-log/order-product-info.schema.js +2 -1
- package/build/schemas/action-log/order-product-update-action-log.schema.js +2 -1
- package/build/schemas/action-log/pre-order-product-info.schema.js +2 -1
- package/build/schemas/action-log/pre-order-product-update-action-log.schema.js +2 -1
- package/build/schemas/action-log/transaction-info.schema.js +2 -1
- package/build/schemas/bank-payment/bank-payment.schema.js +2 -1
- package/build/schemas/client/client-debt.schema.js +8 -5
- package/build/schemas/client/client.schema.js +2 -1
- package/build/schemas/consignment/consignment.schema.js +10 -9
- package/build/schemas/consignment-transfer/accept-consignment-transfer.schema.js +3 -1
- package/build/schemas/consignment-transfer/consignment-transfer-request-item.schema.js +2 -1
- package/build/schemas/delivery-route/delivery-route.schema.js +2 -1
- package/build/schemas/discount-rules/discount-rules.schema.js +9 -2
- package/build/schemas/index.js +3 -0
- package/build/schemas/money-account/money-account-with-balance.schema.js +2 -2
- package/build/schemas/money.schema.js +27 -0
- package/build/schemas/non-negative-money.schema.js +17 -0
- package/build/schemas/order/order.schema.js +10 -9
- package/build/schemas/order-product/order-product-multiplicity-optiom.schema.js +2 -1
- package/build/schemas/order-product/order-product.schema.js +5 -4
- package/build/schemas/order-product/price-correction-analyze-item.schema.js +10 -8
- package/build/schemas/order-product/price-correction-execute-result-item.schema.js +3 -2
- package/build/schemas/order-service-line/order-service-line.schema.js +12 -5
- package/build/schemas/payment-invoice/payment-invoice.schema.js +5 -4
- package/build/schemas/positive-money.schema.js +18 -0
- package/build/schemas/pre-order/pre-order.schema.js +2 -1
- package/build/schemas/pre-order-collection-item/pre-order-collection-item-multiplicity-option.schema.js +2 -1
- package/build/schemas/pre-order-collection-item/pre-order-collection-item.schema.js +4 -3
- package/build/schemas/pre-order-product/pre-order-product.schema.js +5 -4
- package/build/schemas/product/product-multiplicity-option.schema.js +2 -1
- package/build/schemas/product/product.schema.js +6 -5
- package/build/schemas/report/client-by-weeks.schema.js +2 -1
- package/build/schemas/report/client-statement.schema.js +2 -1
- package/build/schemas/report/inventory-turnover-category-item.schema.js +1 -1
- package/build/schemas/report/inventory-turnover-detailed-item.schema.js +1 -1
- package/build/schemas/report/sales-by-client-row.schema.js +9 -8
- package/build/schemas/report/sales-by-client-top-item.schema.js +2 -1
- package/build/schemas/service/service.schema.js +8 -3
- package/build/schemas/settings/settings.schema.js +6 -2
- package/build/schemas/transaction/transaction.schema.js +2 -1
- package/commands/client/get-client-calculate.query.ts +6 -4
- package/commands/consignment/execute-consignment-product-update.command.ts +5 -4
- package/commands/integration/moysklad/execute-moysklad-import.command.ts +3 -2
- package/commands/integration/moysklad/preview-moysklad-products.query.ts +3 -2
- package/commands/integration/moysklad/scan-moysklad-import.query.ts +3 -2
- package/commands/order/create-order.command.ts +2 -1
- package/commands/order/update-order.command.ts +3 -2
- package/commands/order/webshop/get-order-sales-by-month.query.ts +3 -1
- package/commands/order-product/create-order-product.command.ts +2 -1
- package/commands/order-product/group/price-valuation-execute.command.ts +4 -1
- package/commands/order-product/update-order-product.command.ts +2 -1
- package/commands/payment-invoice/create-payment-invoice.command.ts +4 -1
- package/commands/payment-invoice/pay-payment-invoice.command.ts +4 -1
- package/commands/pre-order-collection-item/execute-pre-order-collection-item-update.command.ts +3 -2
- package/commands/pre-order-collection-item/multiplicity-option/create-pre-order-collection-item-multiplicity-option.command.ts +3 -1
- package/commands/pre-order-collection-item/multiplicity-option/update-pre-order-collection-item-multiplicity-option.command.ts +3 -1
- package/commands/product/create-product.command.ts +4 -3
- package/commands/product/group/update-group-product-prices.command.ts +3 -2
- package/commands/product/group/update-group-product-update-batch.command.ts +4 -3
- package/commands/product/multiplicity-option/create-product-multiplicity-option.command.ts +3 -1
- package/commands/product/multiplicity-option/update-product-multiplicity-option.command.ts +3 -1
- package/commands/product/update-product.command.ts +4 -3
- package/commands/report/get-cash-flow.query.ts +8 -5
- package/commands/report/get-daily-orders-summary.query.ts +2 -1
- package/commands/report/get-report-for-period.query.ts +10 -9
- package/commands/report/get-report-group-by-client.query.ts +11 -10
- package/commands/report/get-report-group-by-position.query.ts +15 -14
- package/commands/report/get-sales-summary.query.ts +13 -11
- package/commands/transaction/generate-check-transaction.command.ts +2 -1
- package/commands/transaction/generate-pre-payment-check.command.ts +2 -1
- package/commands/transaction/get-sum-transaction-by-money-account.query.ts +3 -1
- package/commands/transaction/get-transaction-summary.query.ts +5 -3
- package/commands/write-off/get-write-off-sum-by-order.query.ts +4 -1
- package/commands/write-off/update-write-off-price.command.ts +2 -1
- package/package.json +1 -1
- package/schemas/action-log/action-log-money.schema.ts +26 -0
- package/schemas/action-log/index.ts +1 -0
- package/schemas/action-log/order-info.schema.ts +3 -2
- package/schemas/action-log/order-product-info.schema.ts +2 -1
- package/schemas/action-log/order-product-update-action-log.schema.ts +2 -1
- package/schemas/action-log/pre-order-product-info.schema.ts +2 -1
- package/schemas/action-log/pre-order-product-update-action-log.schema.ts +2 -1
- package/schemas/action-log/transaction-info.schema.ts +2 -1
- package/schemas/bank-payment/bank-payment.schema.ts +2 -1
- package/schemas/client/client-debt.schema.ts +8 -5
- package/schemas/client/client.schema.ts +2 -1
- package/schemas/consignment/consignment.schema.ts +10 -9
- package/schemas/consignment-transfer/accept-consignment-transfer.schema.ts +4 -1
- package/schemas/consignment-transfer/consignment-transfer-request-item.schema.ts +2 -1
- package/schemas/delivery-route/delivery-route.schema.ts +2 -1
- package/schemas/discount-rules/discount-rules.schema.ts +9 -2
- package/schemas/index.ts +3 -0
- package/schemas/money-account/money-account-with-balance.schema.ts +2 -1
- package/schemas/money.schema.ts +25 -0
- package/schemas/non-negative-money.schema.ts +15 -0
- package/schemas/order/order.schema.ts +10 -9
- package/schemas/order-product/order-product-multiplicity-optiom.schema.ts +2 -1
- package/schemas/order-product/order-product.schema.ts +5 -4
- package/schemas/order-product/price-correction-analyze-item.schema.ts +10 -8
- package/schemas/order-product/price-correction-execute-result-item.schema.ts +3 -2
- package/schemas/order-service-line/order-service-line.schema.ts +13 -5
- package/schemas/payment-invoice/payment-invoice.schema.ts +5 -4
- package/schemas/positive-money.schema.ts +16 -0
- package/schemas/pre-order/pre-order.schema.ts +2 -1
- package/schemas/pre-order-collection-item/pre-order-collection-item-multiplicity-option.schema.ts +3 -1
- package/schemas/pre-order-collection-item/pre-order-collection-item.schema.ts +4 -3
- package/schemas/pre-order-product/pre-order-product.schema.ts +5 -4
- package/schemas/product/product-multiplicity-option.schema.ts +2 -1
- package/schemas/product/product.schema.ts +6 -5
- package/schemas/report/client-by-weeks.schema.ts +2 -1
- package/schemas/report/client-statement.schema.ts +2 -1
- package/schemas/report/inventory-turnover-category-item.schema.ts +1 -1
- package/schemas/report/inventory-turnover-detailed-item.schema.ts +1 -1
- package/schemas/report/sales-by-client-row.schema.ts +9 -8
- package/schemas/report/sales-by-client-top-item.schema.ts +2 -1
- package/schemas/service/service.schema.ts +9 -3
- package/schemas/settings/settings.schema.ts +7 -2
- package/schemas/transaction/transaction.schema.ts +2 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { ActionLogMoneySchema } from './action-log-money.schema';
|
|
2
3
|
|
|
3
4
|
export const OrderInfoSchema = z.object({
|
|
4
5
|
orderUUID: z.string(),
|
|
@@ -6,7 +7,7 @@ export const OrderInfoSchema = z.object({
|
|
|
6
7
|
clientUUID: z.string(),
|
|
7
8
|
clientName: z.string(),
|
|
8
9
|
createdAt: z.coerce.date(),
|
|
9
|
-
totalCost:
|
|
10
|
+
totalCost: ActionLogMoneySchema,
|
|
10
11
|
deliveryAddress: z.string().nullable().optional(),
|
|
11
|
-
deliveryCost:
|
|
12
|
+
deliveryCost: ActionLogMoneySchema.nullable().optional(),
|
|
12
13
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { ActionLogMoneySchema } from './action-log-money.schema';
|
|
2
3
|
|
|
3
4
|
export const OrderProductInfoSchema = z.object({
|
|
4
5
|
orderUUID: z.string(),
|
|
@@ -8,7 +9,7 @@ export const OrderProductInfoSchema = z.object({
|
|
|
8
9
|
categoryUUID: z.string().nullable(),
|
|
9
10
|
categoryName: z.string().nullable(),
|
|
10
11
|
quantity: z.coerce.number(),
|
|
11
|
-
price:
|
|
12
|
+
price: ActionLogMoneySchema,
|
|
12
13
|
consignmentUUID: z.string().nullable(),
|
|
13
14
|
consignmentDeliveryDate: z.coerce.date().nullable(),
|
|
14
15
|
});
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { OrderProductInfoSchema } from './order-product-info.schema';
|
|
3
|
+
import { ActionLogMoneySchema } from './action-log-money.schema';
|
|
3
4
|
|
|
4
5
|
export const OrderProductUpdateActionLogSchema = z.object({
|
|
5
6
|
orderProduct: OrderProductInfoSchema,
|
|
6
7
|
newQuantity: z.coerce.number(),
|
|
7
|
-
newPrice:
|
|
8
|
+
newPrice: ActionLogMoneySchema,
|
|
8
9
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { ActionLogMoneySchema } from './action-log-money.schema';
|
|
2
3
|
|
|
3
4
|
export const PreOrderProductInfoSchema = z.object({
|
|
4
5
|
preOrderUUID: z.string(),
|
|
@@ -6,6 +7,6 @@ export const PreOrderProductInfoSchema = z.object({
|
|
|
6
7
|
name: z.string(),
|
|
7
8
|
categoryName: z.string().nullable(),
|
|
8
9
|
quantity: z.coerce.number(),
|
|
9
|
-
price:
|
|
10
|
+
price: ActionLogMoneySchema,
|
|
10
11
|
comment: z.string().nullable(),
|
|
11
12
|
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { PreOrderProductInfoSchema } from './pre-order-product-info.schema';
|
|
3
|
+
import { ActionLogMoneySchema } from './action-log-money.schema';
|
|
3
4
|
|
|
4
5
|
export const PreOrderProductUpdateActionLogSchema = z.object({
|
|
5
6
|
preOrderProduct: PreOrderProductInfoSchema,
|
|
6
7
|
newQuantity: z.coerce.number(),
|
|
7
|
-
newPrice:
|
|
8
|
+
newPrice: ActionLogMoneySchema,
|
|
8
9
|
newComment: z.string().nullable(),
|
|
9
10
|
});
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { TransactionTypeEnum } from '../../enum';
|
|
3
|
+
import { ActionLogMoneySchema } from './action-log-money.schema';
|
|
3
4
|
|
|
4
5
|
export const TransactionInfoSchema = z.object({
|
|
5
6
|
transactionUUID: z.string(),
|
|
6
7
|
createdAt: z.coerce.date(),
|
|
7
|
-
amount:
|
|
8
|
+
amount: ActionLogMoneySchema,
|
|
8
9
|
moneyAccountName: z.string(),
|
|
9
10
|
type: z.nativeEnum(TransactionTypeEnum),
|
|
10
11
|
clientName: z.string().nullable(),
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { BankProviderEnum } from '../../enum/bank-provider.enum';
|
|
3
3
|
import { BankPaymentEventStatusEnum } from '../../enum/bank-payment-event-status.enum';
|
|
4
|
+
import { MoneySchema } from '../money.schema';
|
|
4
5
|
|
|
5
6
|
export const BankPaymentSchema = z.object({
|
|
6
7
|
uuid: z.uuid(),
|
|
7
8
|
provider: z.nativeEnum(BankProviderEnum),
|
|
8
9
|
externalEventId: z.string(),
|
|
9
10
|
accountNumber: z.string(),
|
|
10
|
-
amount:
|
|
11
|
+
amount: MoneySchema,
|
|
11
12
|
currency: z.string(),
|
|
12
13
|
purpose: z.string(),
|
|
13
14
|
status: z.nativeEnum(BankPaymentEventStatusEnum),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { MoneySchema } from '../money.schema';
|
|
2
3
|
|
|
3
4
|
export const ClientDebtItemSchema = z.object({
|
|
4
5
|
clientUUID: z.uuid(),
|
|
@@ -7,11 +8,13 @@ export const ClientDebtItemSchema = z.object({
|
|
|
7
8
|
group: z.string().nullable(),
|
|
8
9
|
city: z.string().nullable(),
|
|
9
10
|
responsibleUserName: z.string().nullable(),
|
|
10
|
-
currentBalance:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
currentBalance: MoneySchema,
|
|
12
|
+
// Знаковые величины: сальдо транзакций и остатки по заказам законно уходят в минус
|
|
13
|
+
// (переплата клиента, возврат), поэтому ограничения на знак здесь нет и быть не должно.
|
|
14
|
+
transactionNet: MoneySchema,
|
|
15
|
+
completedOrdersBalance: MoneySchema,
|
|
16
|
+
completedOrdersBalanceWithDelay: MoneySchema,
|
|
17
|
+
nonCompletedBalance: MoneySchema,
|
|
15
18
|
hasOverdueDebt: z.boolean().nullable(),
|
|
16
19
|
});
|
|
17
20
|
|
|
@@ -7,6 +7,7 @@ import { ClientIndividualProfileSchema } from './client-individual-profile.schem
|
|
|
7
7
|
import { ClientLegalProfileSchema } from './client-legal-profile.schema';
|
|
8
8
|
import { DiscountRulesSchema } from '../discount-rules/discount-rules.schema';
|
|
9
9
|
import { ClientMarkingSchema } from './client-marking.schema';
|
|
10
|
+
import { MoneySchema } from '../money.schema';
|
|
10
11
|
|
|
11
12
|
export const ClientSchema = z.object({
|
|
12
13
|
uuid: z.uuid(),
|
|
@@ -29,7 +30,7 @@ export const ClientSchema = z.object({
|
|
|
29
30
|
comment: z.string().nullable(),
|
|
30
31
|
paymentGraceDaysAfterCompletion: z.number().nullable(),
|
|
31
32
|
|
|
32
|
-
balance:
|
|
33
|
+
balance: MoneySchema,
|
|
33
34
|
|
|
34
35
|
deletedAt: z.date().nullable(),
|
|
35
36
|
createdAt: z.date(),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ConsignmentImportSchemaRelationEntityPropertyEnum, ConsignmentStatusEnum, ConsingmentImportErrorsEnum } from '../../enum';
|
|
3
3
|
import { ClientSchema } from '../client';
|
|
4
|
+
import { MoneySchema } from '../money.schema';
|
|
4
5
|
|
|
5
6
|
export const ConsignmentSchema = z.object({
|
|
6
7
|
uuid: z.uuid(),
|
|
@@ -20,25 +21,25 @@ export const ConsignmentSchema = z.object({
|
|
|
20
21
|
|
|
21
22
|
export const ConsignmentWithStatisticForListSchema = ConsignmentSchema.extend({
|
|
22
23
|
statistic: z.object({
|
|
23
|
-
totalCostPrice:
|
|
24
|
+
totalCostPrice: MoneySchema,
|
|
24
25
|
currentProductBalance: z.number(),
|
|
25
|
-
currentCostPrice:
|
|
26
|
+
currentCostPrice: MoneySchema,
|
|
26
27
|
totalProductQuantity: z.number(),
|
|
27
|
-
totalSellings:
|
|
28
|
-
totalApprovedWriteOffSellings:
|
|
28
|
+
totalSellings: MoneySchema,
|
|
29
|
+
totalApprovedWriteOffSellings: MoneySchema,
|
|
29
30
|
}),
|
|
30
31
|
});
|
|
31
32
|
|
|
32
33
|
export const ConsignmentWithStatisticSchema = ConsignmentSchema.extend({
|
|
33
34
|
statistic: z.object({
|
|
34
|
-
totalCostPrice:
|
|
35
|
+
totalCostPrice: MoneySchema,
|
|
35
36
|
currentProductBalance: z.number(),
|
|
36
|
-
currentCostPrice:
|
|
37
|
+
currentCostPrice: MoneySchema,
|
|
37
38
|
totalProductQuantity: z.number(),
|
|
38
|
-
totalSellings:
|
|
39
|
+
totalSellings: MoneySchema,
|
|
39
40
|
writeOffQuantity: z.number(),
|
|
40
|
-
writeOffCostPrice:
|
|
41
|
-
writeOffCostPriceByOrderProduct:
|
|
41
|
+
writeOffCostPrice: MoneySchema,
|
|
42
|
+
writeOffCostPriceByOrderProduct: MoneySchema,
|
|
42
43
|
}),
|
|
43
44
|
});
|
|
44
45
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ConsignmentTransferRequestSchema } from './consignment-transfer-request.schema';
|
|
3
|
+
import { MoneySchema } from '../money.schema';
|
|
4
|
+
import { NonNegativeMoneySchema } from '../non-negative-money.schema';
|
|
3
5
|
|
|
4
6
|
export const AcceptConsignmentTransferRequestSchema = z
|
|
5
7
|
.object({
|
|
@@ -17,7 +19,8 @@ export const AcceptConsignmentTransferRequestSchema = z
|
|
|
17
19
|
z.object({
|
|
18
20
|
itemUUID: z.uuid(),
|
|
19
21
|
categoryUUID: z.uuid(),
|
|
20
|
-
|
|
22
|
+
// Отрицательную цену отсекаем по знаку строки — минус и есть признак отрицательности.
|
|
23
|
+
price: NonNegativeMoneySchema.optional(),
|
|
21
24
|
}),
|
|
22
25
|
)
|
|
23
26
|
.min(1),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { MoneySchema } from '../money.schema';
|
|
2
3
|
|
|
3
4
|
export const ConsignmentTransferRequestItemSchema = z.object({
|
|
4
5
|
uuid: z.uuid(),
|
|
@@ -6,7 +7,7 @@ export const ConsignmentTransferRequestItemSchema = z.object({
|
|
|
6
7
|
targetProductUUID: z.uuid().nullable(),
|
|
7
8
|
name: z.string(),
|
|
8
9
|
quantity: z.number().int(),
|
|
9
|
-
transferPrice:
|
|
10
|
+
transferPrice: MoneySchema,
|
|
10
11
|
categoryName: z.string().nullable(),
|
|
11
12
|
multiplicity: z.number().int(),
|
|
12
13
|
grower: z.string().nullable(),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { DeliveryRouteStatusEnum, OrderDeliveryStatusEnum, OrderStatusEnum } from '../../enum';
|
|
3
|
+
import { MoneySchema } from '../money.schema';
|
|
3
4
|
|
|
4
5
|
export const DeliveryRouteSchema = z.object({
|
|
5
6
|
uuid: z.uuid(),
|
|
@@ -34,7 +35,7 @@ export const DeliveryRouteWithOrdersSchema = DeliveryRouteSchema.extend({
|
|
|
34
35
|
orderNumber: z.number(),
|
|
35
36
|
orderStatus: z.nativeEnum(OrderStatusEnum),
|
|
36
37
|
orderCreatedAt: z.coerce.date(),
|
|
37
|
-
totalCost:
|
|
38
|
+
totalCost: MoneySchema,
|
|
38
39
|
clientName: z.string(),
|
|
39
40
|
clientCity: z.string().nullable(),
|
|
40
41
|
clientAddress: z.string().nullable(),
|
|
@@ -2,10 +2,17 @@ import { z } from 'zod';
|
|
|
2
2
|
import { DiscountRulesTypeEnum, DiscountRulesApplyTypeEnum, DiscountRulesStatusEnum, DiscountRulesModeTypeEnum } from '../../enum';
|
|
3
3
|
import { ClientSchema } from '../client';
|
|
4
4
|
import { ProductSchema } from '../product/product.schema';
|
|
5
|
+
import { MoneySchema } from '../money.schema';
|
|
6
|
+
import { PositiveMoneySchema } from '../positive-money.schema';
|
|
5
7
|
|
|
8
|
+
// PERCENT — это процент, а не деньги: остаётся числом 0..100. FIXED — денежная величина, едет строкой.
|
|
6
9
|
export const discountRulesModeSchema = z.discriminatedUnion('typeDiscount', [
|
|
7
10
|
z.object({ typeDiscount: z.literal(DiscountRulesModeTypeEnum.PERCENT), discountValue: z.number().min(0).max(100) }),
|
|
8
|
-
z.object({
|
|
11
|
+
z.object({
|
|
12
|
+
typeDiscount: z.literal(DiscountRulesModeTypeEnum.FIXED),
|
|
13
|
+
// Строго положительная сумма: минус отсекаем по знаку строки, нули вида "0" / "0.00" — сравнением.
|
|
14
|
+
discountValue: PositiveMoneySchema,
|
|
15
|
+
}),
|
|
9
16
|
]);
|
|
10
17
|
|
|
11
18
|
// Rules schemas other data
|
|
@@ -113,7 +120,7 @@ export const DiscountRulesSplitQuantityResponseSchema = z.object({
|
|
|
113
120
|
productUUID: z.string(),
|
|
114
121
|
quantity: z.number(),
|
|
115
122
|
withDiscount: z.boolean(),
|
|
116
|
-
price:
|
|
123
|
+
price: MoneySchema,
|
|
117
124
|
})
|
|
118
125
|
.array()
|
|
119
126
|
.nullable(),
|
package/schemas/index.ts
CHANGED
|
@@ -77,4 +77,7 @@ export * from './account-deletion-request/account-deletion-request.schema';
|
|
|
77
77
|
export * from './consignment-transfer';
|
|
78
78
|
export * from './api-error.schema';
|
|
79
79
|
export * from './access-policy';
|
|
80
|
+
export * from './money.schema';
|
|
81
|
+
export * from './non-negative-money.schema';
|
|
82
|
+
export * from './positive-money.schema';
|
|
80
83
|
export * from './report/report-order-filter.schema';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { MoneyAccountSchema } from './money-account.schema';
|
|
3
|
+
import { MoneySchema } from '../money.schema';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Денежный счёт в ответах списков. `balance` — текущий остаток счёта (приход минус расход),
|
|
@@ -7,5 +8,5 @@ import { MoneyAccountSchema } from './money-account.schema';
|
|
|
7
8
|
* получают ровно прежнюю форму ответа.
|
|
8
9
|
*/
|
|
9
10
|
export const MoneyAccountWithBalanceSchema = MoneyAccountSchema.extend({
|
|
10
|
-
balance:
|
|
11
|
+
balance: MoneySchema.optional(),
|
|
11
12
|
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Единственное описание денежной величины в контрактах.
|
|
5
|
+
*
|
|
6
|
+
* Деньги пересекают границу строкой — точным десятичным представлением, а не float64.
|
|
7
|
+
* `"8755.48"` доезжает до получателя ровно таким, каким его отправили: ни JSON.parse, ни
|
|
8
|
+
* арифметика на `number` больше не участвуют в передаче, поэтому двоичный мусор вида
|
|
9
|
+
* `8755.479000000001` физически неоткуда взяться. Каждая сторона разбирает строку своей
|
|
10
|
+
* реализацией Decimal: сервер — Prisma.Decimal, клиент — своей библиотекой.
|
|
11
|
+
*
|
|
12
|
+
* В `libs/contracts` намеренно НЕТ зависимости от decimal-библиотеки: пакет публикуется как
|
|
13
|
+
* `@floristcloud/api-lib` и ставится в браузерные бандлы, где лишняя зависимость — это лишние
|
|
14
|
+
* килобайты и риск конфликта версий с той Decimal-реализацией, которую уже выбрал клиент.
|
|
15
|
+
* Контракт описывает формат провода, а не арифметику.
|
|
16
|
+
*
|
|
17
|
+
* Формат: необязательный минус, целая часть, до двух знаков после точки. Знак минуса —
|
|
18
|
+
* единственный признак отрицательной величины.
|
|
19
|
+
*
|
|
20
|
+
* Сама по себе схема знак не ограничивает: разницы, сальдо и балансы клиентов законно уходят
|
|
21
|
+
* в минус. Там, где величина не может быть отрицательной или нулевой, берите готовые
|
|
22
|
+
* `NonNegativeMoneySchema` и `PositiveMoneySchema` — не повторяйте `refine` по месту.
|
|
23
|
+
* Модификаторы `.optional()` и `.nullable()` работают напрямую.
|
|
24
|
+
*/
|
|
25
|
+
export const MoneySchema = z.string().regex(/^-?\d+(\.\d{1,2})?$/);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MoneySchema } from './money.schema';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Денежная величина, которая не может быть отрицательной: цена, стоимость доставки, сумма позиции.
|
|
5
|
+
*
|
|
6
|
+
* На строковом формате знак проверяется по первому символу — это единственный признак
|
|
7
|
+
* отрицательности в `MoneySchema` (`^-?\d+(\.\d{1,2})?$`), поэтому приводить величину к числу ради
|
|
8
|
+
* сравнения не нужно и не следует.
|
|
9
|
+
*
|
|
10
|
+
* Разницу с [[PositiveMoneySchema]] стоит держать в голове: здесь ноль допустим (бесплатная доставка,
|
|
11
|
+
* позиция с нулевой ценой), а там — нет.
|
|
12
|
+
*/
|
|
13
|
+
export const NonNegativeMoneySchema = MoneySchema.refine(value => !value.startsWith('-'), {
|
|
14
|
+
message: 'validation.money.nonNegative',
|
|
15
|
+
});
|
|
@@ -4,6 +4,7 @@ import { ClientSchema } from '../client';
|
|
|
4
4
|
import { BranchSchema } from '../branch/branch.schema';
|
|
5
5
|
import { OrderDeliverySchema } from '../order-delivery/order-delivery.schema';
|
|
6
6
|
import { DeliveryRouteSchema } from '../delivery-route/delivery-route.schema';
|
|
7
|
+
import { MoneySchema } from '../money.schema';
|
|
7
8
|
|
|
8
9
|
export const OrderSchema = z.object({
|
|
9
10
|
uuid: z.uuid(),
|
|
@@ -12,14 +13,14 @@ export const OrderSchema = z.object({
|
|
|
12
13
|
branchUUID: z.uuid().nullable(),
|
|
13
14
|
creatorUserUUID: z.uuid(),
|
|
14
15
|
|
|
15
|
-
totalCost:
|
|
16
|
-
subtotal:
|
|
17
|
-
deliveryCost:
|
|
18
|
-
deliveryCheckAmount:
|
|
19
|
-
deliveryVatAmount:
|
|
16
|
+
totalCost: MoneySchema,
|
|
17
|
+
subtotal: MoneySchema,
|
|
18
|
+
deliveryCost: MoneySchema,
|
|
19
|
+
deliveryCheckAmount: MoneySchema,
|
|
20
|
+
deliveryVatAmount: MoneySchema,
|
|
20
21
|
deliveryVat: z.number().nullable(),
|
|
21
|
-
vatAmount:
|
|
22
|
-
discountAmount:
|
|
22
|
+
vatAmount: MoneySchema,
|
|
23
|
+
discountAmount: MoneySchema,
|
|
23
24
|
discount: z.number().nullable(),
|
|
24
25
|
|
|
25
26
|
status: z.nativeEnum(OrderStatusEnum),
|
|
@@ -68,9 +69,9 @@ export const OrderExtendedForClientSchema = OrderForClientSchema.extend({
|
|
|
68
69
|
client: ClientSchema,
|
|
69
70
|
branch: BranchSchema.nullable(),
|
|
70
71
|
delivery: OrderDeliverySchema.nullable(),
|
|
71
|
-
writeOffSum:
|
|
72
|
+
writeOffSum: MoneySchema.nullable(),
|
|
72
73
|
consignmentDeliveryDates: z.union([z.date(), z.literal('in-stock')]).array(),
|
|
73
74
|
// Server-computed delivery cost for the current subtotal when the tier rule is on (null when off).
|
|
74
75
|
// Convenience preview for the cart page; the storefront still recomputes locally on the delivery/pickup toggle.
|
|
75
|
-
deliveryCostPreview:
|
|
76
|
+
deliveryCostPreview: MoneySchema.nullable(),
|
|
76
77
|
});
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { MoneySchema } from '../money.schema';
|
|
2
3
|
|
|
3
4
|
export const OrderProductMultiplicityOptionSchema = z.object({
|
|
4
5
|
uuid: z.uuid(),
|
|
5
6
|
title: z.string().nullable(),
|
|
6
7
|
optionMultiplicity: z.coerce.number(),
|
|
7
|
-
optionPrice:
|
|
8
|
+
optionPrice: MoneySchema.nullable(),
|
|
8
9
|
});
|
|
@@ -5,6 +5,7 @@ import { ClientSchema } from '../client';
|
|
|
5
5
|
import { BranchSchema } from '../branch/branch.schema';
|
|
6
6
|
import { DistributionSchema } from '../distribution/distribution.schema';
|
|
7
7
|
import { OrderProductMultiplicityOptionSchema } from './order-product-multiplicity-optiom.schema';
|
|
8
|
+
import { MoneySchema } from '../money.schema';
|
|
8
9
|
|
|
9
10
|
export const OrderProductSchema = z.object({
|
|
10
11
|
uuid: z.uuid(),
|
|
@@ -13,11 +14,11 @@ export const OrderProductSchema = z.object({
|
|
|
13
14
|
multiplicityOptionUUID: z.uuid().nullable().optional(),
|
|
14
15
|
|
|
15
16
|
quantity: z.number(),
|
|
16
|
-
price:
|
|
17
|
-
amount:
|
|
18
|
-
vatAmount:
|
|
17
|
+
price: MoneySchema,
|
|
18
|
+
amount: MoneySchema,
|
|
19
|
+
vatAmount: MoneySchema,
|
|
19
20
|
vat: z.number().nullable(),
|
|
20
|
-
checkAmount:
|
|
21
|
+
checkAmount: MoneySchema,
|
|
21
22
|
|
|
22
23
|
comment: z.string().nullable(),
|
|
23
24
|
tag: z.string().nullable(),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { OrderStatusEnum } from '../../enum';
|
|
3
3
|
import { ErrorMessageSchema } from '../error-message.schema';
|
|
4
|
+
import { MoneySchema } from '../money.schema';
|
|
4
5
|
|
|
5
6
|
export const PriceCorrectionAnalyzeItemSchema = z.object({
|
|
6
7
|
orderProductUUID: z.string(),
|
|
@@ -20,17 +21,18 @@ export const PriceCorrectionAnalyzeItemSchema = z.object({
|
|
|
20
21
|
article: z.string().nullable(),
|
|
21
22
|
color: z.string().nullable(),
|
|
22
23
|
|
|
23
|
-
currentPrice:
|
|
24
|
-
currentAmount:
|
|
24
|
+
currentPrice: MoneySchema,
|
|
25
|
+
currentAmount: MoneySchema,
|
|
25
26
|
quantity: z.number(),
|
|
26
27
|
|
|
27
|
-
newPriceWithoutDiscount:
|
|
28
|
-
newPriceWithDiscount:
|
|
29
|
-
newAmountWithoutDiscount:
|
|
30
|
-
newAmountWithDiscount:
|
|
28
|
+
newPriceWithoutDiscount: MoneySchema,
|
|
29
|
+
newPriceWithDiscount: MoneySchema,
|
|
30
|
+
newAmountWithoutDiscount: MoneySchema,
|
|
31
|
+
newAmountWithDiscount: MoneySchema,
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
// Разницы могут быть отрицательными — цена корректируется в обе стороны, поэтому без ограничения знака.
|
|
34
|
+
priceDifferenceWithoutDiscount: MoneySchema,
|
|
35
|
+
priceDifferenceWithDiscount: MoneySchema,
|
|
34
36
|
|
|
35
37
|
isSkipped: z.boolean(),
|
|
36
38
|
skipReason: ErrorMessageSchema.optional(),
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ErrorMessageSchema } from '../error-message.schema';
|
|
3
|
+
import { MoneySchema } from '../money.schema';
|
|
3
4
|
|
|
4
5
|
export const PriceCorrectionExecuteResultItemSchema = z.object({
|
|
5
6
|
orderProductUUID: z.string(),
|
|
6
7
|
orderUUID: z.string(),
|
|
7
8
|
isSuccess: z.boolean(),
|
|
8
9
|
error: ErrorMessageSchema.optional(),
|
|
9
|
-
oldPrice:
|
|
10
|
-
newPrice:
|
|
10
|
+
oldPrice: MoneySchema.optional(),
|
|
11
|
+
newPrice: MoneySchema.optional(),
|
|
11
12
|
});
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { ServicePricingUnitEnum } from '../../enum/service-pricing-unit.enum';
|
|
3
|
+
import { MoneySchema } from '../money.schema';
|
|
4
|
+
import { NonNegativeMoneySchema } from '../non-negative-money.schema';
|
|
5
|
+
|
|
6
|
+
// Цена строки услуги: неотрицательная и не больше миллиарда. Знак берём из самой строки,
|
|
7
|
+
// потолок — из разобранного значения: до 1e9 с двумя знаками число представимо точно.
|
|
8
|
+
const OrderServiceLinePriceSchema = NonNegativeMoneySchema.refine(value => Number(value) <= 1_000_000_000, {
|
|
9
|
+
message: 'validation.money.max',
|
|
10
|
+
});
|
|
3
11
|
|
|
4
12
|
export const OrderServiceLineSchema = z.object({
|
|
5
13
|
uuid: z.uuid(),
|
|
6
14
|
orderUUID: z.uuid(),
|
|
7
15
|
serviceUUID: z.uuid().nullable(),
|
|
8
16
|
name: z.string(),
|
|
9
|
-
price:
|
|
17
|
+
price: MoneySchema,
|
|
10
18
|
quantity: z.number(),
|
|
11
|
-
amount:
|
|
19
|
+
amount: MoneySchema,
|
|
12
20
|
vat: z.number().nullable(),
|
|
13
|
-
vatAmount:
|
|
21
|
+
vatAmount: MoneySchema,
|
|
14
22
|
unit: z.nativeEnum(ServicePricingUnitEnum),
|
|
15
23
|
comment: z.string().nullable(),
|
|
16
24
|
createdAt: z.date(),
|
|
@@ -22,7 +30,7 @@ export const CreateOrderServiceLineRequestSchema = z
|
|
|
22
30
|
orderUUID: z.uuid(),
|
|
23
31
|
serviceUUID: z.uuid().optional(),
|
|
24
32
|
name: z.string().min(1).max(255).optional(),
|
|
25
|
-
price:
|
|
33
|
+
price: OrderServiceLinePriceSchema.optional(),
|
|
26
34
|
quantity: z.number().int().min(1).max(1_000_000).optional().default(1),
|
|
27
35
|
vat: z.number().int().min(0).max(100).optional(),
|
|
28
36
|
comment: z.string().max(1000).optional(),
|
|
@@ -32,7 +40,7 @@ export const CreateOrderServiceLineRequestSchema = z
|
|
|
32
40
|
});
|
|
33
41
|
|
|
34
42
|
export const UpdateOrderServiceLineRequestSchema = z.object({
|
|
35
|
-
price:
|
|
43
|
+
price: OrderServiceLinePriceSchema.optional(),
|
|
36
44
|
quantity: z.number().int().min(1).max(1_000_000).optional(),
|
|
37
45
|
comment: z.string().max(1000).nullable().optional(),
|
|
38
46
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { PaymentInvoiceStatusEnum } from '../../enum/payment-invoice-status.enum';
|
|
3
|
+
import { MoneySchema } from '../money.schema';
|
|
3
4
|
|
|
4
5
|
// Строка счёта. Для счёта, собранного из заказов, каждая строка — снимок заказа на момент
|
|
5
6
|
// выставления: заказ потом может измениться, а выставленный счёт обязан остаться прежним.
|
|
@@ -8,16 +9,16 @@ const PaymentInvoiceItemSchema = z.object({
|
|
|
8
9
|
orderId: z.number().nullable(),
|
|
9
10
|
orderDate: z.coerce.date().nullable(),
|
|
10
11
|
description: z.string(),
|
|
11
|
-
amount:
|
|
12
|
+
amount: MoneySchema,
|
|
12
13
|
});
|
|
13
14
|
|
|
14
15
|
export const PaymentInvoiceSchema = z.object({
|
|
15
16
|
uuid: z.string(),
|
|
16
17
|
number: z.string(),
|
|
17
18
|
invoiceDate: z.coerce.date(),
|
|
18
|
-
amount:
|
|
19
|
-
paidAmount:
|
|
20
|
-
remainingAmount:
|
|
19
|
+
amount: MoneySchema,
|
|
20
|
+
paidAmount: MoneySchema,
|
|
21
|
+
remainingAmount: MoneySchema,
|
|
21
22
|
status: z.nativeEnum(PaymentInvoiceStatusEnum),
|
|
22
23
|
clientUUID: z.string(),
|
|
23
24
|
clientName: z.string(),
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MoneySchema } from './money.schema';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Денежная величина строго больше нуля: сумма платежа, фиксированная скидка.
|
|
5
|
+
*
|
|
6
|
+
* Отличается от `NonNegativeMoneySchema` тем, что отвергает ноль — платёж на 0 рублей или скидка
|
|
7
|
+
* в 0 рублей это не операция, а ошибка ввода.
|
|
8
|
+
*
|
|
9
|
+
* Обе проверки строковые: знак берётся по первому символу, а ноль опознаётся по форме записи —
|
|
10
|
+
* `MoneySchema` уже гарантировал формат `^-?\d+(\.\d{1,2})?$`, поэтому нулю соответствуют ровно
|
|
11
|
+
* `0`, `0.0` и `0.00`. Через `Number()` это не проверяется намеренно: приводить деньги к float
|
|
12
|
+
* ради сравнения — то, от чего ушли.
|
|
13
|
+
*/
|
|
14
|
+
export const PositiveMoneySchema = MoneySchema.refine(value => !value.startsWith('-') && !/^0+(\.0*)?$/.test(value), {
|
|
15
|
+
message: 'validation.money.positive',
|
|
16
|
+
});
|
|
@@ -3,6 +3,7 @@ import { PreOrderStatusEnum } from '../../enum';
|
|
|
3
3
|
import { ClientSchema } from '../client';
|
|
4
4
|
import { BranchSchema } from '../branch/branch.schema';
|
|
5
5
|
import { PreOrderCollectionSchema } from '../pre-order-collection/pre-order-collection.schema';
|
|
6
|
+
import { MoneySchema } from '../money.schema';
|
|
6
7
|
|
|
7
8
|
export const PreOrderSchema = z.object({
|
|
8
9
|
uuid: z.string(),
|
|
@@ -21,7 +22,7 @@ export const PreOrderExtendedSchema = PreOrderSchema.extend({
|
|
|
21
22
|
preOrderCollection: PreOrderCollectionSchema.nullable(),
|
|
22
23
|
totalPositions: z.number(),
|
|
23
24
|
totalQuantity: z.number(),
|
|
24
|
-
totalPrice:
|
|
25
|
+
totalPrice: MoneySchema,
|
|
25
26
|
});
|
|
26
27
|
|
|
27
28
|
export const PreOrderWithClientSchema = PreOrderSchema.extend({
|
package/schemas/pre-order-collection-item/pre-order-collection-item-multiplicity-option.schema.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { MoneySchema } from '../money.schema';
|
|
3
|
+
import { NonNegativeMoneySchema } from '../non-negative-money.schema';
|
|
2
4
|
|
|
3
5
|
export const PreOrderCollectionItemMultiplicityOptionSchema = z.object({
|
|
4
6
|
uuid: z.string(),
|
|
5
7
|
title: z.string().max(100).nullable(),
|
|
6
8
|
optionMultiplicity: z.number().int().min(1),
|
|
7
|
-
optionPrice:
|
|
9
|
+
optionPrice: NonNegativeMoneySchema.nullable(),
|
|
8
10
|
rank: z.number().int().min(0),
|
|
9
11
|
});
|
|
@@ -6,6 +6,7 @@ import { ClientSchema } from '../client';
|
|
|
6
6
|
import { PreOrderProductSchema } from '../pre-order-product/pre-order-product.schema';
|
|
7
7
|
import { SalesUnitEnum } from '../../enum';
|
|
8
8
|
import { PreOrderCollectionItemMultiplicityOptionSchema } from './pre-order-collection-item-multiplicity-option.schema';
|
|
9
|
+
import { MoneySchema } from '../money.schema';
|
|
9
10
|
|
|
10
11
|
export const PreOrderCollectionItemSchema = z.object({
|
|
11
12
|
uuid: z.string(),
|
|
@@ -18,7 +19,7 @@ export const PreOrderCollectionItemSchema = z.object({
|
|
|
18
19
|
quantity: z.number().nullable(),
|
|
19
20
|
balance: z.number().nullable(),
|
|
20
21
|
imageUUID: z.string().nullable(),
|
|
21
|
-
price:
|
|
22
|
+
price: MoneySchema,
|
|
22
23
|
advancedPrice: z.string().nullable(),
|
|
23
24
|
grower: z.string().nullable(),
|
|
24
25
|
size: z.string().nullable(),
|
|
@@ -47,7 +48,7 @@ export const CreatePreOrderCollectionItemSchema = z.object({
|
|
|
47
48
|
quantity: z.coerce.number().nullable().optional(),
|
|
48
49
|
balance: z.coerce.number().nullable().optional(),
|
|
49
50
|
imageUUID: z.string().nullable().optional(),
|
|
50
|
-
price:
|
|
51
|
+
price: MoneySchema,
|
|
51
52
|
advancedPrice: z.string().nullable().optional(),
|
|
52
53
|
grower: z.string().nullable().optional(),
|
|
53
54
|
size: z.string().nullable().optional(),
|
|
@@ -76,7 +77,7 @@ export const UpdatePreOrderCollectionItemSchema = z
|
|
|
76
77
|
quantity: z.coerce.number().nullable(),
|
|
77
78
|
balance: z.coerce.number().nullable(),
|
|
78
79
|
imageUUID: z.string().nullable(),
|
|
79
|
-
price:
|
|
80
|
+
price: MoneySchema,
|
|
80
81
|
advancedPrice: z.string().nullable(),
|
|
81
82
|
grower: z.string().nullable(),
|
|
82
83
|
size: z.string().nullable(),
|