Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterModels ¶
func RegisterModels() []string
Types ¶
type CoursePreferences ¶
type CoursePreferences struct { PreferredLearningMode string `bson:"preferredLearningMode" json:"preferredLearningMode"` Availability []string `bson:"availability" json:"availability"` PreferredInstructors []string `bson:"preferredInstructors,omitempty" json:"preferredInstructors,omitempty"` // this may change when Instructor model is implemented }
type MusicalInfo ¶
type MusicalInfo struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"` UserID primitive.ObjectID `bson:"userID" json:"userID"` // Reference to the User SkillLevel string `bson:"skillLevel" json:"skillLevel"` PrimaryInstrument string `bson:"primaryInstrument" json:"primaryInstrument"` SecondaryInstruments []string `bson:"secondaryInstruments,omitempty" json:"secondaryInstruments,omitempty"` Genres []string `bson:"genres" json:"genres"` FavoriteArtists []string `bson:"favoriteArtists,omitempty" json:"favoriteArtists,omitempty"` LearningGoals []string `bson:"learningGoals,omitempty" json:"learningGoals,omitempty"` }
MusicalInfo struct for user's musical details
type User ¶
type User struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"id"` FirstName string `bson:"firstName" json:"firstName"` LastName string `bson:"lastName" json:"lastName"` Email string `bson:"email" json:"email"` Password string `bson:"password" json:"password"` RememberToken string `bson:"rememberToken,omitempty" json:"rememberToken,omitempty"` Phone string `bson:"phone" json:"phone"` Birthday time.Time `bson:"birthday,omitempty" json:"birthday,omitempty"` Gender string `bson:"gender,omitempty" json:"gender,omitempty"` Nationality string `bson:"nationality,omitempty" json:"nationality,omitempty"` Bio string `bson:"bio,omitempty" json:"bio,omitempty"` ProfilePicture string `bson:"profilePicture,omitempty" json:"profilePicture,omitempty"` Address Address `bson:"address,omitempty" json:"address,omitempty"` MusicalInfoID primitive.ObjectID `bson:"musicalInfoID,omitempty" json:"musicalInfoID,omitempty"` // Reference to MusicalInformation CoursePrefs CoursePreferences `bson:"coursePreferences" json:"coursePreferences"` // Using embedded approach for now, will be change when Instructor model is implemented CreatedAt time.Time `bson:"createdAt" json:"createdAt"` UpdatedAt time.Time `bson:"updatedAt" json:"updatedAt"` DeletedAt *time.Time `bson:"deletedAt,omitempty" json:"deletedAt,omitempty"` }
func (*User) SoftDelete ¶
func (u *User) SoftDelete()
SoftDelete sets the DeletedAt field to the current time to mark an entry as deleted.
Click to show internal directories.
Click to hide internal directories.