@nyig/models 0.2.34 → 0.2.35

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.
Files changed (3) hide show
  1. package/index.js +7 -7
  2. package/index.mjs +7 -7
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -241,13 +241,13 @@ var zInvoice = addAutoProps(zBInvoice);
241
241
  // src/interface/payment/teacherPayment.ts
242
242
  var import_zod8 = require("zod");
243
243
  var zTeacherPaymentRow = import_zod8.z.object({
244
- course: import_zod8.z.string(),
245
- length: import_zod8.z.number(),
246
- count: import_zod8.z.number(),
247
- wage: import_zod8.z.number()
244
+ course: import_zod8.z.string().min(1, "select or enter a course"),
245
+ length: import_zod8.z.coerce.number().gt(0, "must be > 0"),
246
+ count: import_zod8.z.coerce.number().int().gt(0, "must be > 0"),
247
+ wage: import_zod8.z.coerce.number().gt(0, "wage must be > 0")
248
248
  });
249
249
  var zBTeacherPayment = import_zod8.z.object({
250
- teacher: import_zod8.z.string(),
250
+ teacher: import_zod8.z.string().min(1, "select or enter a teacher"),
251
251
  rows: import_zod8.z.array(zTeacherPaymentRow),
252
252
  paid: import_zod8.z.boolean().optional()
253
253
  });
@@ -332,11 +332,11 @@ var zBCourse = import_zod11.z.object({
332
332
  /**
333
333
  * Camp tuition for half-day option
334
334
  */
335
- halfCampTuition: import_zod11.z.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional(),
335
+ halfCampTuition: import_zod11.z.coerce.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional(),
336
336
  /**
337
337
  * Camp tuition for full-day option
338
338
  */
339
- fullCampTuition: import_zod11.z.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional()
339
+ fullCampTuition: import_zod11.z.coerce.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional()
340
340
  });
341
341
  var zCourse = addAutoProps(zBCourse);
342
342
 
package/index.mjs CHANGED
@@ -154,13 +154,13 @@ var zInvoice = addAutoProps(zBInvoice);
154
154
  // src/interface/payment/teacherPayment.ts
155
155
  import { z as z8 } from "zod";
156
156
  var zTeacherPaymentRow = z8.object({
157
- course: z8.string(),
158
- length: z8.number(),
159
- count: z8.number(),
160
- wage: z8.number()
157
+ course: z8.string().min(1, "select or enter a course"),
158
+ length: z8.coerce.number().gt(0, "must be > 0"),
159
+ count: z8.coerce.number().int().gt(0, "must be > 0"),
160
+ wage: z8.coerce.number().gt(0, "wage must be > 0")
161
161
  });
162
162
  var zBTeacherPayment = z8.object({
163
- teacher: z8.string(),
163
+ teacher: z8.string().min(1, "select or enter a teacher"),
164
164
  rows: z8.array(zTeacherPaymentRow),
165
165
  paid: z8.boolean().optional()
166
166
  });
@@ -245,11 +245,11 @@ var zBCourse = z11.object({
245
245
  /**
246
246
  * Camp tuition for half-day option
247
247
  */
248
- halfCampTuition: z11.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional(),
248
+ halfCampTuition: z11.coerce.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional(),
249
249
  /**
250
250
  * Camp tuition for full-day option
251
251
  */
252
- fullCampTuition: z11.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional()
252
+ fullCampTuition: z11.coerce.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional()
253
253
  });
254
254
  var zCourse = addAutoProps(zBCourse);
255
255
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nyig/models",
3
- "version": "0.2.34",
3
+ "version": "0.2.35",
4
4
  "license": "MIT",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",