2020-03-22 12:49:08 +00:00
|
|
|
package model
|
|
|
|
|
|
|
|
// User representation of a user in storage
|
|
|
|
type User struct {
|
|
|
|
ID uint `json:"user_id" gorm:"primary_key"`
|
|
|
|
Username string `json:"username"`
|
|
|
|
Firstname string `json:"firstname"`
|
|
|
|
Lastname string `json:"lastname"`
|
2020-03-29 15:03:22 +00:00
|
|
|
Articles []Article `json:"articles" gorm:"foreignKey:Author"`
|
2020-03-22 12:49:08 +00:00
|
|
|
}
|