add signup resolver

This commit is contained in:
Lakhan Samani
2021-07-12 23:52:16 +05:30
parent 54bb923e9a
commit 04a522c947
19 changed files with 2828 additions and 311 deletions

View File

@@ -2,19 +2,69 @@
package model
type NewTodo struct {
Text string `json:"text"`
UserID string `json:"userId"`
type Response interface {
IsResponse()
}
type Todo struct {
ID string `json:"id"`
Text string `json:"text"`
Done bool `json:"done"`
User *User `json:"user"`
type BasicAuthLoginInput struct {
Email string `json:"email"`
Password string `json:"password"`
}
type BasicAuthLoginResponse struct {
Success bool `json:"success"`
Message string `json:"message"`
Errors []*Error `json:"errors"`
StatusCode int `json:"statusCode"`
RefreshToken *string `json:"refreshToken"`
User *User `json:"user"`
}
func (BasicAuthLoginResponse) IsResponse() {}
type BasicAuthSignupInput struct {
FirstName *string `json:"firstName"`
LastName *string `json:"lastName"`
Email string `json:"email"`
Password string `json:"password"`
CofirmPassword string `json:"cofirmPassword"`
Image *string `json:"image"`
}
type BasicAuthSignupResponse struct {
Success bool `json:"success"`
Message string `json:"message"`
Errors []*Error `json:"errors"`
StatusCode int `json:"statusCode"`
User *User `json:"user"`
}
func (BasicAuthSignupResponse) IsResponse() {}
type Error struct {
Message string `json:"message"`
Reason string `json:"reason"`
}
type User struct {
ID string `json:"id"`
Name string `json:"name"`
ID string `json:"id"`
Email string `json:"email"`
SignUpMethod string `json:"SignUpMethod"`
FirstName *string `json:"firstName"`
LastName *string `json:"lastName"`
EmailVerifiedAt *int64 `json:"emailVerifiedAt"`
Password *string `json:"password"`
Image *string `json:"image"`
CreatedAt *int64 `json:"createdAt"`
UpdatedAt *int64 `json:"updatedAt"`
}
type VerificationRequest struct {
ID string `json:"id"`
Identifier *string `json:"identifier"`
Token *string `json:"token"`
Email *string `json:"email"`
Expires *int64 `json:"expires"`
CreatedAt *int64 `json:"createdAt"`
UpdatedAt *int64 `json:"updatedAt"`
}