feedback

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FeatureAdoption

type FeatureAdoption struct {
	Feature      string  `json:"feature"`
	Users        int     `json:"users"`
	AdoptionRate float64 `json:"adoptionRate"`
	Frequency    float64 `json:"frequency"`
}

FeatureAdoption represents feature adoption metrics

type Feedback

type Feedback struct {
	Id        int64  `json:"id"`
	PlayerId  string `json:"playerId"`
	Contact   string `json:"contact"`
	Content   string `json:"content"`
	Category  string `json:"category"`
	Priority  string `json:"priority"`
	Status    string `json:"status"`
	Rating    int    `json:"rating"` // 1-5星
	Attach    string `json:"attach"` // 附件URL
	GameId    string `json:"gameId"`
	Env       string `json:"env"`
	Reply     string `json:"reply"`
	CreatedAt string `json:"createdAt"`
	UpdatedAt string `json:"updatedAt"`
}

Feedback represents user feedback

type FeedbackCreateRequest

type FeedbackCreateRequest struct {
	PlayerId string `json:"playerId"`
	Contact  string `json:"contact"`
	Content  string `json:"content"`
	Category string `json:"category"`
	Rating   int    `json:"rating"`
	Attach   string `json:"attach"`
	GameId   string `json:"gameId"`
	Env      string `json:"env"`
}

FeedbackCreateRequest represents the request to create feedback

type FeedbackCreateResponse

type FeedbackCreateResponse struct {
	Feedback
}

FeedbackCreateResponse represents the response after creating feedback

type FeedbackDeleteRequest

type FeedbackDeleteRequest struct {
	ID string `uri:"id"`
}

FeedbackDeleteRequest represents the request to delete feedback

type FeedbackDetailResponse

type FeedbackDetailResponse struct {
	Feedback
}

FeedbackDetailResponse represents the response with feedback details

type FeedbackListRequest

type FeedbackListRequest struct {
	Page     int    `form:"page,optional,default=1"`
	PageSize int    `form:"pageSize,optional,default=20"`
	Status   string `form:"status"`
	Category string `form:"category"`
	GameId   string `form:"gameId"`
}

FeedbackListRequest represents the request to list feedbacks

type FeedbackListResponse

type FeedbackListResponse struct {
	Items []Feedback `json:"items"`
	Total int64      `json:"total"`
	Page  int        `json:"page"`
	Size  int        `json:"pageSize"`
}

FeedbackListResponse represents the response with a list of feedbacks

type FeedbackStats

type FeedbackStats struct {
	Total        int            `json:"total"`
	ByCategory   map[string]int `json:"byCategory"`
	ByStatus     map[string]int `json:"byStatus"`
	AvgRating    float64        `json:"avgRating"`
	ResponseRate float64        `json:"responseRate"`
}

FeedbackStats represents feedback statistics

type FeedbackStatsRequest

type FeedbackStatsRequest struct {
	GameId string `form:"gameId"`
	Days   int    `form:"days,optional,default=7"`
}

FeedbackStatsRequest represents the request to get feedback stats

type FeedbackStatsResponse

type FeedbackStatsResponse struct {
	FeedbackStats
}

FeedbackStatsResponse represents the response with feedback stats

type FeedbackUpdateRequest

type FeedbackUpdateRequest struct {
	ID       string `uri:"id"`
	Status   string `json:"status"`
	Priority string `json:"priority"`
	Reply    string `json:"reply"`
}

FeedbackUpdateRequest represents the request to update feedback

type FeedbackUpdateResponse

type FeedbackUpdateResponse struct {
	Feedback
}

FeedbackUpdateResponse represents the response after updating feedback

type Handler

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

func NewHandler

func NewHandler(service *Service) *Handler

func (*Handler) Create

func (h *Handler) Create(c *gin.Context)

Create handles the request to create feedback

func (*Handler) Delete

func (h *Handler) Delete(c *gin.Context)

Delete handles the request to delete feedback

func (*Handler) List

func (h *Handler) List(c *gin.Context)

List handles the request to list feedbacks

func (*Handler) Stats

func (h *Handler) Stats(c *gin.Context)

Stats handles the request to get feedback statistics

func (*Handler) Update

func (h *Handler) Update(c *gin.Context)

Update handles the request to update feedback

type Service

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

func NewService

func NewService(svcCtx *svc.ServiceContext) *Service

func (*Service) Create

Create creates a new feedback

func (*Service) Delete

func (s *Service) Delete(ctx context.Context, req *FeedbackDeleteRequest) error

Delete deletes a feedback

func (*Service) List

List retrieves a paginated list of feedbacks

func (*Service) Stats

Stats retrieves feedback statistics

func (*Service) Update

Update updates an existing feedback

Jump to

Keyboard shortcuts

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