model User {
id Int @default(autoincrement()) @id
posts Post[] @relation(name: "rel")
}
model Post {
id Int @default(autoincrement()) @id
author1 User? @relation(name: "rel", fields: [author1Id], references: [id])
author1Id Int?
author2 User? @relation(name: "rel", fields: [author2Id], references: [id])
author2Id Int?
}
model User {
id Int @default(autoincrement()) @id
posts Post[] @relation(name: "rel")
}
model Post {
id Int @default(autoincrement()) @id
author1 User? @relation(name: "rel", fields: [author1Id], references: [id])
author1Id Int?
author2 User? @relation(name: "rel", fields: [author2Id], references: [id])
author2Id Int?
}