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.
go-fly/models/ipblacks.go

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{
4 years ago
black:=&Ipblack{
IP:ip,
KefuId: kefuId,
CreateAt: time.Now(),
}
DB.Create(black)
return black.ID
}