articles-api/service/model/user.go

11 lines
319 B
Go
Raw Normal View History

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"`
}