Files
zmkgC/internal/app/system/model/document.go
2025-07-07 20:11:59 +08:00

83 lines
3.8 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// ==========================================================================
// GFast自动生成model操作代码。
// 生成日期2023-09-16 10:32:04
// 生成路径: internal/app/system/model/document.go
// 生成人gfast
// desc:母板
// company:云南奇讯科技有限公司
// ==========================================================================
package model
import (
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/util/gmeta"
)
// DocumentInfoRes is the golang structure for table document.
type DocumentInfoRes struct {
gmeta.Meta `orm:"table:document"`
Id int64 `orm:"id,primary" json:"id"` // 序号
IdStr string `orm:"id_str" json:"idStr"` // 父级0代表顶级
Pid string `orm:"pid" json:"pid"` // 父级0代表顶级
Name string `orm:"name" json:"name" dc:"模板名称"` // 模板名称
FilenPath string `orm:"filen_path" json:"filenPath" dc:"模板路径"` // 模板路径
Suffix string `orm:"suffix" json:"suffix" dc:"文件后缀"` // 后缀
Type string `orm:"type" json:"type" dc:"文件类型"` // 类型1文件-2文件夹
CreateBy string `orm:"create_by" json:"createBy"` // 创建人
UpdateBy string `orm:"update_by" json:"updateBy"` // 更新人
CreatedAt *gtime.Time `orm:"created_at" json:"createdAt"` // 创建时间
UpdatedAt *gtime.Time `orm:"updated_at" json:"updatedAt"` // 更新时间
DeletedAt *gtime.Time `orm:"deleted_at" json:"deletedAt"` // 删除时间
//Json string `orm:"json" json:"json"` // 删除时间
}
type DocumentListRes struct {
Id int64 `json:"id"`
IdStr string `json:"idStr"`
Pid string `json:"pid"`
Name string `json:"name"`
FilenPath string `json:"filenPath"`
FilenPathCoding string `json:"filenPathCoding"`
Suffix string `json:"suffix"`
Type string `json:"type"`
CreatedAt *gtime.Time `json:"createdAt"`
IsDuplicate bool `json:"isDuplicate"`
List *DocumentProjectListRes `json:"list"`
}
type DocumentProjectListRes struct {
Id int64 `json:"id"`
IdStr string `json:"idStr"`
Pid string `json:"pid"`
Name string `json:"name"`
FilePath string `json:"filePath"`
Type string `json:"type"`
Json string `json:"json"`
ProjectId int64 `json:"projectId"`
CreatedAt *gtime.Time `json:"createdAt"`
}
type TreeStructureRes struct {
gmeta.Meta `orm:"table:document"`
Id int64 `json:"id"`
IdStr string `json:"idStr"`
Pid string `json:"pid"`
Name string `json:"name"`
Type string `json:"type"`
FilenPath string `json:"filenPath"`
TreeStructureRes []*TreeStructureRes `json:"treeStructureRes" orm:"with:pid=id_str, where:type=2 and id_str!=''" `
}
// TreeStructureResTwo 不管是文件还是文件夹都可以
type TreeStructureResTwo struct {
gmeta.Meta `orm:"table:document"`
Id int64 `json:"id"`
IdStr string `json:"idStr"`
Pid string `json:"pid"`
Name string `json:"name"`
Type string `json:"type"`
FilenPath string `json:"filenPath"`
TreeStructureResTwo []*TreeStructureResTwo `json:"treeStructureResTwo" orm:"with:pid=id_str"`
}