mirror of
https://github.com/mgerb/go-discord-bot
synced 2026-01-10 09:02:49 +00:00
play sounds from web ui - store uploaded sounds in database
This commit is contained in:
28
server/webserver/model/user.go
Normal file
28
server/webserver/model/user.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/jinzhu/gorm"
|
||||
)
|
||||
|
||||
// User -
|
||||
type User struct {
|
||||
ID string `gorm:"primary_key" json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
DeletedAt *time.Time `json:"deleted_at"`
|
||||
Email string `json:"email"`
|
||||
Username string `json:"username"`
|
||||
Avatar string `json:"avatar"`
|
||||
Discriminator string `json:"discriminator"`
|
||||
Token string `gorm:"-" json:"token"`
|
||||
Verified bool `json:"verified"`
|
||||
MFAEnabled bool `json:"mfa_enabled"`
|
||||
Bot bool `json:"bot"`
|
||||
}
|
||||
|
||||
// UserSave -
|
||||
func UserSave(conn *gorm.DB, u *User) error {
|
||||
return conn.Save(u).Error
|
||||
}
|
||||
Reference in New Issue
Block a user