implemented verifiaction db
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/tech/sendico/pkg/db/storable"
|
||||
"github.com/tech/sendico/pkg/mservice"
|
||||
"go.mongodb.org/mongo-driver/v2/bson"
|
||||
@@ -27,11 +29,10 @@ type AccountPublic struct {
|
||||
}
|
||||
|
||||
type Account struct {
|
||||
AccountPublic `bson:",inline" json:",inline"`
|
||||
EmailBackup string `bson:"emailBackup" json:"emailBackup"`
|
||||
Password string `bson:"password" json:"password"`
|
||||
ResetPasswordToken string `bson:"resetPasswordToken" json:"resetPasswordToken"`
|
||||
VerifyToken string `bson:"verifyToken" json:"verifyToken"`
|
||||
AccountPublic `bson:",inline" json:",inline"`
|
||||
EmailBackup string `bson:"emailBackup" json:"-"`
|
||||
Password string `bson:"password" json:"-"` // password hash
|
||||
EmailVerifiedAt *time.Time `bson:"emailVerifiedAt,omitempty" json:"-"`
|
||||
}
|
||||
|
||||
func (a *Account) HashPassword() error {
|
||||
|
||||
Reference in New Issue
Block a user