model

package
v0.0.0-...-65cef84 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2019 License: BSD-2-Clause 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 `sql:",pk,unique"`
	CreatedAt time.Time
	UpdatedAt time.Time
	Title     string `schema:"title"`
	Content   string `schema:"content"`
	Username  string `schema:"username"`
}

func NewArticle

func NewArticle(title, content, username string) *Article

func (*Article) BeforeInsert

func (m *Article) BeforeInsert() error

func (*Article) BeforeUpdate

func (m *Article) BeforeUpdate() error

Jump to

Keyboard shortcuts

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