feat: menambahkan kolom slug dan implement slug di module project
This commit is contained in:
@@ -205,6 +205,7 @@ model User {
|
||||
model Project {
|
||||
id Int @id @default(autoincrement())
|
||||
id_admin Int //mentor project
|
||||
slug String @unique @db.VarChar(255)
|
||||
project_icon ProjectIcon @default(code)
|
||||
project_name String @db.VarChar(255)
|
||||
description String @db.Text
|
||||
@@ -245,6 +246,7 @@ model ProjectMember {
|
||||
model Task {
|
||||
id Int @id @default(autoincrement())
|
||||
id_project Int
|
||||
slug String @db.VarChar(255)
|
||||
title String @db.VarChar(255)
|
||||
description String @db.Text
|
||||
deadline_at DateTime
|
||||
@@ -255,8 +257,10 @@ model Task {
|
||||
project Project @relation(fields: [id_project], references: [id], map: "task_id_project_foreign")
|
||||
submissions TaskSubmission[]
|
||||
|
||||
@@unique([id_project, slug])
|
||||
@@index([id_project], map: "task_id_project_foreign")
|
||||
@@index([deadline_at])
|
||||
@@index([slug])
|
||||
@@map("task")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user