wizard

package
v0.0.0-...-cd5ea74 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const AttachmentFields = "id, name, path, user_id, page_id, project_id, created_at, updated_at, deleted_at"
View Source
const PageFields = "" /* 150-byte string literal not displayed */
View Source
const PageHistoryFields = "" /* 129-byte string literal not displayed */
View Source
const ProjectFields = "id, name, description, visibility, user_id, created_at, updated_at, deleted_at, sort_level, catalog_id"
View Source
const StatusNormal int64 = 1
View Source
const TypeMarkdown int64 = 1

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment

type Attachment struct {
	ID        int64
	Name      string
	Path      string
	UserID    int64
	PageID    int64
	ProjectID int64
	CreatedAt time.Time
	UpdatedAt time.Time
}

type Page

type Page struct {
	ID                 int64
	PID                int64
	Title              string
	Description        string
	Content            string
	ProjectID          int64
	UserID             int64
	LastModifiedUserID int64
	Type               int64
	Status             int64
	HistoryID          int64
	CreatedAt          time.Time
	UpdatedAt          time.Time
	SortLevel          int64
}

type PageHistory

type PageHistory struct {
	ID          int64
	PageID      int64
	PID         int64
	Title       string
	Description string
	Content     string
	ProjectID   int64
	Type        int64
	Status      int64
	UserID      int64
	OperatorID  int64
	CreatedAt   time.Time
	UpdatedAt   time.Time
	SortLevel   int64
}

type PageModel

type PageModel struct {
	// contains filtered or unexported fields
}

func NewPageModel

func NewPageModel(db *sql.Tx) *PageModel

func (*PageModel) AddAttachment

func (m *PageModel) AddAttachment(file Attachment) (int64, error)

AddAttachment 添加附件

func (*PageModel) AddHistory

func (m *PageModel) AddHistory(history PageHistory) (int64, error)

AddHistory 添加文档历史

func (*PageModel) CreatePage

func (m *PageModel) CreatePage(page Page) (int64, error)

CreatePage 新增文档

func (*PageModel) UpdatePageHistoryID

func (m *PageModel) UpdatePageHistoryID(pageID int64, historyID int64) (int64, error)

UpdatePageHistoryID 更新文档历史记录ID

type Project

type Project struct {
	ID          int64
	Name        string
	Description string
	UserID      int64
	CreatedAt   time.Time
	UpdatedAt   time.Time
	SortLevel   int64
	CatalogId   int64
}

type ProjectModel

type ProjectModel struct {
	// contains filtered or unexported fields
}

func NewProjectModel

func NewProjectModel(db *sql.Tx) *ProjectModel

func (*ProjectModel) CreateProject

func (m *ProjectModel) CreateProject(project Project) (int64, error)

CreateProject 新增项目

Jump to

Keyboard shortcuts

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