Cleaned up User Model
Cette révision appartient à :
Parent
8e686c47ab
révision
8a61b409fc
1 fichiers modifiés avec 1 ajouts et 15 suppressions
|
@ -36,8 +36,6 @@ type User struct {
|
||||||
LastLoginIp string `json:"lastLoginIp",sql:"size:100"`
|
LastLoginIp string `json:"lastLoginIp",sql:"size:100"`
|
||||||
CurrentLoginIp string `json:"currentLoginIp",sql:"size:100"`
|
CurrentLoginIp string `json:"currentLoginIp",sql:"size:100"`
|
||||||
|
|
||||||
Status Status `gorm:"many2one:users_status;"`
|
|
||||||
|
|
||||||
// Liking
|
// Liking
|
||||||
LikingCount int `json:"likingCount"`
|
LikingCount int `json:"likingCount"`
|
||||||
LikedCount int `json:"likedCount"`
|
LikedCount int `json:"likedCount"`
|
||||||
|
@ -46,7 +44,7 @@ type User struct {
|
||||||
|
|
||||||
//Connections []Connection
|
//Connections []Connection
|
||||||
|
|
||||||
Languages []Language `gorm:"many2many:user_languages;"` // Many To Many, user_languages is the join table
|
Languages string
|
||||||
Roles []Role `gorm:"many2many:users_roles;"` // Many To Many, users_roles
|
Roles []Role `gorm:"many2many:users_roles;"` // Many To Many, users_roles
|
||||||
Torrents []Torrents
|
Torrents []Torrents
|
||||||
}
|
}
|
||||||
|
@ -84,15 +82,3 @@ type PublicUser struct {
|
||||||
Roles omit `json:"roles,omitempty"`
|
Roles omit `json:"roles,omitempty"`
|
||||||
Torrents omit `json:"articles,omitempty"` //should user torrents not be displayed?
|
Torrents omit `json:"articles,omitempty"` //should user torrents not be displayed?
|
||||||
}
|
}
|
||||||
|
|
||||||
/*// Connection is a connection model for oauth.
|
|
||||||
type Connection struct {
|
|
||||||
Id uint `json:"id"`
|
|
||||||
UserId uint `json:"userId"`
|
|
||||||
ProviderId uint `gorm:"column:provider_id", json:"providerId"`
|
|
||||||
ProviderUserId string `gorm:"column:provider_user_id", json:"providerUserId"`
|
|
||||||
AccessToken string `json:"accessToken"`
|
|
||||||
ProfileUrl string `gorm:"column:profile_url", json:"profileUrl"`
|
|
||||||
ImageUrl string `gorm:"column:image_url", json:"imageUrl"`
|
|
||||||
}
|
|
||||||
*/
|
|
Référencer dans un nouveau ticket