app

package
v1.7.7 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 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 Item

type Item struct {
	TaskName string `json:"task_name"`
	Descs    string `json:"descs"`
	Points   int    `json:"points"`
	Time     string `json:"time"`
}

type ListPromotionsCmd added in v1.1.0

type ListPromotionsCmd struct {
	User     types.Account
	Type     domain.PromotionType
	Status   domain.PromotionStatus
	Tags     []string
	Way      domain.PromotionWay
	PageNo   int
	PageSize int
}

type PointsCmd

type PointsCmd struct {
	Promotionid string
	User        types.Account
	Lang        common.Language
}

type PointsDTO

type PointsDTO struct {
	Items []Item `json:"items"`
	Total int    `json:"total"`
}

type PointsRankDTO

type PointsRankDTO struct {
	User  string `json:"user"`
	Point int    `json:"point"`
}

type PointsService

type PointsService interface {
	GetPoints(*PointsCmd) (PointsDTO, error)
	GetPointsRank(promotionid string) ([]PointsRankDTO, error)
}

func NewPointsService

func NewPointsService(
	service service.PointsTaskService,
) PointsService

type PromotionCmd

type PromotionCmd struct {
	Id   string
	User types.Account
}

type PromotionDTO

type PromotionDTO struct {
	Id         string `json:"id"`
	Name       string `json:"name"`
	Desc       string `json:"desc"`
	Poster     string `json:"poster"`
	Status     string `json:"status"`
	IsRegister bool   `json:"is_register"`
	Total      int    `json:"total"`
	Duration   string `json:"duration"`
	Count      int64  `json:"count"`
	Host       string `json:"host"`
	Way        string `json:"way"`
	Type       string `json:"type"`
	Intro      string `json:"intro"`
	IsStatic   bool   `json:"is_static"`
}

type PromotionService

type PromotionService interface {
	GetPromotion(*PromotionCmd) (PromotionDTO, error)
	GetUserRegisterPromotion(types.Account) ([]PromotionDTO, string, error)
	UserRegister(*UserRegistrationCmd) (code string, err error)
	Get(*PromotionCmd) (PromotionDTO, error)
	List(*ListPromotionsCmd) (PromotionsDTO, error)
}

type PromotionsDTO added in v1.1.0

type PromotionsDTO struct {
	Items []PromotionDTO `json:"items"`
	Total int64          `json:"total"`
}

type UserRegistrationCmd

type UserRegistrationCmd struct {
	PromotionId string
	domain.UserRegistration
	Origin domain.Origin
}

Jump to

Keyboard shortcuts

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