Disambiguating relations
Hi guys, started using drizzle and love it but ran into an issue when moving from Prisma to drizzle with relations.
I have two tables, Users and Classes. The user table has the fields id, name, username, email and role enum which is either student or teacher. The class table has the fields id and name. For the relations I want the class to have many students and many teachers and for the user they can be a teacher of many classes but only a student to one class. How can I create the tables and relations to reflect this? Any help would be appreciated
I have two tables, Users and Classes. The user table has the fields id, name, username, email and role enum which is either student or teacher. The class table has the fields id and name. For the relations I want the class to have many students and many teachers and for the user they can be a teacher of many classes but only a student to one class. How can I create the tables and relations to reflect this? Any help would be appreciated