feat: menambahkan kolom slug dan implement slug di module project

This commit is contained in:
Muhammad Zhafran Ilham
2026-06-23 22:07:21 +07:00
parent 08f7ca8319
commit b630ebbe3c
6 changed files with 138 additions and 11 deletions
+4
View File
@@ -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")
}