Skip to content

Commit

Permalink
add: UserPersonal table
Browse files Browse the repository at this point in the history
  • Loading branch information
Celesca committed Nov 24, 2024
1 parent e37cc1f commit bcf0c47
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ model User {
UserTeams UserTeam[] // Relation to UserTeam (many-to-many with Teams)
RatingsGiven UserRating[] @relation("RatingsGiven") // Ratings this user has given
RatingsReceived UserRating[] @relation("RatingsReceived") // Ratings this user has received
UserPersonal UserPersonal[] // Relation to UserPersonal
}

model UserRating {
Expand Down Expand Up @@ -123,3 +124,20 @@ model UserTeam {
Role String // Role of the user in the team (e.g., Member, Leader)
JoinedAt DateTime @default(now())
}

model Personal {
PersonalID Int @id @default(autoincrement())
Personal_type String // Type of personal information (e.g., Address, Phone Number)
Personal_type_detail String // Specific details of the personal information
UserPersonal UserPersonal[] // Relation to UserPersonal
}

model UserPersonal {
UserPersonalID Int @id @default(autoincrement()) // Primary Key
User User @relation(fields: [UserID], references: [UserID])
UserID String
Personal Personal @relation(fields: [PersonalID], references: [PersonalID])
PersonalID Int
CreatedAt DateTime @default(now())
UpdatedAt DateTime @default(now()) @updatedAt
}

0 comments on commit bcf0c47

Please sign in to comment.