Customer Support Microservice
The Customer Support microservice is responsible for handling support tickets and related comments. It includes MongoDB-backed models and a gRPC API for creating, updating, and tracking support issues submitted by users.
Models (customer_support.go)
Ticket
Represents a customer support request or issue.
| Field | Type | Description |
|---|---|---|
ID | ObjectID | Unique MongoDB identifier |
UserID | uint32 | ID of the user who submitted the ticket |
Application | string | Name or ID of the application related to the ticket |
Subject | string | Short title/subject of the issue |
Description | string | Detailed description of the issue |
Status | TicketStatus | Current status: open, in_progress, resolved, closed |
Priority | Priority | Priority level: low, medium, high, critical |
CreatedAt | time.Time | Timestamp when the ticket was created |
UpdatedAt | time.Time | Last updated timestamp |
CreatedBy | uint32 | ID of the user who created the ticket |
UpdatedBy | uint32 | ID of the user who last updated the ticket |
AssignedTo | uint32 | ID of the user currently assigned to the ticket (optional) |
Comment
Stores user or support agent comments on a support ticket.
| Field | Type | Description |
|---|---|---|
ID | ObjectID | Unique MongoDB identifier |
TicketID | string | ID of the ticket the comment is attached to |
UserID | uint32 | ID of the commenting user |
Content | string | Text of the comment |
CreatedAt | time.Time | Timestamp of creation |
UpdatedAt | time.Time | Timestamp of last update |
CreatedBy | uint32 | ID of creator |
UpdatedBy | uint32 | ID of last updater |
gRPC Service (customer_support.proto)
The .proto file defines services for managing tickets and comments via gRPC.
Messages
Ticket,Comment: Mirror the Go struct fields.TicketId,CommentId: Used to fetch individual records.TicketList,CommentList: Collections of records.TicketRequest,CommentRequest: For creating or updating tickets/comments.Empty: Placeholder for requests or responses without fields.
Services
CreateTicket(TicketRequest) returns (Ticket)UpdateTicket(TicketRequest) returns (Ticket)GetTicket(TicketId) returns (Ticket)ListTickets(Empty) returns (TicketList)AddComment(CommentRequest) returns (Comment)ListComments(TicketId) returns (CommentList)
These services allow for managing the lifecycle of customer support tickets and enabling threaded discussions via comments.