how to extend a model

So basically i have a few models but the model is been reused but i want to manipulate it to add some more values
1 Reply
Lopen
LopenOP3y ago
Code example
model Product {
id string @id @default(cuid())
name String
category Categories
}

model Categories {
id string @id @default(cuid())
name String
}

model SavedProduct{
id string @id @default(cuid())
product Product[]
}
model Product {
id string @id @default(cuid())
name String
category Categories
}

model Categories {
id string @id @default(cuid())
name String
}

model SavedProduct{
id string @id @default(cuid())
product Product[]
}
I want to be able to expand the
product [
{
Id: 1233
name: best bags
category:{}
quality: 67 //new added data
Bid: $68 //new added data
},
{},
...
]
product [
{
Id: 1233
name: best bags
category:{}
quality: 67 //new added data
Bid: $68 //new added data
},
{},
...
]
Want results from more Discord servers?
Add your server