-
Notifications
You must be signed in to change notification settings - Fork 0
/
user.go
28 lines (25 loc) · 997 Bytes
/
user.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
package schema
import (
"go.mongodb.org/mongo-driver/bson/primitive"
)
type User struct {
ObjectId primitive.ObjectID `bson:"_id"`
Name string `bson:"name"`
Avatar string `bson:"avatar"`
Company string `bson:"company"`
Email string `bson:"email"`
Website string `bson:"website"`
Socials []string `bson:"socials"`
Membership bool `bson:"membership"`
MembershipAt int64 `bson:"membershipat"`
MembershipEnd int64 `bson:"membershipend"`
StripeId string `bson:"stripeid"`
CreatedAt int64 `bson:"createdat"`
UpdatedAt int64 `bson:"updatedat"`
DeactivatedAt int64 `bson:"deactivatedat"`
NewsModel bool `bson:"newsmodel"`
NewsMethod bool `bson:"newsmethod"`
}
func (u *User) GetInitial() string {
return string(u.Name[0])
}