Introduction
What is mysql-to-zod?
mysql-to-zod is a tool that generates Zod type definitions from MySQL table definitions.
Usage
The above command will generate a type definition of zod in . /mysqlToZod/schema.ts
will generate a type definition for zod.
Example
Suppose DB: my_todo has the following table definitions.
From the above table definition, the following zod schema is generated.
These are the basic instructions for use.
In many cases the above is all that is needed, but there are options that can be customized.
For example, if you want the variable name to be TODO_SCHEMA
instead of todoSchema
.
For more detailed options, please see the next page.
Notice
If you have any questions about usage or suggestions for improvement, please visit disucussions. Disucussions