support

package
v0.0.0-...-73eed44 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateTicketContentRequest

type CreateTicketContentRequest struct {
	Content     string
	TicketId    string
	Attachments []attachment.Attachment
}

type CreateTicketRequest

type CreateTicketRequest struct {
	Title       string
	Content     string
	Attachments []attachment.Attachment
}

type CreateTicketResponse

type CreateTicketResponse struct {
	Id      string
	Title   string
	Status  string
	Content string
}

type GetTicketRequest

type GetTicketRequest struct {
	Id string
}

type GetTicketResponse

type GetTicketResponse struct {
	Id             string
	Title          string
	Status         string
	TicketContents []TicketContent
}

type ISupportRepository

type ISupportRepository interface {
	CreateTicket(ticket *Ticket) (*Ticket, error)
	GetTicket(id string) (*Ticket, error)
	GetTickets(filter interface{}, options *options.FindOptions) (*[]Ticket, error)
	GetTicketCount(filter interface{}) (int64, error)
	UpdateTicket(ticket *Ticket) (*Ticket, error)
}

type SupportController

type SupportController struct {
	// contains filtered or unexported fields
}

func (SupportController) CreateTicket

func (sc SupportController) CreateTicket(c *gin.Context)

func (SupportController) CreateTicketContent

func (sc SupportController) CreateTicketContent(c *gin.Context)

func (SupportController) GetTicket

func (sc SupportController) GetTicket(c *gin.Context)

func (SupportController) GetTickets

func (sc SupportController) GetTickets(c *gin.Context)

type SupportRepository

type SupportRepository struct {
	Client *mongo.Client
}

func NewSupportRepository

func NewSupportRepository(client *mongo.Client) SupportRepository

func (SupportRepository) CreateTicket

func (sr SupportRepository) CreateTicket(ticket *Ticket) (*Ticket, error)

func (SupportRepository) GetTicket

func (sr SupportRepository) GetTicket(id string) (*Ticket, error)

func (SupportRepository) GetTicketCount

func (sr SupportRepository) GetTicketCount(filter interface{}) (int64, error)

func (SupportRepository) GetTickets

func (sr SupportRepository) GetTickets(filter interface{}, options *options.FindOptions) (*[]Ticket, error)

func (SupportRepository) UpdateTicket

func (sr SupportRepository) UpdateTicket(ticket *Ticket) (*Ticket, error)

type Ticket

type Ticket struct {
	Id             primitive.ObjectID `bson:"_id"`
	Title          string
	AdminId        primitive.ObjectID
	SenderId       primitive.ObjectID
	Status         string
	TicketContents []TicketContent
}

type TicketContent

type TicketContent struct {
	Id          primitive.ObjectID
	Content     string
	SenderId    primitive.ObjectID
	Attachments []attachment.Attachment
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL