Created
July 9, 2022 15:43
-
-
Save dsibinski/64cb91fade703c4bbf6ade4c6ad84d19 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { z } from "zod"; | |
import { AddressViewModelSchema } from "./addressViewModel"; | |
export const UserViewModelSchema = z.object({ | |
id: z.string().uuid(), | |
name: z.string(), | |
lastName: z.string(), | |
login: z.string(), | |
isActive: z.boolean(), | |
loyaltyPoints: z.number(), | |
address: AddressViewModelSchema.nullable(), | |
}); | |
export type UserViewModel = z.infer<typeof UserViewModelSchema>; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment