2024-01-16 01:58:20 +00:00
|
|
|
package models
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
2024-02-29 02:20:05 +00:00
|
|
|
|
|
|
|
"gorm.io/gorm"
|
2024-01-16 01:58:20 +00:00
|
|
|
)
|
|
|
|
|
2024-02-29 02:20:05 +00:00
|
|
|
func init() {
|
|
|
|
registerModel(&Blocklist{})
|
|
|
|
}
|
|
|
|
|
2024-01-16 01:58:20 +00:00
|
|
|
type Blocklist struct {
|
|
|
|
gorm.Model
|
|
|
|
IP string
|
|
|
|
Reason string
|
|
|
|
BlockedAt time.Time
|
|
|
|
}
|
2024-01-16 05:11:12 +00:00
|
|
|
|
|
|
|
func (Blocklist) TableName() string {
|
|
|
|
return "blocklist"
|
|
|
|
}
|