Created
February 6, 2022 10:42
-
-
Save muhammadqazi/70bfd4361537664605b442040013104e to your computer and use it in GitHub Desktop.
Go-Authentication
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type UserModel struct { | |
ID primitive.ObjectID `bson:"_id"` | |
First_name string `json:"first_name" validate:"required,min=2,max=100"` | |
Last_name string `json:"last_name" validate:"required,min=2,max=100"` | |
Password string `json:"Password" validate:"required,min=6,max=20"` | |
Email string `json:"email" validate:"email,required"` | |
Phone int `json:"phone" validate:"required"` | |
Token string `json:"token"` | |
Refresh_token string `json:"refresh_token"` | |
Created_at time.Time `json:"created_at"` | |
Updated_at time.Time `json:"updated_at"` | |
User_id string `json:"user_id"` | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment