mbcr

package
v0.13.68 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Destroy

func Destroy()

func Init

func Init(baseUrl string, timeoutSec time.Duration)

Types

type ActivityInfo

type ActivityInfo struct {
	Id                string `form:"id" json:"id" gorm:"primary_key;comment:id;"`
	Name              string `form:"name" json:"name" gorm:"not null;type:varchar(1024);comment:活动名称"`
	Start             string `form:"start" json:"start" gocp:"time"`
	End               string `form:"end" json:"end" gocp:"time"`
	GameName          string `form:"gameName" json:"gameName"`
	ResponsiblePerson string `form:"responsiblePerson" json:"responsiblePerson" gorm:"type:varchar(128);comment:负责人"`
	State             uint8  `form:"state" json:"state" gorm:"not null;comment:状态"`
	TangentId         string `form:"tangentId" json:"tangentId" gorm:"not null;type:varchar(32);comment:组织id"`
}

type CreateSquadsRequest added in v0.13.11

type CreateSquadsRequest struct {
	Info []SquadsInfo `json:"info"`
}

type GetActivityParam

type GetActivityParam struct {
	ActivityInfo
	PageQuery
}

type GetByIdParam added in v0.13.21

type GetByIdParam struct {
	Id string `form:"id" json:"id"`
}

type GetPlayerParam added in v0.13.9

type GetPlayerParam struct {
	PlayerInfo
	PageQuery
}

type GetSquadsParam added in v0.13.5

type GetSquadsParam struct {
	SquadsInfo
	PageQuery
}

type GetStatisticParam added in v0.13.18

type GetStatisticParam struct {
	StatisticInfo
	PageQuery
}

type PageQuery

type PageQuery struct {
	PageNo   int `form:"pageNo" json:"pageNo"`
	PageSize int `form:"pageSize" json:"pageSize"`
}

type PlayerInfo added in v0.13.9

type PlayerInfo struct {
	Id           string `form:"id" json:"id" gorm:"primary_key;comment:id;"`
	Area         string `form:"area" json:"area" gorm:"not null;type:varchar(1024);comment:地区"`
	SquadsName   string `form:"squadsName" json:"squadsName" gorm:"not null;type:varchar(520);comment:战队名称"`
	Name         string `form:"name" json:"name" gorm:"not null;type:varchar(100);comment:选手姓名"`
	Captain      bool   `form:"captain" json:"captain" gorm:"not null;comment:是否队长"`
	IdCard       string `form:"idCard" json:"idCard" gorm:"not null;type:varchar(100);comment:身份证"`
	State        uint8  `form:"state" json:"state" gorm:"not null;comment:状态"`
	ActivityName string `form:"activityName" json:"activityName" gorm:"not null;type:varchar(100);comment:活动名称"`
	ActivityId   string `form:"activityId" json:"activityId" gorm:"not null;type:varchar(32);comment:活动id"`
	TangentId    string `form:"tangentId" json:"tangentId"`
	CreateBy     string `json:"createBy" form:"createBy"`
}

type Resp

type Resp struct {
	Data any    `json:"data"`
	Code int    `json:"code"`
	Suc  bool   `json:"success"`
	Msg  string `json:"msg"`
}

func ActivityData added in v0.13.10

func ActivityData(activityId string) (*Resp, error)

func ActivityHomePage added in v0.13.10

func ActivityHomePage(activityId string) (*Resp, error)

func CreateActivity

func CreateActivity(params ActivityInfo) (*Resp, error)

func CreateSquads added in v0.13.5

func CreateSquads(params CreateSquadsRequest) (*Resp, error)

func DeleteActivity

func DeleteActivity(params ActivityInfo) (*Resp, error)

func DeleteSquads added in v0.13.5

func DeleteSquads(params SquadsInfo) (*Resp, error)

func GetActivity

func GetActivity(params GetActivityParam) (*Resp, error)

func GetActivityByID added in v0.13.21

func GetActivityByID(params GetByIdParam) (*Resp, error)

func GetPlayer added in v0.13.9

func GetPlayer(params GetPlayerParam) (*Resp, error)

func GetSquads added in v0.13.5

func GetSquads(params GetSquadsParam) (*Resp, error)

func GetStatistic added in v0.13.18

func GetStatistic(params GetStatisticParam) (*Resp, error)

func ImportExcel added in v0.13.18

func ImportExcel(activityId string, f *multipart.FileHeader) (*Resp, error)

func UpdateActivity

func UpdateActivity(params ActivityInfo) (*Resp, error)

func UpdateSquads added in v0.13.5

func UpdateSquads(params CreateSquadsRequest) (*Resp, error)

type Result added in v0.13.13

type Result struct {
	Info       any   `json:"info"`
	TotalCount int64 `json:"totalCount"`
	PageNo     int   `json:"pageNo"`
}

type SquadsInfo added in v0.13.5

type SquadsInfo struct {
	Id           string `form:"id" json:"id" gorm:"primary_key;comment:id;"`
	Area         string `form:"area" json:"area" gorm:"not null;type:varchar(1024);comment:地区"`
	SquadsName   string `form:"squadsName" json:"squadsName" gorm:"not null;type:varchar(520);comment:战队名称"`
	Name         string `form:"name" json:"name" gorm:"not null;type:varchar(100);comment:选手姓名"`
	IdCard       string `form:"idCard" json:"idCard" gorm:"not null;type:varchar(100);comment:身份证"`
	Phone        string `form:"phone" json:"phone" gorm:"not null;type:varchar(20);comment:手机"`
	State        uint8  `form:"state" json:"state" gorm:"not null;comment:状态"`
	ActivityName string `form:"activityName" json:"activityName" gorm:"not null;type:varchar(100);comment:活动名称"`
	ActivityId   string `form:"activityId" json:"activityId" gorm:"not null;type:varchar(32);comment:活动id"`
	TangentId    string `json:"tangentId" form:"tangentId" gorm:"not null;type:varchar(32);comment:组织id"`
	CreateBy     string `json:"createBy" form:"createBy"`
}

type StatisticInfo added in v0.13.18

type StatisticInfo struct {
	ActivityId string `json:"activityId" form:"activityId"`
	Tab        string `json:"tab" form:"tab"`
	Data       string `json:"data" form:"data"`
}

Jump to

Keyboard shortcuts

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