Changeset 299af01 for src/schemas


Ignore:
Timestamp:
02/26/25 14:27:26 (6 weeks ago)
Author:
Naum Shapkarovski <naumshapkarovski@…>
Branches:
main
Children:
3c5302a
Parents:
057453c
Message:

chore

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/schemas/customer.ts

    r057453c r299af01  
    3232export const customerSchema = z.object({
    3333  id: z.string().optional(),
     34  tenantId: z.string(),
    3435  name: z.string(),
    3536  email: z.string(),
     
    4546export const tenantSchema = customerSchema
    4647  .omit({
    47     companyId: true,
     48    tenantId: true,
    4849    status: true,
    4950  })
     
    5354
    5455export const newCustomerSchema = z.object({
     56  tenantId: z.string().optional(),
    5557  name: z.string(),
    5658  email: z.string(),
     
    6365  status: customerStatusSchema,
    6466});
     67
     68export const updateCustomerSchema = newCustomerSchema.omit({
     69  tenantId: true,
     70  status: true,
     71});
Note: See TracChangeset for help on using the changeset viewer.