forum

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2018 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	ID        uint      `gorm:"primary_key" json:"id"`
	Title     string    `json:"title"`
	Body      string    `json:"body"`
	Lang      string    `json:"lang"`
	Type      string    `json:"type"`
	UpdatedAt time.Time `json:"updatedAt"`
	CreatedAt time.Time `json:"createdAt"`

	User     nut.User
	UserID   uint
	Tags     []Tag     `json:"tags" gorm:"many2many:forum_articles_tags;"`
	Comments []Comment `json:"comments"`
}

Article article

func (Article) TableName

func (Article) TableName() string

TableName table name

type Comment

type Comment struct {
	ID        uint      `gorm:"primary_key" json:"id"`
	Body      string    `json:"body"`
	Type      string    `json:"type"`
	UpdatedAt time.Time `json:"updatedAt"`
	CreatedAt time.Time `json:"createdAt"`

	User      nut.User `json:"user"`
	UserID    uint
	Article   Article `json:"article"`
	ArticleID uint    `json:"articleId"`
}

Comment comment

func (Comment) TableName

func (Comment) TableName() string

TableName table name

type Plugin

type Plugin struct {
	I18n    *web.I18n      `inject:""`
	Cache   *web.Cache     `inject:""`
	Jwt     *web.Jwt       `inject:""`
	Sitemap *web.Sitemap   `inject:""`
	RSS     *web.RSS       `inject:""`
	Layout  *nut.Layout    `inject:""`
	Router  *gin.Engine    `inject:""`
	DB      *gorm.DB       `inject:""`
	Render  *render.Render `inject:""`
}

Plugin plugin

func (*Plugin) Init

func (p *Plugin) Init(*inject.Graph) error

Init init beans

func (*Plugin) Mount

func (p *Plugin) Mount() error

Mount register

func (*Plugin) Shell

func (p *Plugin) Shell() []cli.Command

Shell console commands

type Tag

type Tag struct {
	ID        uint      `gorm:"primary_key" json:"id"`
	Name      string    `json:"name"`
	UpdatedAt time.Time `json:"updatedAt"`
	CreatedAt time.Time `json:"createdAt"`

	Articles []Article `json:"articles" gorm:"many2many:forum_articles_tags;"`
}

Tag tag

func (Tag) TableName

func (Tag) TableName() string

TableName table name

Jump to

Keyboard shortcuts

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