models

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2017 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 Category

type Category struct {
	ID        int       `db:"id"`
	Name      string    `db:"name"`
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`
}

type Doc

type Doc struct {
	ID           int       `db:"id"`
	Title        string    `db:"title"`
	CategoryID   int       `db:"category_id"`
	CategoryName string    `db:"category_name"`
	ProjectID    int       `db:"project_id"`
	ProjectName  string    `db:"project_name"`
	Label        string    `db:"label"`
	Markdown     string    `db:"markdown"`
	CreatedAt    time.Time `db:"created_at"`
	UpdatedAt    time.Time `db:"updated_at"`
}

type History

type History struct {
	ID         int       `db:"id"`
	UserID     int       `db:"user_id"`
	UserName   string    `db:"username"`
	CategoryID int       `db:"category_id"`
	ProjectID  int       `db:"project_id"`
	Flag       int       `db:"flag"`
	CreatedAt  time.Time `db:"created_at"`
	UpdatedAt  time.Time `db:"updated_at"`
}

type Identity

type Identity struct {
	ID            int       `db:"id" json:"id"`
	Name          string    `db:"name" json:"name"`
	Email         string    `db:"email" json:"email"`
	Password      string    `db:"password" json:"password"`
	Salt          string    `db:"salt" json:"salt"`
	Role          int       `db:"role" json:"role"`
	LastLoginIP   string    `db:"last_login_ip" json:"last_login_ip"`
	LastLoginTime time.Time `db:"last_login_time" json:"last_login_time"`
}

type Project

type Project struct {
	ID           int       `db:"id"`
	Name         string    `db:"name"`
	CategoryID   int       `db:"category_id"`
	CategoryName string    `db:"category_name"`
	Description  string    `db:"description"`
	CreatedAt    time.Time `db:"created_at"`
	UpdatedAt    time.Time `db:"updated_at"`
}

type User

type User struct {
	ID            int       `db:"id"`
	Name          string    `db:"name"`
	Email         string    `db:"email"`
	Role          int       `db:"role"`
	LastLoginIP   string    `db:"last_login_ip"`
	LastLoginTime time.Time `db:"last_login_time"`
	CreatedAt     time.Time `db:"created_at"`
	UpdatedAt     time.Time `db:"updated_at"`
}

Jump to

Keyboard shortcuts

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