-
Notifications
You must be signed in to change notification settings - Fork 58
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
Showing
18 changed files
with
982 additions
and
76 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
* @devhatt/hatts @devhatt/petdex-backend-administrators | ||
* @devhatt/hatts @devhatt/petdex-backend-administrators @devhatt/revisores |
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,2 @@ | ||
golang 1.21.5 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package dto | ||
|
||
type LinkDto struct { | ||
URL string `json:"url" example:"https://www.facebook.com/"` | ||
Text string `json:"text" example:"Facebook da Ong"` | ||
} |
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 |
---|---|---|
@@ -1,15 +1,9 @@ | ||
package dto | ||
|
||
type Link struct { | ||
URL string `json:"url" example:"https://www.facebook.com/"` | ||
Text string `json:"text" example:"Facebook da Ong"` | ||
} | ||
|
||
type OngUpdateDto struct { | ||
Phone string `json:"phone" db:"phone" example:"119596995887"` | ||
User UserUpdateDto | ||
OpeningHours string `json:"openingHours" example:"08:00"` | ||
AdoptionPolicy string `json:"adoptionPolicy" example:"não pode rato"` | ||
Links []Link `json:"links"` | ||
OpeningHours string `json:"openingHours" example:"08:00"` | ||
AdoptionPolicy string `json:"adoptionPolicy" example:"não pode rato"` | ||
Links []LinkDto `json:"links"` | ||
} | ||
|
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 |
---|---|---|
|
@@ -11,17 +11,17 @@ import ( | |
var userTypes = []string{"juridica", "fisica"} | ||
|
||
type UserInsertDto struct { | ||
Name string `json:"name"` | ||
Type string `json:"type"` | ||
Document string `json:"document"` | ||
AvatarURL string `json:"avatar_url"` | ||
Email string `json:"email"` | ||
Phone string `json:"phone"` | ||
Pass string `json:"pass"` | ||
BirthDate *time.Time `json:"birthdate"` | ||
City string `json:"city"` | ||
State string `json:"state"` | ||
Role string `json:"role"` | ||
Name string `json:"name" example:"Claúdio"` | ||
Type string `json:"type" example:"fisica"` | ||
Document string `json:"document" example:"12345678900"` | ||
AvatarURL string `json:"avatar_url" example:"https://example.com/avatar.jpg"` | ||
Email string `json:"email" example:"[email protected]"` | ||
Phone string `json:"phone" example:"21912345678"` | ||
Pass string `json:"pass" example:"Senhasegur@123"` | ||
BirthDate *time.Time `json:"birthdate" example:"2006-01-02T15:04:05Z"` | ||
City string `json:"city" example:"São Paulo"` | ||
State string `json:"state" example:"São Paulo"` | ||
Role string `json:"role" example:"developer"` | ||
} | ||
|
||
func (u *UserInsertDto) Validate() error { | ||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## Samples requests | ||
|
||
``` | ||
GET /api/ongs/ | ||
GET /api/ongs?limite=10&offset=2 | ||
GET /api/ongs?sortBy=name&order=asc | ||
``` |
Oops, something went wrong.