badis
badis
PPrisma
Created by badis on 5/21/2024 in #help-and-questions
can i pass a model to a type, the same way i pass a type to a model in prisma schema ?
yes and because its a one to one relationship , i would prefere to use type instead of creating some models
14 replies
PPrisma
Created by badis on 5/21/2024 in #help-and-questions
can i pass a model to a type, the same way i pass a type to a model in prisma schema ?
is this clear ?
14 replies
PPrisma
Created by badis on 5/21/2024 in #help-and-questions
can i pass a model to a type, the same way i pass a type to a model in prisma schema ?
in the screenshot you can see sectoinCarousel as a model and productsSection as a type , i'm trying to turn them all to types and feed them to Section as optional , so that the Section can be CarouselSection or ProductSection
14 replies
PPrisma
Created by badis on 5/21/2024 in #help-and-questions
can i pass a model to a type, the same way i pass a type to a model in prisma schema ?
productSection will be added to section , so that i can say section can be sectionA or sectionB ... i started working this out using models as you see the relation between section and sectionCarousel , but i want to change the different sections A B C to types because the relation is one to one anyway so i don't need a model
14 replies
PPrisma
Created by badis on 5/21/2024 in #help-and-questions
can i pass a model to a type, the same way i pass a type to a model in prisma schema ?
here is the portion where i'm struggling , the Product is a model while the productSection is a type
14 replies