models

package
v0.0.0-...-6852176 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2022 License: MIT Imports: 1 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      int       `json:"id" db:"id"`
	Title   string    `json:"title" db:"title" binding:"required"`
	Text    string    `json:"text" db:"thesis"`
	PubTime time.Time `json:"-" db:"pub_time"`
}

type UpdateArticle

type UpdateArticle struct {
	Title string `json:"title"`
	Text  string `json:"text"`
}

type User

type User struct {
	Id       int    `json:"-"`
	Name     string `json:"name" db:"name" binding:"-"`
	Password string `json:"password" db:"hash_password" binding:"required"`
	Email    string `json:"email" db:"email" binding:"required"`
}

type UserArticle

type UserArticle struct {
	Id        int `db:"id"`
	UserId    int `db:"user_id"`
	ArticleId int `db:"article_id"`
}

Jump to

Keyboard shortcuts

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