However, typescript complains about the trimorders field:
Type '{ id: number; ticker: string; price: number; dir: string; shares: number; userid: number; }[]' is not assignable to type 'TrimOrdersUncheckedCreateNestedManyWithoutLimitInput | TrimOrdersCreateNestedManyWithoutLimitInput | undefined'.
Type '{ id: number; ticker: string; price: number; dir: string; shares: number; userid: number; }[]' is not assignable to type 'TrimOrdersUncheckedCreateNestedManyWithoutLimitInput | TrimOrdersCreateNestedManyWithoutLimitInput | undefined'.
These are the schemas:
model limits { ticker String price Float stoploss Float? takeprofit Float? id Int @id @default(autoincrement()) userid Int amount Int style String dir String type String trimorders TrimOrders[]}model TrimOrders { id Int @id @default(autoincrement()) ticker String price Float dir String shares Int userid Int user users @relation(fields: [userid], references: [id]) limit limits? @relation(fields: [id], references: [id])}
model limits { ticker String price Float stoploss Float? takeprofit Float? id Int @id @default(autoincrement()) userid Int amount Int style String dir String type String trimorders TrimOrders[]}model TrimOrders { id Int @id @default(autoincrement()) ticker String price Float dir String shares Int userid Int user users @relation(fields: [userid], references: [id]) limit limits? @relation(fields: [id], references: [id])}