11 lines
319 B
Go
11 lines
319 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 `json:"articles" gorm:"foreignKey:Author"`
|
|
}
|