gohorsejobs/backend/internal/models/ticket.go

30 lines
778 B
Go

package models
import "time"
type Ticket struct {
ID string `json:"id"`
UserID string `json:"userId"`
Subject string `json:"subject"`
Status string `json:"status"` // open, in_progress, closed
Priority string `json:"priority"` // low, medium, high
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type TicketMessage struct {
ID string `json:"id"`
TicketID string `json:"ticketId"`
UserID string `json:"userId"`
Message string `json:"message"`
CreatedAt time.Time `json:"createdAt"`
}
type CreateTicketRequest struct {
Subject string `json:"subject"`
Priority string `json:"priority,omitempty"`
}
type AddTicketMessageRequest struct {
Message string `json:"message"`
}