feat: Implement ticket commenting functionality
Adds the ability for users to comment on tickets, view comments, and distinguish between user and admin responses. Also introduces a new 'SUSPENDED' status for tickets and refactors database schema and API endpoints to support comments.
This commit is contained in:
14
types.ts
14
types.ts
@@ -125,8 +125,9 @@ export interface AuthResponse {
|
||||
export enum TicketStatus {
|
||||
OPEN = 'OPEN',
|
||||
IN_PROGRESS = 'IN_PROGRESS',
|
||||
SUSPENDED = 'SUSPENDED', // New State
|
||||
RESOLVED = 'RESOLVED',
|
||||
CLOSED = 'CLOSED'
|
||||
CLOSED = 'CLOSED' // Closed without resolution (Archived/WontFix)
|
||||
}
|
||||
|
||||
export enum TicketPriority {
|
||||
@@ -152,6 +153,16 @@ export interface TicketAttachment {
|
||||
data: string; // Base64 Data URI
|
||||
}
|
||||
|
||||
export interface TicketComment {
|
||||
id: string;
|
||||
ticketId: string;
|
||||
userId: string;
|
||||
userName: string;
|
||||
text: string;
|
||||
createdAt: string;
|
||||
isAdminResponse: boolean;
|
||||
}
|
||||
|
||||
export interface Ticket {
|
||||
id: string;
|
||||
condoId: string;
|
||||
@@ -164,6 +175,7 @@ export interface Ticket {
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
attachments?: TicketAttachment[];
|
||||
comments?: TicketComment[];
|
||||
userName?: string; // Joined field
|
||||
userEmail?: string; // Joined field
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user