added and updated models
This commit is contained in:
17
specs/models/ticket/ticket.v
Normal file
17
specs/models/ticket/ticket.v
Normal file
@@ -0,0 +1,17 @@
|
||||
module ticket
|
||||
|
||||
import base
|
||||
import freeflowuniverse.herolib.data.ourtime
|
||||
// TicketStatus and TicketPriority enums are used from ticket_enums.v in the same module
|
||||
|
||||
// Ticket represents a support ticket in the system
|
||||
pub struct Ticket {
|
||||
base.Base // Provides id u32, creation_time, mod_time, comments []u32
|
||||
pub mut:
|
||||
user_id u32 // Reference to User.id (the user who created the ticket)
|
||||
title string
|
||||
description string
|
||||
status TicketStatus
|
||||
priority TicketPriority
|
||||
assigned_to_user_id u32? // Optional: Reference to User.id (the user assigned to the ticket)
|
||||
}
|
14
specs/models/ticket/ticket_comment.v
Normal file
14
specs/models/ticket/ticket_comment.v
Normal file
@@ -0,0 +1,14 @@
|
||||
module ticket
|
||||
|
||||
import base
|
||||
import freeflowuniverse.herolib.data.ourtime
|
||||
|
||||
// TicketComment represents a comment on a support ticket
|
||||
pub struct TicketComment {
|
||||
base.Base // Provides id u32, creation_time, mod_time, comments []u32
|
||||
pub mut:
|
||||
ticket_id u32 // Reference to Ticket.id
|
||||
user_id u32 // Reference to User.id (author of the comment)
|
||||
content string
|
||||
is_support_response bool // True if the comment is from a support agent
|
||||
}
|
18
specs/models/ticket/ticket_enums.v
Normal file
18
specs/models/ticket/ticket_enums.v
Normal file
@@ -0,0 +1,18 @@
|
||||
module ticket
|
||||
|
||||
// TicketStatus defines the status of a support ticket
|
||||
pub enum TicketStatus {
|
||||
open
|
||||
in_progress
|
||||
waiting_for_customer
|
||||
resolved
|
||||
closed
|
||||
}
|
||||
|
||||
// TicketPriority defines the priority of a support ticket
|
||||
pub enum TicketPriority {
|
||||
low
|
||||
medium
|
||||
high
|
||||
critical
|
||||
}
|
Reference in New Issue
Block a user