|
@@ -1,12 +1,16 @@
|
|
|
package models
|
|
|
|
|
|
+import (
|
|
|
+ "time"
|
|
|
+)
|
|
|
+
|
|
|
// Whitelist ip白名单
|
|
|
type Whitelist struct {
|
|
|
- Id string `gorm:"column:id;primaryKey" json:"id" bson:"_id"`
|
|
|
- IP string `json:"ip" bson:"ip"` // Ip
|
|
|
- Desc string `gorm:"column:desc;comment:描述" json:"desc" bson:"desc"`
|
|
|
- CreatedAt uint64 `gorm:"column:created_at;autoCreateTime" json:"created_at" bson:"created_at"`
|
|
|
- DeletedAt uint64 `gorm:"column:deleted_at;" json:"deleted_at" bson:"deleted_at"`
|
|
|
+ Id string `gorm:"column:id;primaryKey" json:"id" bson:"_id"`
|
|
|
+ IP string `json:"ip" bson:"ip"` // Ip
|
|
|
+ Desc string `gorm:"column:desc;comment:描述" json:"desc" bson:"desc"`
|
|
|
+ CreatedAt time.Time `gorm:"column:created_at;autoCreateTime" json:"created_at" bson:"created_at"`
|
|
|
+ DeletedAt time.Time `gorm:"column:deleted_at;" json:"deleted_at" bson:"deleted_at"`
|
|
|
}
|
|
|
|
|
|
func (w *Whitelist) TableName() string {
|