report

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(c helper.Context, input CreateParams) (res schema.Response)

func CreateRouter

func CreateRouter(c *gin.Context)

func DeleteReportById

func DeleteReportById(id string)

func GetList

func GetList(c helper.Context, input Query) (res schema.List)

func GetListByAdmin

func GetListByAdmin(c helper.Context, input QueryAdmin) (res schema.List)

func GetListByAdminRouter

func GetListByAdminRouter(c *gin.Context)

func GetListRouter

func GetListRouter(c *gin.Context)

func GetReportByAdmin

func GetReportByAdmin(c helper.Context, id string) (res schema.Response)

func GetReportByAdminRouter

func GetReportByAdminRouter(c *gin.Context)

func GetReportByUser

func GetReportByUser(c helper.Context, id string) (res schema.Response)

func GetReportRouter

func GetReportRouter(c *gin.Context)

func Update

func Update(c helper.Context, reportId string, input UpdateParams) (res schema.Response)

func UpdateByAdmin

func UpdateByAdmin(c helper.Context, reportId string, input UpdateByAdminParams) (res schema.Response)

func UpdateByAdminRouter

func UpdateByAdminRouter(c *gin.Context)

func UpdateRouter

func UpdateRouter(c *gin.Context)

Types

type CreateParams

type CreateParams struct {
	Title       string           `json:"title" valid:"required~请填写标题"`     // 标题
	Content     string           `json:"content" valid:"required~请填写反馈内容"` // 内容
	Type        model.ReportType `json:"type" valid:"required~请填写反馈类型"`    // 反馈类型
	Screenshots []string         `json:"screenshots"`                      // 截图
}

type Query

type Query struct {
	schema.Query
	Type   *model.ReportType   `json:"type" form:"type"`     // 类型
	Status *model.ReportStatus `json:"status" form:"status"` // 状态
}

type QueryAdmin

type QueryAdmin struct {
	Query
	Uid string `json:"uid"`
}

type UpdateByAdminParams

type UpdateByAdminParams struct {
	UpdateParams
	Locked *bool `json:"locked"` // 是否锁定
}

type UpdateParams

type UpdateParams struct {
	Status *model.ReportStatus `json:"status" valid:"required~请选择要标记的状态"`
}

Jump to

Keyboard shortcuts

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