schema

package
v0.0.0-...-3208bda Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const AdminTableName = "admin"
View Source
const ArticleTableName = "article"
View Source
const RoleTableName = "role"

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

type Admin struct {
	ID         int64     `ddb:"id"`
	Avatar     string    `ddb:"avatar"`
	Email      string    `ddb:"email"`
	Name       string    `ddb:"name"`
	Password   string    `ddb:"password"`
	Salt       string    `ddb:"salt"`
	CreateAt   time.Time `ddb:"create_at"`
	UpdateAt   time.Time `ddb:"update_at"`
	Status     int8      `ddb:"status"`
	WxOpenID   string    `ddb:"wx_open_id"`
	WxUnionID  string    `ddb:"wx_union_id"`
	WxNickname string    `ddb:"wx_nickname"`
	WxAvatar   string    `ddb:"wx_avatar"`
}

Admin is a mapping object for admin table in mysql

func (*Admin) TableName

func (*Admin) TableName() string

type Article

type Article struct {
	Id         int       `ddb:"id" json:"id"`
	Author     string    `ddb:"author" json:"author"`
	Reviewer   string    `ddb:"reviewer" json:"reviewer"`
	Content    string    `ddb:"content" json:"content"`
	Forecast   float64   `ddb:"forecast" json:"forecast"`
	Importance int8      `ddb:"importance" json:"importance"`
	Type       int8      `ddb:"type" json:"type"`
	Status     int8      `ddb:"status" json:"status"`
	ImageUrl   string    `ddb:"image_url" json:"image_url"`
	Platforms  int8      `ddb:"platforms" json:"platforms"`
	CreateAt   time.Time `ddb:"create_at" json:"create_at"`
	UpdateAt   time.Time `ddb:"update_at" json:"update_at"`
}

Article is a mapping object for article table in mysql

func (*Article) TableName

func (*Article) TableName() string

type Role

type Role struct {
	ID          int64     `ddb:"id" json:"id"`
	Name        string    `ddb:"name" json:"name"`
	Pid         int64     `ddb:"pid" json:"pid"`
	Description string    `ddb:"description" json:"description"`
	CreateAt    time.Time `ddb:"create_at" json:"create_at"`
	UpdateAt    time.Time `ddb:"update_at" json:"update_at"`
	Status      int8      `ddb:"status" json:"status"`
}

Role is a mapping object for role table in mysql

func (*Role) TableName

func (*Role) TableName() string

Jump to

Keyboard shortcuts

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