You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
349 B
19 lines
349 B
package models
|
|
|
|
import "time"
|
|
|
|
type Ipblack struct{
|
|
ID uint `gorm:"primary_key" json:"id"`
|
|
IP string `json:"ip"`
|
|
KefuId string `json:"kefu_id"`
|
|
CreateAt time.Time `json:"create_at"`
|
|
}
|
|
func CreateIpblack(ip string,kefuId string)uint{
|
|
black:=&Ipblack{
|
|
IP:ip,
|
|
KefuId: kefuId,
|
|
CreateAt: time.Now(),
|
|
}
|
|
DB.Create(black)
|
|
return black.ID
|
|
} |