ticket

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Follow

type Follow struct {
	Id        int64
	TicketId  int64
	From      string
	Type      int8
	Content   string
	CreatedAt int // Unix timestamp in milliseconds
}

Follow 工单跟进信息

type Ticket

type Ticket struct {
	Id          int64
	Title       string
	Description string
	UserId      int64
	Status      int8
	Follow      []*Follow
	CreatedAt   int // Unix timestamp in milliseconds
	UpdatedAt   int // Unix timestamp in milliseconds
}

Ticket 工单信息

type TicketRepo

type TicketRepo interface {
	// GetTicket 获取工单详情(包含跟进列表)
	GetTicket(ctx context.Context, id int) (*Ticket, error)
	// GetTicketList 获取工单列表
	GetTicketList(ctx context.Context, page, size int, userId int64, status *int8, search string) (int32, []*Ticket, error)
	// UpdateTicketStatus 更新工单状态
	UpdateTicketStatus(ctx context.Context, id int, status int8) error
	// CreateTicketFollow 创建工单跟进
	CreateTicketFollow(ctx context.Context, follow *Follow) error
	// GetTicketById 获取工单基本信息(不含跟进列表)
	GetTicketById(ctx context.Context, id int) (*Ticket, error)
}

TicketRepo 工单仓库接口

type TicketUseCase

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

TicketUseCase 工单用例

func NewTicketUseCase

func NewTicketUseCase(repo TicketRepo, logger log.Logger) *TicketUseCase

NewTicketUseCase 创建工单用例

func (*TicketUseCase) CreateTicketFollow

func (uc *TicketUseCase) CreateTicketFollow(ctx context.Context, follow *Follow) error

CreateTicketFollow 创建工单跟进

func (*TicketUseCase) GetTicket

func (uc *TicketUseCase) GetTicket(ctx context.Context, id int) (*Ticket, error)

GetTicket 获取工单详情

func (*TicketUseCase) GetTicketList

func (uc *TicketUseCase) GetTicketList(ctx context.Context, page, size int, userId int64, status *int8, search string) (int32, []*Ticket, error)

GetTicketList 获取工单列表

func (*TicketUseCase) UpdateTicketStatus

func (uc *TicketUseCase) UpdateTicketStatus(ctx context.Context, id int, status int8) error

UpdateTicketStatus 更新工单状态

Jump to

Keyboard shortcuts

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