models

package
v0.0.0-...-0d2c1c8 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

func TableName

func TableName(str string) string

returns the name of the prefixed table

Types

type Category

type Category struct {
	Id      int
	Name    string
	Created time.Time
	Updated time.Time
}

func (*Category) TableName

func (m *Category) TableName() string

type Comment

type Comment struct {
	Id       int
	Username string
	Content  string
	Created  time.Time
	PostId   int
	Ip       string
}

func (*Comment) TableName

func (m *Comment) TableName() string

type Config

type Config struct {
	Id    int
	Name  string
	Value string
}

func (*Config) TableName

func (m *Config) TableName() string

type Post

type Post struct {
	Id      int
	UserId  int
	Title   string
	Url     string
	Content string
	Tags    string

	IsTop      int8
	Created    time.Time
	Updated    time.Time
	CategoryId int
	Status     int8
	Types      int8
	Info       string
	Image      string
	// contains filtered or unexported fields
}

func (*Post) TableName

func (m *Post) TableName() string

type Response

type Response struct {
	Code    int
	Message interface{}
}

type User

type User struct {
	Id         int
	Username   string
	Password   string
	Email      string
	LoginCount int
	LastTime   time.Time
	LastIp     string
	State      int8
	Created    time.Time
	Updated    time.Time
}

func (*User) TableName

func (m *User) TableName() string

Jump to

Keyboard shortcuts

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