subhub/data/models/user.go
2019-09-07 19:10:28 +03:00

20 lines
296 B
Go

package models
import (
"github.com/jinzhu/gorm"
)
type User struct {
gorm.Model
Name string
Role string `gorm:"size:255"`
Groups []Group `gorm:"foreignkey:UserID"`
}
type Profile struct {
gorm.Model
UserID int
User User
Email string `gorm:"type:varchar(100);unique_index"`
}