Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- generator client {
- provider = "prisma-client-js"
- }
- datasource db {
- provider = "mysql"
- url = env("DATABASE_URL")
- }
- model area {
- id Int @id @default(autoincrement())
- name String
- external_id Int @unique
- learning_map_area learning_map_area[]
- }
- model learning_map {
- id Int @id @default(autoincrement())
- name String @db.VarChar(255)
- status Int
- created_at DateTime @default(now()) @db.DateTime(0)
- deleted_at DateTime @default(now()) @db.DateTime(0)
- updated_at DateTime @default(now()) @db.DateTime(0)
- organization_id Int
- time_feature Int @default(0)
- learning_map_status learning_map_status @relation(fields: [status], references: [id], onUpdate: Restrict, map: "learning_map_ibfk_1")
- organization organization @relation(fields: [organization_id], references: [id], onUpdate: Restrict, map: "learning_map_ibfk_2")
- learning_map_area learning_map_area[]
- learning_map_level learning_map_level[]
- learning_map_area_group learning_map_area_group[]
- @@index([organization_id], map: "organization_id")
- @@index([status], map: "status")
- }
- model learning_map_status {
- id Int @id @default(autoincrement())
- name String @db.VarChar(255)
- learning_map learning_map[]
- }
- model level {
- id Int @id @default(autoincrement())
- name String
- external_id Int @unique
- learning_map_level learning_map_level[]
- }
- model organization {
- id Int @id @unique
- learning_map learning_map[]
- user user[]
- }
- model user {
- id Int @id @default(autoincrement())
- external_id Int
- organization_id Int
- organization organization @relation(fields: [organization_id], references: [id], onUpdate: Restrict, map: "user_ibfk_1")
- @@index([organization_id], map: "user_ibfk_1")
- }
- model area_group {
- id Int @id @default(autoincrement())
- name String @db.VarChar(255)
- areas area_group_area[]
- learning_map_area_group learning_map_area_group[]
- }
- model area_group_area {
- id Int @id @default(autoincrement())
- area_group_id Int
- learning_map_area_id Int
- area_group area_group @relation(fields: [area_group_id], references: [id], onUpdate: Restrict, map: "area_group_area_ibfk_1")
- area learning_map_area @relation(fields: [learning_map_area_id], references: [id], onUpdate: Restrict, map: "area_group_area_ibfk_2")
- @@index([area_group_id], map: "area_group_id")
- @@index([learning_map_area_id], map: "learning_map_area_id")
- }
- // model organization_area {
- // id Int @id @default(autoincrement())
- // organization_id Int
- // area_id Int
- // organization organization @relation(fields: [organization_id], references: [id], onUpdate: Restrict, map: "organization_area_ibfk_1")
- // area area @relation(fields: [area_id], references: [id], onUpdate: Restrict, map: "organization_area_ibfk_2")
- // learning_map_area learning_map_area[]
- // @@index([area_id], map: "area_id")
- // @@index([organization_id], map: "organization_id")
- // }
- // model organization_level {
- // id Int @id @default(autoincrement())
- // organization_id Int
- // level_id Int
- // organization organization @relation(fields: [organization_id], references: [id], onUpdate: Restrict, map: "organization_level_ibfk_1")
- // level level @relation(fields: [level_id], references: [id], onUpdate: Restrict, map: "organization_level_ibfk_2")
- // learning_map_level learning_map_level[]
- // @@index([level_id], map: "level_id")
- // @@index([organization_id], map: "organization_id")
- // }
- model competence {
- id Int @id @default(autoincrement())
- external_id Int @unique
- name String @db.VarChar(255)
- status Int
- created_at DateTime @default(now()) @db.DateTime(0)
- deleted_at DateTime @default(now()) @db.DateTime(0)
- updated_at DateTime @default(now()) @db.DateTime(0)
- competence_assignment competence_assignment[]
- skills skill[]
- }
- model competence_assignment {
- id Int @id @default(autoincrement())
- learning_map_area_id Int
- learning_map_level_id Int
- competence_id Int
- created_at DateTime @default(now()) @db.DateTime(0)
- deleted_at DateTime @default(now()) @db.DateTime(0)
- updated_at DateTime @default(now()) @db.DateTime(0)
- learning_map_area learning_map_area @relation(fields: [learning_map_area_id], references: [id], onUpdate: Restrict, map: "competence_assignment_ibfk_1")
- learning_map_level learning_map_level @relation(fields: [learning_map_level_id], references: [id], onUpdate: Restrict, map: "competence_assignment_ibfk_2")
- competence competence @relation(fields: [competence_id], references: [id], onUpdate: Restrict, map: "competence_assignment_ibfk_3")
- @@index([competence_id], map: "competence_id")
- @@index([learning_map_area_id], map: "learning_map_area_id")
- @@index([learning_map_level_id], map: "learning_map_level_id")
- }
- model learning_map_area {
- id Int @id @default(autoincrement())
- learning_map_id Int
- area_id Int
- learning_map learning_map @relation(fields: [learning_map_id], references: [id], onUpdate: Restrict, map: "learning_map_area_ibfk_1")
- area area @relation(fields: [area_id], references: [id], onUpdate: Restrict, map: "learning_map_area_ibfk_2")
- area_group_area area_group_area[]
- competence_assignment competence_assignment[]
- skill_assignment skill_assignment[]
- @@index([learning_map_id], map: "learning_map_id")
- @@index([area_id], map: "area_id")
- }
- model learning_map_area_group {
- id Int @id @default(autoincrement())
- learning_map_id Int
- area_group_id Int
- learning_map learning_map @relation(fields: [learning_map_id], references: [id], onUpdate: Restrict, map: "learning_map_area_group_ibfk_1")
- area_group area_group @relation(fields: [area_group_id], references: [id], onUpdate: Restrict, map: "learning_map_area_group_ibfk_2")
- @@index([area_group_id], map: "area_group_id")
- @@index([learning_map_id], map: "learning_map_id")
- }
- model learning_map_level {
- id Int @id @default(autoincrement())
- learning_map_id Int
- level_id Int
- learning_map learning_map @relation(fields: [learning_map_id], references: [id], onUpdate: Restrict, map: "learning_map_level_ibfk_1")
- level level @relation(fields: [level_id], references: [id], onUpdate: Restrict, map: "learning_map_level_ibfk_2")
- competence_assignment competence_assignment[]
- skill_assignment skill_assignment[]
- @@index([learning_map_id], map: "learning_map_id")
- @@index([level_id], map: "level_id")
- }
- model skill {
- id Int @id @default(autoincrement())
- external_id Int @unique
- name String @db.VarChar(255)
- status Int
- competence_id Int
- created_at DateTime @default(now()) @db.DateTime(0)
- deleted_at DateTime @default(now()) @db.DateTime(0)
- updated_at DateTime @default(now()) @db.DateTime(0)
- competence competence @relation(fields: [competence_id], references: [id], onUpdate: Restrict, map: "skill_ibfk_1")
- skill_assignment skill_assignment[]
- @@index([competence_id], map: "competence_id")
- }
- model skill_assignment {
- id Int @id @default(autoincrement())
- learning_map_area_id Int
- learning_map_level_id Int
- skill_id Int
- created_at DateTime @default(now()) @db.DateTime(0)
- deleted_at DateTime @default(now()) @db.DateTime(0)
- updated_at DateTime @default(now()) @db.DateTime(0)
- learning_map_area learning_map_area @relation(fields: [learning_map_area_id], references: [id], onUpdate: Restrict, map: "skill_assignment_ibfk_1")
- learning_map_level learning_map_level @relation(fields: [learning_map_level_id], references: [id], onUpdate: Restrict, map: "skill_assignment_ibfk_2")
- skill skill @relation(fields: [skill_id], references: [id], onUpdate: Restrict, map: "skill_assignment_ibfk_3")
- @@index([learning_map_area_id], map: "learning_map_area_id")
- @@index([learning_map_level_id], map: "learning_map_level_id")
- @@index([skill_id], map: "skill_id")
- }
- // model skill_competence {
- // id Int @id @default(autoincrement())
- // skill_id Int
- // competence_id Int
- // created_at DateTime @default(now()) @db.DateTime(0)
- // deleted_at DateTime @default(now()) @db.DateTime(0)
- // updated_at DateTime @default(now()) @db.DateTime(0)
- // skill skill @relation(fields: [skill_id], references: [id], onUpdate: Restrict, map: "skill_competence_ibfk_1")
- // competence competence @relation(fields: [competence_id], references: [id], onUpdate: Restrict, map: "skill_competence_ibfk_2")
- // @@index([competence_id], map: "competence_id")
- // @@index([skill_id], map: "skill_id")
- // }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement