parent
8e28291aab
commit
3554e1b7ae
@ -0,0 +1,20 @@
|
|||||||
|
package models
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
|
type User_client struct {
|
||||||
|
ID uint `gorm:"primary_key" json:"id"`
|
||||||
|
Kefu string `json:"kefu"`
|
||||||
|
Client_id string `json:"client_id"`
|
||||||
|
Created_at string `json:"created_at"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func CreateUserClient(kefu, clientId string) uint {
|
||||||
|
u := &User_client{
|
||||||
|
Kefu: kefu,
|
||||||
|
Client_id: clientId,
|
||||||
|
Created_at: time.Now().Format("2006-01-02 15:04:05"),
|
||||||
|
}
|
||||||
|
DB.Create(u)
|
||||||
|
return u.ID
|
||||||
|
}
|
Loading…
Reference in new issue