32 lines
1.2 KiB
Go
32 lines
1.2 KiB
Go
package main
|
|
|
|
import (
|
|
"time"
|
|
|
|
"91porn-server/generate/common"
|
|
|
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
|
)
|
|
|
|
type SysConf struct {
|
|
ID primitive.ObjectID `json:"id" bson:"_id,omitempty" comment:"文档id"`
|
|
|
|
GroupName string `json:"groupName" bson:"groupName" comment:"分组名"`
|
|
GpCode string `json:"gpCode" bson:"gpCode" comment:"分组编码"`
|
|
VCode string `json:"vCode" bson:"vCode" comment:"变量名"`
|
|
Title string `json:"title" bson:"title" comment:"变量标题"`
|
|
Tip string `json:"tip" bson:"tip" comment:"变量描述"`
|
|
Type string `json:"type" bson:"type" comment:"类型:text,string,img,int,bool,object,text-array,string-array"`
|
|
Value string `json:"value" bson:"value" comment:"变量值"`
|
|
IsRequired bool `json:"is_required" bson:"is_required" comment:"是否必填"`
|
|
SortOrder int `json:"sort_order" bson:"sort_order" comment:"排序值"`
|
|
CreatedAt time.Time `json:"createdAt" bson:"createdAt" comment:"创建时间"`
|
|
UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt" comment:"更新时间"`
|
|
}
|
|
|
|
func main() {
|
|
g := common.NewGen("91porn-server", "系统通用配置")
|
|
g.AppGenerate = false
|
|
g.Generate(SysConf{})
|
|
}
|