Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to create types that include table relations #24

Open
BoilerTom90 opened this issue May 31, 2024 · 0 comments
Open

Add option to create types that include table relations #24

BoilerTom90 opened this issue May 31, 2024 · 0 comments

Comments

@BoilerTom90
Copy link

A nice option to this tool would be the ability to have types or interfaces generated that reflect relationships between tables.
For example, if I have a table of School, and each school can have zero or more Coaches, it would be great if the type generated for the Schools could reflect that relationship as follows:

export type Coach {
// all the fields for a coach
}
export type SchoolWithRelations {
// other fields for a School
coaches: Coach[]
}

I'm not sure if this is even possible, or how difficult it would be... but, thought I'd throw it out there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant