separate profile model from account model

This commit is contained in:
dhax 2017-10-13 00:11:57 +02:00
parent f729160209
commit c3271d7dcf
15 changed files with 152 additions and 83 deletions

View file

@ -5,7 +5,6 @@ import (
"strings"
"time"
"github.com/dhax/go-base/models"
"github.com/go-chi/jwtauth"
validation "github.com/go-ozzo/ozzo-validation"
"github.com/go-ozzo/ozzo-validation/is"
@ -24,8 +23,7 @@ type Account struct {
Active bool `sql:",notnull" json:"active"`
Roles []string `pg:",array" json:"roles,omitempty"`
Profile *models.Profile `json:"profile,omitempty"`
Token []*Token `json:"token,omitempty"`
Token []*Token `json:"token,omitempty"`
}
// BeforeInsert hook executed before database insert operation.