Migrated to using Bun instead of Node and PNPM. This also brings in a Devcontainer which enables quick and easy development of the project. Additionally this adds connectivity to S3 (with a default Minio server pre-created) this enables Files to be uploaded against Mantises. There's also a new Internal Notes feature to store arbitrary text notes against a Mantis.

This commit is contained in:
Cameron Redmore 2025-04-27 21:18:01 +00:00
parent 80ca48be70
commit 3b846b8c8e
23 changed files with 3210 additions and 6490 deletions

View file

@ -153,6 +153,8 @@ model MantisIssue {
updatedAt DateTime @updatedAt @map("updated_at")
comments MantisComment[]
files MantisFile[]
notes MantisNote[] // Add relation to MantisNote
fts Unsupported("tsvector")?
@ -189,4 +191,36 @@ model MantisAttachment {
comment MantisComment @relation(fields: [commentId], references: [id], onDelete: Cascade)
}
// New model for user-uploaded files to S3
model MantisFile {
id Int @id @default(autoincrement())
mantisIssueId Int @map("mantis_issue_id")
filename String
fileKey String @map("file_key") // S3 object key
mimeType String? @map("mime_type")
size Int?
uploadedBy String? @map("uploaded_by") // Username of uploader
uploadedAt DateTime @default(now()) @map("uploaded_at")
description String?
mantisIssue MantisIssue @relation(fields: [mantisIssueId], references: [id], onDelete: Cascade)
@@index([mantisIssueId])
}
// New model for internal notes
model MantisNote {
id Int @id @default(autoincrement())
mantisIssueId Int @map("mantis_issue_id")
content String
createdBy String @map("created_by") // Username of the creator
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
mantisIssue MantisIssue @relation(fields: [mantisIssueId], references: [id], onDelete: Cascade)
@@index([mantisIssueId])
@@index([createdBy])
}
// --- Mantis Models End ---