系统架构层面流量控制功能完善

This commit is contained in:
flswld
2023-02-05 07:18:43 +08:00
parent cfb001c18a
commit 94c8db402a
51 changed files with 1049 additions and 2408 deletions

View File

@@ -3,13 +3,15 @@ package model
import "go.mongodb.org/mongo-driver/bson/primitive"
type Account struct {
ID primitive.ObjectID `bson:"_id,omitempty"`
AccountID uint64 `bson:"accountID"`
Username string `bson:"username"`
Password string `bson:"password"`
PlayerID uint64 `bson:"playerID"`
Token string `bson:"token"`
ComboToken string `bson:"comboToken"`
Forbid bool `bson:"forbid"`
ForbidEndTime uint64 `bson:"forbidEndTime"`
ID primitive.ObjectID `bson:"_id,omitempty"`
AccountID uint64 `bson:"accountID"`
Username string `bson:"username"`
Password string `bson:"password"`
PlayerID uint64 `bson:"playerID"`
Token string `bson:"token"`
TokenCreateTime uint64 `bson:"tokenCreateTime"` // 毫秒时间戳
ComboToken string `bson:"comboToken"`
ComboTokenUsed bool `bson:"comboTokenUsed"`
Forbid bool `bson:"forbid"`
ForbidEndTime uint64 `bson:"forbidEndTime"` // 秒时间戳
}

View File

@@ -1,6 +0,0 @@
package model
type AccountIDCounter struct {
ID string `bson:"_id"`
AccountID uint64 `bson:"AccountID"`
}

View File

@@ -0,0 +1,24 @@
package model
import (
"go.mongodb.org/mongo-driver/bson/primitive"
)
type ClientLog struct {
ID primitive.ObjectID `json:"-" bson:"_id,omitempty"`
Auid string `json:"auid" bson:"auid"`
ClientIp string `json:"clientIp" bson:"clientIp"`
CpuInfo string `json:"cpuInfo" bson:"cpuInfo"`
DeviceModel string `json:"deviceModel" bson:"deviceModel"`
DeviceName string `json:"deviceName" bson:"deviceName"`
GpuInfo string `json:"gpuInfo" bson:"gpuInfo"`
Guid string `json:"guid" bson:"guid"`
LogStr string `json:"logStr" bson:"logStr"`
LogType string `json:"logType" bson:"logType"`
OperatingSystem string `json:"operatingSystem" bson:"operatingSystem"`
StackTrace string `json:"stackTrace" bson:"stackTrace"`
Time string `json:"time" bson:"time"`
Uid uint64 `json:"uid" bson:"uid"`
UserName string `json:"userName" bson:"userName"`
Version string `json:"version" bson:"version"`
}

View File

@@ -1,6 +0,0 @@
package model
type PlayerIDCounter struct {
ID string `bson:"_id"`
PlayerID uint64 `bson:"PlayerID"`
}