Files
arenax-server/internal/model/userTask.go
2025-06-10 09:50:23 +08:00

49 lines
1.6 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package model
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
type UserTaskRanking struct {
g.Meta `orm:"table:task"`
Id int `orm:"column:id" json:"id"` //
UserId int `orm:"column:user_id" json:"userId"` // 用户 id
TaskId int `orm:"column:task_id" json:"taskId"` // 任务 id
Status int `orm:"column:status" json:"status"` // 状态 1:待完成 2:完成
SerialNumber string `orm:"column:serial_number" json:"serialNumber"` // 流水号
StoreId int `orm:"column:store_id" json:"storeId"` // 门店 id
CreatedAt *gtime.Time `orm:"column:created_at" json:"createdAt"`
UpdatedAt *gtime.Time `orm:"column:updated_at" json:"updatedAt"`
CompletedAT *gtime.Time `orm:"column:completed_at" json:"completedAt"`
DeletedAt *gtime.Time `orm:"column:deleted_at" json:"deletedAt"`
}
// UserTaskRankingIn 任务排行榜入参
type UserTaskRankingIn struct {
Page int
Size int
StoreId int
Type int // 排行榜类型 1:日 2:周 3
OperatorId int
}
// UserTaskRankingOut 用户排行榜出参
type UserTaskRankingOut struct {
List []UserTaskRankingArgs
Total int
CompletedDay int
RankingDay int
}
type UserTaskRankingArgs struct {
UserName string `orm:"username" json:"username"`
Avatar string `orm:"avatar" json:"avatar"`
Total int `orm:"num" json:"num"`
}
type LoginUserRanking struct {
UserId int `orm:"user_id" json:"user_id"`
Num int `orm:"num" json:"num"`
}