subhub/data/models/user.go

20 lines
296 B
Go
Raw Normal View History

2019-09-07 16:10:28 +00:00
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"`
}