group_helper/models/user.go

12 lines
232 B
Go
Raw Normal View History

package models
type User struct {
ID uint `gorm:"primary_key" json:"id"`
UserID int64 `json:"user_id"`
Groups []*Group `json:"groups" gorm:"many2many:GroupUser;"`
}
func (User) TableName() string {
return "Users"
}