mirror of
https://github.com/mindoc-org/mindoc.git
synced 2026-02-27 17:03:57 +08:00
实现项目列表、概述功能
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
import (
|
||||
"time"
|
||||
"github.com/lifei6671/godoc/conf"
|
||||
)
|
||||
|
||||
// Document struct.
|
||||
type Document struct {
|
||||
@@ -32,3 +35,30 @@ func (m *Document) TableName() string {
|
||||
func (m *Document) TableEngine() string {
|
||||
return "INNODB"
|
||||
}
|
||||
|
||||
func (m *Document) TableNameWithPrefix() string {
|
||||
return conf.GetDatabasePrefix() + m.TableName()
|
||||
}
|
||||
|
||||
func NewDocument() *Document {
|
||||
return &Document{}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user