Does my prisma schema make sense?

I’m attempting to create an instagram clone where I can follow people, post images, comment on those posts etc. Here is my schema.

model User {
  id       Int       @id @default(autoincrement())
  username String    @unique
  email    String    @unique
  password String
  profile  Profile
  posts    Post[]
  comments Comment[]
}

model Post {
  id       Int       @id @default(autoincrement())
  user     User      @relation(fields: [userId], references: [id])
  userId   Int
  imageUrl String
  comments Comment[]
}

model Comment {
  id     Int    @id @default(autoincrement())
  user   User   @relation(fields: [userId], references: [id])
  userId Int
  post   Post   @relation(fields: [postId], references: [id])
  postId Int
  text   String
}

model Profile {
  id                 Int     @id @default(autoincrement())
  user               User    @relation(fields: [userId], references: [id])
  userId             Int
  firstName          String
  lastName           String
  website            String
  bio                String
  privateAccount     Boolean @default(false)
  showActivityStatus Boolean @default(true)
}

That all looks good to me. Can a user have multiple Profiles? If not, it seems like you could simply add those fields onto User and reduce the complexity.

1 Like

Okay I’ll do that .I just want a user to have one profile. Thanks.