init project

This commit is contained in:
2025-03-28 17:14:57 +08:00
parent 76ca33962e
commit 4d08921f92
357 changed files with 54458 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package example
import (
"git.echol.cn/loser/xiecheng_server/global"
)
type ExaAttachmentCategory struct {
global.GVA_MODEL
Name string `json:"name" form:"name" gorm:"default:null;type:varchar(255);column:name;comment:分类名称;"`
Pid uint `json:"pid" form:"pid" gorm:"default:0;type:int;column:pid;comment:父节点ID;"`
Children []*ExaAttachmentCategory `json:"children" gorm:"-"`
}
func (ExaAttachmentCategory) TableName() string {
return "exa_attachment_category"
}

View File

@@ -0,0 +1,24 @@
package example
import (
"git.echol.cn/loser/xiecheng_server/global"
)
// file struct, 文件结构体
type ExaFile struct {
global.GVA_MODEL
FileName string
FileMd5 string
FilePath string
ExaFileChunk []ExaFileChunk
ChunkTotal int
IsFinish bool
}
// file chunk struct, 切片结构体
type ExaFileChunk struct {
global.GVA_MODEL
ExaFileID uint
FileChunkNumber int
FileChunkPath string
}

View File

@@ -0,0 +1,15 @@
package example
import (
"git.echol.cn/loser/xiecheng_server/global"
"git.echol.cn/loser/xiecheng_server/model/system"
)
type ExaCustomer struct {
global.GVA_MODEL
CustomerName string `json:"customerName" form:"customerName" gorm:"comment:客户名"` // 客户名
CustomerPhoneData string `json:"customerPhoneData" form:"customerPhoneData" gorm:"comment:客户手机号"` // 客户手机号
SysUserID uint `json:"sysUserId" form:"sysUserId" gorm:"comment:管理ID"` // 管理ID
SysUserAuthorityID uint `json:"sysUserAuthorityID" form:"sysUserAuthorityID" gorm:"comment:管理角色ID"` // 管理角色ID
SysUser system.SysUser `json:"sysUser" form:"sysUser" gorm:"comment:管理详情"` // 管理详情
}

View File

@@ -0,0 +1,18 @@
package example
import (
"git.echol.cn/loser/xiecheng_server/global"
)
type ExaFileUploadAndDownload struct {
global.GVA_MODEL
Name string `json:"name" form:"name" gorm:"column:name;comment:文件名"` // 文件名
ClassId int `json:"classId" form:"classId" gorm:"default:0;type:int;column:class_id;comment:分类id;"` // 分类id
Url string `json:"url" form:"url" gorm:"column:url;comment:文件地址"` // 文件地址
Tag string `json:"tag" form:"tag" gorm:"column:tag;comment:文件标签"` // 文件标签
Key string `json:"key" form:"key" gorm:"column:key;comment:编号"` // 编号
}
func (ExaFileUploadAndDownload) TableName() string {
return "exa_file_upload_and_downloads"
}

View File

@@ -0,0 +1,10 @@
package request
import (
"git.echol.cn/loser/xiecheng_server/model/common/request"
)
type ExaAttachmentCategorySearch struct {
ClassId int `json:"classId" form:"classId"`
request.PageInfo
}

View File

@@ -0,0 +1,11 @@
package response
import "git.echol.cn/loser/xiecheng_server/model/example"
type FilePathResponse struct {
FilePath string `json:"filePath"`
}
type FileResponse struct {
File example.ExaFile `json:"file"`
}

View File

@@ -0,0 +1,7 @@
package response
import "git.echol.cn/loser/xiecheng_server/model/example"
type ExaCustomerResponse struct {
Customer example.ExaCustomer `json:"customer"`
}

View File

@@ -0,0 +1,7 @@
package response
import "git.echol.cn/loser/xiecheng_server/model/example"
type ExaFileResponse struct {
File example.ExaFileUploadAndDownload `json:"file"`
}