maps

package
v0.0.0-...-26b160e Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

@Time : 2018/9/26 16:21 @Author : kenny zhu @File : sample_impl.go @Software: GoLand @Others: 此文件需要用proteus工具生成对应的micro server文件...

Index

Constants

This section is empty.

Variables

View Source
var (
	// error code define here...
	ErrNotFound = errors.New("not found record")
)

Functions

func Init

func Init(db *xorm.Engine)

func SyncTables

func SyncTables() error

Types

type Article

type Article struct {
	Id             int       `xorm:"not null pk autoincr unique INTEGER"`
	Content        string    `xorm:"not null TEXT"`
	Title          string    `xorm:"not null VARCHAR(255)"`
	Categorysubid  int       `xorm:"not null INTEGER"`
	Remark         string    `xorm:"not null VARCHAR(2555)"`
	Userid         int       `xorm:"not null INTEGER"`
	Viewcount      int       `xorm:"not null default 0 INTEGER"`
	Replycount     int       `xorm:"not null default 0 INTEGER"`
	Tags           string    `xorm:"not null VARCHAR(300)"`
	Createdatetime JSONTime  `xorm:"not null default 'now()' DATETIME"`
	Isdraft        int       `xorm:"SMALLINT"`
	Lastupdatetime time.Time `xorm:"not null default 'now()' DATETIME"`
}

func SelectAllArticle

func SelectAllArticle(paramMap map[string]interface{}) ([]Article, error)

service.. paramMap := map[string]interface{}{"1": 2, "2": 5}..

type Category

type Category struct {
	Id             int       `xorm:"not null pk autoincr unique INTEGER"`
	Name           string    `xorm:"not null VARCHAR(200)"`
	Counts         int       `xorm:"not null default 0 INTEGER"`
	Orders         int       `xorm:"not null default 0 INTEGER"`
	Createtime     time.Time `xorm:"not null default 'now()' created DATETIME"`
	Pid            int       `xorm:"not null default 0 INTEGER"`
	Lastupdatetime time.Time `xorm:"not null default 'now()' updated  DATETIME"`
	Status         int       `xorm:"not null default 1 SMALLINT"`
}

func GetAllCategories

func GetAllCategories() ([]Category, error)

type JSONTime

type JSONTime time.Time

Jump to

Keyboard shortcuts

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