Documentation
¶
Index ¶
- type Follow
- type Ticket
- type TicketRepo
- type TicketUseCase
- func (uc *TicketUseCase) CreateTicketFollow(ctx context.Context, follow *Follow) error
- func (uc *TicketUseCase) GetTicket(ctx context.Context, id int) (*Ticket, error)
- func (uc *TicketUseCase) GetTicketList(ctx context.Context, page, size int, userId int64, status *int8, search string) (int32, []*Ticket, error)
- func (uc *TicketUseCase) UpdateTicketStatus(ctx context.Context, id int, status int8) error
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) GetTicketList ¶
func (uc *TicketUseCase) GetTicketList(ctx context.Context, page, size int, userId int64, status *int8, search string) (int32, []*Ticket, error)
GetTicketList 获取工单列表
func (*TicketUseCase) UpdateTicketStatus ¶
UpdateTicketStatus 更新工单状态
Click to show internal directories.
Click to hide internal directories.