Полная зачистка legacy + закрытие fix24.1/fix24.2 + обновление логотипа

This commit is contained in:
2026-05-08 23:16:25 +05:00
parent de4a65a959
commit 1bca73814e
85 changed files with 4119 additions and 1911 deletions
+17
View File
@@ -0,0 +1,17 @@
package entity
type AdminUser struct {
Username *string `gorm:"column:username;default:''" json:"username"`
PasswordHash *string `gorm:"column:password_hash;default:''" json:"passwordHash"`
Status *int64 `gorm:"column:status;default:1" json:"status"`
ForcePasswordChange *int64 `gorm:"column:force_password_change;default:0" json:"forcePasswordChange"`
LastLoginAt *int64 `gorm:"column:last_login_at;default:0" json:"lastLoginAt"`
PasswordChangedAt *int64 `gorm:"column:password_changed_at;default:0" json:"passwordChangedAt"`
TokenVersion *int64 `gorm:"column:token_version;default:1" json:"tokenVersion"`
BaseEntity `gorm:"embedded"`
}
func (AdminUser) TableName() string {
return "admin_user"
}
+23
View File
@@ -0,0 +1,23 @@
package entity
type MetricSample struct {
BaseEntity
SampledAt *int64 `gorm:"column:sampled_at"`
CpuPercent *float64 `gorm:"column:cpu_percent"`
Load1 *float64 `gorm:"column:load1"`
MemUsedBytes *int64 `gorm:"column:mem_used_bytes"`
MemTotalBytes *int64 `gorm:"column:mem_total_bytes"`
MemPercent *float64 `gorm:"column:mem_percent"`
DiskPath *string `gorm:"column:disk_path"`
DiskUsedBytes *int64 `gorm:"column:disk_used_bytes"`
DiskTotalBytes *int64 `gorm:"column:disk_total_bytes"`
DiskPercent *float64 `gorm:"column:disk_percent"`
HysteriaRunning *int64 `gorm:"column:hysteria_running"`
OnlinePeers *int64 `gorm:"column:online_peers"`
OnlineDevices *int64 `gorm:"column:online_devices"`
}
func (MetricSample) TableName() string {
return "metric_sample"
}
+23
View File
@@ -0,0 +1,23 @@
package entity
type Peer struct {
Name *string `gorm:"column:name;default:''" json:"name"`
Remark *string `gorm:"column:remark;default:''" json:"remark"`
AuthId *string `gorm:"column:auth_id;default:''" json:"authId"`
SecretDigest *string `gorm:"column:secret_digest;default:''" json:"secretDigest"`
SecretCiphertext *string `gorm:"column:secret_ciphertext;default:''" json:"secretCiphertext"`
QuotaBytes *int64 `gorm:"column:quota_bytes;default:0" json:"quotaBytes"`
DownloadBytes *int64 `gorm:"column:download_bytes;default:0" json:"downloadBytes"`
UploadBytes *int64 `gorm:"column:upload_bytes;default:0" json:"uploadBytes"`
ExpiresAt *int64 `gorm:"column:expires_at;default:0" json:"expiresAt"`
MaxDevices *int64 `gorm:"column:max_devices;default:3" json:"maxDevices"`
Disabled *int64 `gorm:"column:disabled;default:0" json:"disabled"`
BannedUntil *int64 `gorm:"column:banned_until;default:0" json:"bannedUntil"`
LastConnectionAt *int64 `gorm:"column:last_connection_at;default:0" json:"lastConnectionAt"`
BaseEntity `gorm:"embedded"`
}
func (Peer) TableName() string {
return "peer"
}
@@ -0,0 +1,14 @@
package entity
type TrafficAggregateDaily struct {
PeerId *int64 `gorm:"column:peer_id;default:0;primaryKey" json:"peerId"`
DayStart *int64 `gorm:"column:day_start;default:0;primaryKey" json:"dayStart"`
RxBytes *int64 `gorm:"column:rx_bytes;default:0" json:"rxBytes"`
TxBytes *int64 `gorm:"column:tx_bytes;default:0" json:"txBytes"`
BaseEntity `gorm:"embedded"`
}
func (TrafficAggregateDaily) TableName() string {
return "traffic_aggregate_daily"
}
@@ -0,0 +1,14 @@
package entity
type TrafficAggregateHourly struct {
PeerId *int64 `gorm:"column:peer_id;default:0;primaryKey" json:"peerId"`
HourStart *int64 `gorm:"column:hour_start;default:0;primaryKey" json:"hourStart"`
RxBytes *int64 `gorm:"column:rx_bytes;default:0" json:"rxBytes"`
TxBytes *int64 `gorm:"column:tx_bytes;default:0" json:"txBytes"`
BaseEntity `gorm:"embedded"`
}
func (TrafficAggregateHourly) TableName() string {
return "traffic_aggregate_hourly"
}
+15
View File
@@ -0,0 +1,15 @@
package entity
type TrafficSample struct {
PeerId *int64 `gorm:"column:peer_id;default:0" json:"peerId"`
AuthId *string `gorm:"column:auth_id;default:''" json:"authId"`
RxBytes *int64 `gorm:"column:rx_bytes;default:0" json:"rxBytes"`
TxBytes *int64 `gorm:"column:tx_bytes;default:0" json:"txBytes"`
SampledAt *int64 `gorm:"column:sampled_at;default:0" json:"sampledAt"`
BaseEntity `gorm:"embedded"`
}
func (TrafficSample) TableName() string {
return "traffic_sample"
}