prisma: profile tables with init migration
This commit is contained in:
1 parent
fadb237229
commit
c22d484c11
3 files changed
+131
No files matched your search
@@ -11,3 +11,56 @@ generator client {
|
||||
datasource db {
|
||||
provider = "postgresql"
|
||||
}
|
||||
|
||||
model Profile {
|
||||
id Int @id @default(autoincrement())
|
||||
firstName String
|
||||
lastName String
|
||||
description String
|
||||
skills Skill[]
|
||||
links Link[]
|
||||
experiences Experience[]
|
||||
projects Project[]
|
||||
}
|
||||
|
||||
model Skill {
|
||||
id Int @id @default(autoincrement())
|
||||
name String
|
||||
profileId Int
|
||||
profile Profile @relation(fields: [profileId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([profileId])
|
||||
}
|
||||
|
||||
model Link {
|
||||
id Int @id @default(autoincrement())
|
||||
name String
|
||||
link String
|
||||
profileId Int
|
||||
profile Profile @relation(fields: [profileId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([profileId])
|
||||
}
|
||||
|
||||
model Project {
|
||||
id Int @id @default(autoincrement())
|
||||
name String
|
||||
link String
|
||||
description String
|
||||
profileId Int
|
||||
profile Profile @relation(fields: [profileId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([profileId])
|
||||
}
|
||||
|
||||
model Experience {
|
||||
id Int @id @default(autoincrement())
|
||||
company String
|
||||
position String
|
||||
period String
|
||||
achievements String[] @default([])
|
||||
profileId Int
|
||||
profile Profile @relation(fields: [profileId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([profileId])
|
||||
}
|
||||
Reference in new issue
Block a user