-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add CoursePreferences, MusicalInformation model
- Loading branch information
1 parent
186f5ec
commit ca85e57
Showing
6 changed files
with
66 additions
and
35 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,15 +1,21 @@ | ||
package profile | ||
|
||
import model "github.com/donaderoyan/talentgrowth-be/models" | ||
|
||
type UpdateProfileInput struct { | ||
FirstName string `json:"firstName" validate:"required,alpha" updateValidation:"omitempty,alpha"` | ||
LastName string `json:"lastName" validate:"required,alpha" updateValidation:"omitempty,alpha"` | ||
Phone string `json:"phone" validate:"required,e164" updateValidation:"omitempty,e164"` | ||
Address model.Address `json:"address" validate:"omitempty" updateValidation:"omitempty"` | ||
Birthday string `json:"birthday" validate:"omitempty,customdate,datebeforetoday" updateValidation:"omitempty,customdate,datebeforetoday"` | ||
Gender string `json:"gender" validate:"omitempty,oneof=male female" updateValidation:"omitempty,oneof=male female"` | ||
Nationality string `json:"nationality" validate:"omitempty" updateValidation:"omitempty"` | ||
Bio string `json:"bio" validate:"omitempty" updateValidation:"omitempty"` | ||
ProfilePicture string `json:"profilePicture" validate:"omitempty,url" updateValidation:"omitempty,url"` | ||
FirstName string `json:"firstName" validate:"required,alpha" updateValidation:"omitempty,alpha"` | ||
LastName string `json:"lastName" validate:"required,alpha" updateValidation:"omitempty,alpha"` | ||
Phone string `json:"phone" validate:"required,e164" updateValidation:"omitempty,e164"` | ||
Address Address `json:"address" validate:"omitempty" updateValidation:"omitempty"` | ||
Birthday string `json:"birthday" validate:"omitempty,customdate,datebeforetoday" updateValidation:"omitempty,customdate,datebeforetoday"` | ||
Gender string `json:"gender" validate:"omitempty,oneof=male female" updateValidation:"omitempty,oneof=male female"` | ||
Nationality string `json:"nationality" validate:"omitempty" updateValidation:"omitempty"` | ||
Bio string `json:"bio" validate:"omitempty" updateValidation:"omitempty"` | ||
ProfilePicture string `json:"profilePicture" validate:"omitempty,url" updateValidation:"omitempty,url"` | ||
} | ||
|
||
type Address struct { | ||
Street string `json:"street,omitempty" validate:"omitempty" updateValidation:"omitempty"` | ||
City string `json:"city" validate:"required" updateValidation:"omitempty"` | ||
State string `json:"state" validate:"required" updateValidation:"omitempty"` | ||
PostalCode string `json:"postalCode" validate:"required" updateValidation:"omitempty"` | ||
Country string `json:"country" validate:"required" updateValidation:"omitempty"` | ||
} |
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,7 @@ | ||
package model | ||
|
||
type CoursePreferences struct { | ||
PreferredLearningMode string `bson:"preferred_learning_mode" json:"preferred_learning_mode"` | ||
Availability []string `bson:"availability" json:"availability"` | ||
PreferredInstructors []string `bson:"preferred_instructors,omitempty" json:"preferred_instructors,omitempty"` // this may change when Instructor model is implemented | ||
} |
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,15 @@ | ||
package model | ||
|
||
import "go.mongodb.org/mongo-driver/bson/primitive" | ||
|
||
// MusicalInformation struct for user's musical details | ||
type MusicalInformation struct { | ||
ID primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"` | ||
UserID primitive.ObjectID `bson:"user_id" json:"user_id"` // Reference to the User | ||
SkillLevel string `bson:"skill_level" json:"skill_level"` | ||
PrimaryInstrument string `bson:"primary_instrument" json:"primary_instrument"` | ||
SecondaryInstruments []string `bson:"secondary_instruments,omitempty" json:"secondary_instruments,omitempty"` | ||
Genres []string `bson:"genres" json:"genres"` | ||
FavoriteArtists []string `bson:"favorite_artists,omitempty" json:"favorite_artists,omitempty"` | ||
LearningGoals []string `bson:"learning_goals,omitempty" json:"learning_goals,omitempty"` | ||
} |
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