-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4c9433c
commit dc655e6
Showing
33 changed files
with
550 additions
and
207 deletions.
There are no files selected for viewing
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package dtos | ||
|
||
import "time" | ||
|
||
type ( | ||
UserDetailResponse struct { | ||
UserID int64 `json:"id"` | ||
Email string `json:"email"` | ||
Fullname string `json:"fullname"` | ||
PhoneNumber string `json:"phone_number"` | ||
UserType string `json:"user_type"` | ||
IsActive bool `json:"is_active"` | ||
CreatedAt time.Time `json:"created_at"` | ||
CreatedBy string `json:"created_by"` | ||
} | ||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package dtos | ||
|
||
import ( | ||
"github.com/invopop/validation" | ||
) | ||
|
||
type ( | ||
UserLoginRequest struct { | ||
Email string `json:"email"` | ||
Password string `json:"password"` | ||
} | ||
|
||
UserLoginResponse struct { | ||
AccessToken string `json:"access_token"` | ||
ExpiredAt int64 `json:"expired_at"` | ||
} | ||
) | ||
|
||
func (ulr UserLoginRequest) Validate() error { | ||
return validation.ValidateStruct(&ulr, | ||
validation.Field(&ulr.Email, validation.Required), | ||
validation.Field(&ulr.Password, validation.Required), | ||
) | ||
} |
Oops, something went wrong.