Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comment ¶
type CommentUpdate ¶
type CommentUpdate struct {
Message string `json:"message" gorm:"not null" valid:"required"`
}
type LoginCredential ¶
type Photo ¶
type Photo struct { ID uint `json:"id" gorm:"primaryKey" ` Title string `json:"title" gorm:"not null" valid:"required"` Caption string `json:"caption"` PhotoURL string `json:"photo_url" gorm:"not null" valid:"required"` UserID uint `json:"user_id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` User *User Comments []Comment }
type PhotoUpdate ¶
type SocialMedia ¶
type SocialMedia struct { ID uint `json:"id,omitempty" gorm:"primaryKey" ` Name string `json:"name" gorm:"not null" valid:"required~Name is required"` SocialMediaURL string `json:"social_media_url" gorm:"not null" valid:"required~Social media url is required"` UserID uint `json:"user_id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` User *User }
type SocialMediaCreate ¶
type SocialMediaUpdate ¶
type User ¶
type User struct { ID uint `gorm:"primaryKey" json:"id"` Email string `gorm:"not null;unique" json:"email" valid:"required,email"` Username string `gorm:"not null;unique" json:"username" valid:"required"` Password string `gorm:"not null" json:"password" valid:"required,minstringlength(6)"` Age int `gorm:"not null" json:"age" valid:"required,range(8|150)"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Photos []Photo Comments []Comment SocialMedias []SocialMedia }
type UserUpdate ¶
Click to show internal directories.
Click to hide internal directories.