model

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LimitBlockCount = "limitBlockCount"
	LessBlockScore  = "lessBlockScore"
	AutoBlock       = "autoBlock"
)
View Source
const (
	UpdateFactor int8 = iota + 1 // 修改因子操作
	UpdateSetting
	UpdateStat
)

Module etc.

View Source
const (
	WaiteCheck = "待确认"
	HadCheck   = "已确认"

	MaxRemarkLen = 100
)

stat check text.

View Source
const (
	DefPn   = 1
	DefPs   = 10
	NoParam = -1
)

page etc.

View Source
const (
	//BlockCount block count
	BlockCount = "封禁总数"
	// SecurityLoginCount security login count
	SecurityLoginCount = "二次验证总数"
)
View Source
const (
	AccountType = iota
	ArchiveType
	ActivityType
)

type def.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	ID        int64
	Name      string // 事件标示
	NickName  string // 事件可读昵称
	ServiceID int64
	Status    int8 // 0:删除 1:未删除
	CTime     time.Time
	MTime     time.Time
}

Event def.

type EventHistory

type EventHistory struct {
	ID         int64
	Mid        int64     // 用户ID
	EventID    int64     // 事件ID
	Score      int8      // 用户真实分
	BaseScore  int8      // 基础信息得分
	EventScore int8      // 事件得分
	Remark     string    // 备注
	Reason     string    // 原因
	FactorVal  float32   // 风险因子
	Ctime      time.Time // 创建时间
	TargetID   int64     // 目标id
	TargetMid  int64     // 目标mid
	SpyTime    time.Time // 作弊时间
}

EventHistory def.

type EventHistoryDto

type EventHistoryDto struct {
	ID         int64  `json:"id"`
	Score      int8   `json:"score"`       // 用户真实分
	BaseScore  int8   `json:"base_score"`  // 基础信息得分
	EventScore int8   `json:"event_score"` // 事件得分
	Reason     string `json:"reason"`      // 原因
	Ctime      int64  `json:"ctime"`       // 创建时间
	TargetID   int64  `json:"target_id"`   // 目标id
	TargetMid  int64  `json:"target_mid"`  // 目标mid
	SpyTime    int64  `json:"spy_time"`    // 作弊时间
}

EventHistoryDto dto.

type EventMessage

type EventMessage struct {
	Time      int64       `json:"time"`
	IP        string      `json:"ip"`
	Service   string      `json:"service"`
	Event     string      `json:"event"`
	ActiveMid int64       `json:"active_mid"`
	TargetMid int64       `json:"target_mid"`
	TargetID  int64       `json:"target_id"`
	Args      interface{} `json:"args"`
	Result    string      `json:"result"`
	Effect    string      `json:"effect"`
	RiskLevel int8        `json:"risk_level"`
}

EventMessage event from bigdata def.

type Factor

type Factor struct {
	ID         int64     `json:"id"`
	NickName   string    `json:"nick_name"`   //风险因子名字
	ServiceID  int64     `json:"service_id"`  //服务ID
	EventID    int64     `json:"event_id"`    //事件ID
	GroupID    int64     `json:"group_id"`    //分组ID
	RiskLevel  int8      `json:"risk_level"`  //风险等级:1-9
	FactorVal  float32   `json:"factor_val"`  //因子值
	CTime      time.Time `json:"ctime"`       //创建时间
	MTime      time.Time `json:"mtime"`       //修改时间
	CategoryID int8      `json:"category_id"` //CategoryID
}

Factor def.

type FactorGroup

type FactorGroup struct {
	ID    int64
	Name  string //风险因子组名
	CTime time.Time
}

FactorGroup etc.

type Factors

type Factors struct {
	ID        int64   `json:"id"`
	GroupID   int64   `json:"group_id"`   //分组ID
	GroupName string  `json:"group_name"` //分组名称
	NickName  string  `json:"nick_name"`  //风险因子名字
	FactorVal float32 `json:"factor_val"` //因子值
}

Factors etc.

type HisParamReq

type HisParamReq struct {
	Mid    int64
	Pn, Ps int
}

HisParamReq def.

type HistoryPage

type HistoryPage struct {
	TotalCount int                `json:"total_count"`
	Pn         int                `json:"pn"`
	Ps         int                `json:"ps"`
	Items      []*EventHistoryDto `json:"items"`
}

HistoryPage def.

type Log

type Log struct {
	ID        int64     `json:"id"`
	RefID     int64     `json:"ref_id"`     // 关联ID
	Name      string    `json:"name"`       //操作用户
	Module    int8      `json:"module"`     //操作名称
	Context   string    `json:"context"`    //操作内容
	Ctime     time.Time `json:"ctime"`      //创建时间
	CtimeUnix int64     `json:"ctime_unix"` //创建时间
}

Log def.

type Punishment

type Punishment struct {
	ID     int64
	Mid    int64
	Type   int8   //惩罚类型 1.自动封禁
	Reason string //惩罚原因
	CTime  time.Time
}

Punishment def.

type Report

type Report struct {
	ID          int64
	Name        string
	DateVersion string
	Val         int64
	Ctime       time.Time
}

Report etc.

type ReportDto

type ReportDto struct {
	ID          int64  `json:"id"`
	Name        string `json:"name"`
	DateVersion string `json:"date_version"`
	Val         int64  `json:"val"`
	Ctime       int64  `json:"ctime"`
}

ReportDto etc.

type ReportPage

type ReportPage struct {
	TotalCount int          `json:"total_count"`
	Pn         int          `json:"pn"`
	Ps         int          `json:"ps"`
	Items      []*ReportDto `json:"items"`
}

ReportPage def.

type Service

type Service struct {
	ID       int64
	Name     string //服务标识
	NickName string //服务可读昵称
	Status   int8
	CTime    time.Time
	MTime    time.Time
}

Service def.

type Setting

type Setting struct {
	ID       int64     `json:"id"`
	Property string    `json:"property"`
	Name     string    `json:"name"`
	Val      string    `json:"val"`
	CTime    time.Time `json:"ctime"`
	MTime    time.Time `json:"mtime"`
}

Setting def.

type StatPage

type StatPage struct {
	TotalCount int64         `json:"total_count"`
	Pn         int           `json:"pn"`
	Ps         int           `json:"ps"`
	Items      []*Statistics `json:"items"`
}

StatPage def.

type Statistics

type Statistics struct {
	ID        int64     `json:"id"`
	TargetMid int64     `json:"target_mid"`
	TargetID  int64     `json:"target_id"`
	EventID   int64     `json:"event_id"`
	State     int8      `json:"state"`
	Type      int8      `json:"type"`
	Isdel     int8      `json:"is_del"`
	Quantity  int64     `json:"quantity"`
	EventName string    `json:"event_name"`
	Ctime     time.Time `json:"ctime"`
	Mtime     time.Time `json:"mtime"`
	CtimeUnix int64     `json:"ctimeunix"`
	MtimeUnix int64     `json:"mtimeunix"`
}

Statistics def.

type UserInfo

type UserInfo struct {
	ID          int64     `json:"id"`
	Mid         int64     `json:"mid"`
	State       int8      `json:"state"`        //状态  0.正常  1.封禁
	Score       int8      `json:"score"`        //真实分值
	BaseScore   int8      `json:"base_score"`   //基础信息得分
	EventScore  int8      `json:"event_score"`  //事件得分
	ReliveTimes int8      `json:"relive_times"` //累计重绘次数
	Mtime       time.Time `json:"mtime"`
}

UserInfo def.

type UserInfoDto

type UserInfoDto struct {
	ID          int64  `json:"id"`
	Mid         int64  `json:"mid"`
	Name        string `json:"name"`         //昵称
	State       int8   `json:"state"`        //状态  0.正常  1.封禁
	Score       int8   `json:"score"`        //真实分值
	BaseScore   int8   `json:"base_score"`   //基础信息得分
	EventScore  int8   `json:"event_score"`  //事件得分
	ReliveTimes int8   `json:"relive_times"` //累计重绘次数
	Mtime       int64  `json:"mtime"`        //更新时间
}

UserInfoDto dto.

Jump to

Keyboard shortcuts

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