47 lines
1.4 KiB
Go
47 lines
1.4 KiB
Go
package models
|
|
|
|
import (
|
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
|
"time"
|
|
)
|
|
|
|
type User struct {
|
|
ID primitive.ObjectID `bson:"_id,omitempty"`
|
|
Login string `bson:"login,omitempty"`
|
|
Email string `bson:"email,omitempty"`
|
|
Password string `bson:"password,omitempty"`
|
|
PhoneNumber string `bson:"phoneNumber,omitempty"`
|
|
IsDeleted bool `bson:"isDeleted,omitempty"`
|
|
CreatedAt time.Time `bson:"createdAt,omitempty"`
|
|
UpdatedAt time.Time `bson:"updatedAt,omitempty"`
|
|
DeletedAt *time.Time `bson:"deletedAt,omitempty"`
|
|
}
|
|
|
|
type RestoreRequest struct {
|
|
ID primitive.ObjectID `bson:"_id,omitempty"`
|
|
CreatedAt time.Time `bson:"created_at,omitempty"`
|
|
Sign string `bson:"sign,omitempty"`
|
|
SignUrl string `bson:"sign_url,omitempty"`
|
|
SignID string `bson:"sign_id"`
|
|
Email string `bson:"email,omitempty"`
|
|
UserID string `bson:"user_id,omitempty"`
|
|
Sent bool `bson:"sent"`
|
|
SentAt time.Time `bson:"sent_at"`
|
|
}
|
|
|
|
type RecoveryRecord struct {
|
|
ID string
|
|
UserID string
|
|
Email string
|
|
Key string
|
|
}
|
|
|
|
type RecoveryRequest struct {
|
|
Email string `json:"email"`
|
|
RedirectionURL string `json:"redirectionURL"`
|
|
}
|
|
|
|
type RecoveryLinkRequest struct {
|
|
Sign string `json:"sign"`
|
|
}
|