-
Notifications
You must be signed in to change notification settings - Fork 0
/
strcture.go
59 lines (51 loc) · 1.73 KB
/
strcture.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package user
import (
"time"
"go.mongodb.org/mongo-driver/bson/primitive"
)
// Complete user structure
type UserStrcture struct {
Email string `bson:"Email,omitempty"`
Image string `bson:"Image,omitempty"`
Password string `json:"Password,omitempty" bson:"Password,omitempty"`
FirstName string `bson:"FirstName,omitempty"`
LastName string `bson:"LastName,omitempty"`
Permissions string `bson:"Permissions,omitempty"`
Username string `bson:"Username,omitempty"`
Banned bool `bson:"Banned"`
Created_at time.Time `bson:"Created_at,omitempty"`
ID string `bson:"_id,omitempty"`
}
// Basic user structure
type BasicInfo struct {
Username string `bson:"Username,omitempty"`
FirstName string `bson:"FirstName,omitempty"`
LastName string `bson:"LastName,omitempty"`
Permissions string `bson:"Permissions,omitempty"`
Email string `bson:"Email,omitempty"`
ID string `bson:"_id,omitempty"`
Image string `bson:"Image,omitempty"`
Banned bool `bson:"Banned,omitempty"`
}
// Structure used in the logon record
type IpAddrUser struct {
IDuser primitive.ObjectID `bson:"IDuser"`
Date time.Time `bson:"Date"`
IpAddrs string `bson:"IpAddrs"`
DateOut time.Time `bson:"DateOut"`
UserAgent string `bson:"UserAgent"`
Uuidtoken string `bson:"Uuidtoken"`
}
// Structure of the login parameters
type LoginRequestStruct struct {
ID uint64 `json:"id"`
Email string `json:"Email"`
Password string `json:"Password"`
}
// Data
type Data []UserStrcture
// Account recovery structure only basic parameters
type RecoveryAccountStrctureTemplate struct {
Name string
UrlToken string
}