11 lines
303 B
Go
11 lines
303 B
Go
|
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"`
|
||
|
Articles []Article `gorm:"foreignKey:Author"`
|
||
|
}
|