add:reply system

This commit is contained in:
2026-03-09 23:11:00 +09:00
parent 3c28c117a0
commit 2a81ede504
18 changed files with 772 additions and 167 deletions

View File

@@ -0,0 +1,10 @@
CREATE TABLE `ticket_replies` (
`id` text PRIMARY KEY NOT NULL,
`ticketId` text NOT NULL,
`userId` text,
`body` text NOT NULL,
`authorRole` text DEFAULT 'user' NOT NULL,
`createdAt` text NOT NULL,
FOREIGN KEY (`ticketId`) REFERENCES `tickets`(`id`) ON UPDATE no action ON DELETE cascade,
FOREIGN KEY (`userId`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE set null
);