tiny-url-ex/service/model/user.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"`
}