Discover Packages
git.xdrm.io/go/tiny-url-ex
service
model
package
Version:
v0.0.0-...-b92c7d0
Opens a new window with list of versions in this module.
Published: Mar 29, 2020
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Article struct {
ID uint `json:"article_id" gorm:"primary_key"`
Author uint `json:"author"`
Title string `json:"title"`
Body string `json:"body"`
Score int
}
Article representation of an article 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"`
}
User representation of a user in storage
Source Files
¶
Click to show internal directories.
Click to hide internal directories.