Files
it-smi/prisma/schema.prisma
T
arswarog c22d484c11
CI / Сборка (push) Successful in 24s
Стенд master
CI / Деплой на стейджинг (push) Successful in 6s
CI / Проверка кода (push) Successful in 17s
prisma: profile tables with init migration
2026-11-16 17:30:51 +03:00

67 lines
1.5 KiB
Plaintext

// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
// Get a free hosted Postgres database in seconds: `npx create-db`
generator client {
provider = "prisma-client"
output = "../generated/prisma"
}
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])
}