model

package
v0.0.0-...-b92c7d0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL