repository

package
v0.0.0-...-fa2ffe9 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() error

Types

type Post

type Post struct {
	Id         int64     `gorm:"column:id"`
	ParentId   int64     `gorm:"parent_id"`
	UserId     int64     `gorm:"column:user_id"`
	Content    string    `gorm:"column:content"`
	DiggCount  int32     `gorm:"column:digg_count"`
	CreateTime time.Time `gorm:"column:create_time"`
}

func (Post) TableName

func (Post) TableName() string

type PostDao

type PostDao struct {
}

func NewPostDaoInstance

func NewPostDaoInstance() *PostDao

func (*PostDao) CreatePost

func (*PostDao) CreatePost(post *Post) error

func (*PostDao) QueryPostById

func (*PostDao) QueryPostById(id int64) (*Post, error)

func (*PostDao) QueryPostByParentId

func (*PostDao) QueryPostByParentId(parentId int64) ([]*Post, error)

type Topic

type Topic struct {
	Id         int64     `gorm:"column:id"`
	UserId     int64     `gorm:"column:user_id"`
	Title      string    `gorm:"column:title"`
	Content    string    `gorm:"column:content"`
	CreateTime time.Time `gorm:"column:create_time"`
}

func (Topic) TableName

func (Topic) TableName() string

type TopicDao

type TopicDao struct {
}

func NewTopicDaoInstance

func NewTopicDaoInstance() *TopicDao

func (*TopicDao) QueryTopicById

func (*TopicDao) QueryTopicById(id int64) (*Topic, error)

type User

type User struct {
	Id         int64     `gorm:"column:id"`
	Name       string    `gorm:"column:name"`
	Avatar     string    `gorm:"column:avatar"`
	Level      int       `gorm:"column:level"`
	CreateTime time.Time `gorm:"column:create_time"`
	ModifyTime time.Time `gorm:"column:modify_time"`
}

func (User) TableName

func (User) TableName() string

type UserDao

type UserDao struct {
}

func NewUserDaoInstance

func NewUserDaoInstance() *UserDao

func (*UserDao) MQueryUserById

func (*UserDao) MQueryUserById(ids []int64) (map[int64]*User, error)

func (*UserDao) QueryUserById

func (*UserDao) QueryUserById(id int64) (*User, error)

Jump to

Keyboard shortcuts

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