daddy/internal/model/user.go

20 lines
397 B
Go
Raw Permalink Normal View History

package model
import (
"time"
"github.com/jinzhu/gorm"
)
type User struct {
gorm.Model
Name *string `json:"name"`
Email string `json:"email" gorm:"unique;not null"`
ConnectedAt time.Time `json:"connectedAt"`
Workgroups []*Workgroup `gorm:"many2many:users_workgroups;association_autoupdate:false"`
}
type ProfileChanges struct {
Name *string `json:"name"`
}