63 lines
2.5 KiB
Go
63 lines
2.5 KiB
Go
package business
|
|
|
|
import "time"
|
|
|
|
type alertRulePO struct {
|
|
ConditionMode int `gorm:"not null;default:1"`
|
|
AmountDirection int `gorm:"not null;default:1"`
|
|
AmountThreshold *string `gorm:"type:decimal(14,2)"`
|
|
ID uint64 `gorm:"primaryKey"`
|
|
RuleName string `gorm:"size:100;not null"`
|
|
RuleType string `gorm:"size:50;not null"`
|
|
MonitorMetric int `gorm:"type:tinyint;not null"`
|
|
StatPeriodDays *int `gorm:"type:int"`
|
|
MomDirection *int `gorm:"type:tinyint"`
|
|
MomThreshold *string `gorm:"type:decimal(7,2)"`
|
|
UnloginDays *int `gorm:"type:int"`
|
|
MonitorScope int `gorm:"type:tinyint;not null;default:1"`
|
|
WarningColor string `gorm:"size:20;not null"`
|
|
CreatorID uint `gorm:"index;not null"`
|
|
Enabled int `gorm:"type:tinyint;not null;default:1"`
|
|
IsDeleted int `gorm:"type:tinyint;not null;default:0"`
|
|
CreatedAt, UpdatedAt time.Time
|
|
}
|
|
|
|
func (alertRulePO) TableName() string { return "sys_alert_rule" }
|
|
|
|
type alertRecordPO struct {
|
|
IndependentRule bool `gorm:"not null;default:0"`
|
|
TotalPlayers *int64
|
|
TotalPay *string `gorm:"type:decimal(20,2)"`
|
|
WarningColor *string `gorm:"size:20"`
|
|
ID uint64 `gorm:"primaryKey"`
|
|
PlatformCode, PlatformName string `gorm:"size:50"`
|
|
RuleID uint64
|
|
RuleName string `gorm:"size:100"`
|
|
RuleType string `gorm:"size:50"`
|
|
MonitorMetric *int
|
|
TargetPromoteID uint64
|
|
TargetPromoteName string `gorm:"size:100"`
|
|
BusinessID uint `gorm:"index"`
|
|
BusinessName string `gorm:"size:100"`
|
|
AlertContent string `gorm:"type:text"`
|
|
Status int `gorm:"type:tinyint;default:1;index"`
|
|
AlertDate *time.Time `gorm:"type:date"`
|
|
CreatedAt, UpdatedAt time.Time
|
|
}
|
|
|
|
func (alertRecordPO) TableName() string { return "sys_alert_record" }
|
|
|
|
type alertLogPO struct {
|
|
ID uint64 `gorm:"primaryKey"`
|
|
AlertID uint64 `gorm:"index"`
|
|
OperatorID uint
|
|
OperatorName string `gorm:"size:50"`
|
|
LogType int
|
|
ActionDetail string `gorm:"size:100"`
|
|
NoteContent string `gorm:"type:text"`
|
|
AttachmentIDs *string `gorm:"type:json"`
|
|
CreatedAt time.Time
|
|
}
|
|
|
|
func (alertLogPO) TableName() string { return "sys_alert_operation_log" }
|