mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-14 22:56:35 +08:00
实现IP名单管理
This commit is contained in:
34
internal/db/models/ip_list_model.go
Normal file
34
internal/db/models/ip_list_model.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package models
|
||||
|
||||
// IP名单
|
||||
type IPList struct {
|
||||
Id uint32 `field:"id"` // ID
|
||||
IsOn uint8 `field:"isOn"` // 是否启用
|
||||
Type string `field:"type"` // 类型
|
||||
AdminId uint32 `field:"adminId"` // 用户ID
|
||||
UserId uint32 `field:"userId"` // 用户ID
|
||||
Name string `field:"name"` // 列表名
|
||||
Code string `field:"code"` // 代号
|
||||
State uint8 `field:"state"` // 状态
|
||||
CreatedAt uint64 `field:"createdAt"` // 创建时间
|
||||
Timeout string `field:"timeout"` // 默认超时时间
|
||||
Version uint64 `field:"version"` // 版本
|
||||
}
|
||||
|
||||
type IPListOperator struct {
|
||||
Id interface{} // ID
|
||||
IsOn interface{} // 是否启用
|
||||
Type interface{} // 类型
|
||||
AdminId interface{} // 用户ID
|
||||
UserId interface{} // 用户ID
|
||||
Name interface{} // 列表名
|
||||
Code interface{} // 代号
|
||||
State interface{} // 状态
|
||||
CreatedAt interface{} // 创建时间
|
||||
Timeout interface{} // 默认超时时间
|
||||
Version interface{} // 版本
|
||||
}
|
||||
|
||||
func NewIPListOperator() *IPListOperator {
|
||||
return &IPListOperator{}
|
||||
}
|
||||
Reference in New Issue
Block a user