模块化变更
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package example
|
||||
|
||||
import (
|
||||
"gin-vue-admin/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
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package example
|
||||
|
||||
import (
|
||||
"gin-vue-admin/global"
|
||||
"gin-vue-admin/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 string `json:"sysUserAuthorityID" form:"sysUserAuthorityID" gorm:"comment:管理角色ID"` // 管理角色ID
|
||||
SysUser system.SysUser `json:"sysUser" form:"sysUser" gorm:"comment:管理详情"` // 管理详情
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package example
|
||||
|
||||
import "gin-vue-admin/model/system"
|
||||
|
||||
type ExcelInfo struct {
|
||||
FileName string `json:"fileName"` // 文件名
|
||||
InfoList []system.SysBaseMenu `json:"infoList"`
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package example
|
||||
|
||||
import (
|
||||
"gin-vue-admin/global"
|
||||
)
|
||||
|
||||
type ExaFileUploadAndDownload struct {
|
||||
global.GVA_MODEL
|
||||
Name string `json:"name" gorm:"comment:文件名"` // 文件名
|
||||
Url string `json:"url" gorm:"comment:文件地址"` // 文件地址
|
||||
Tag string `json:"tag" gorm:"comment:文件标签"` // 文件标签
|
||||
Key string `json:"key" gorm:"comment:编号"` // 编号
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package example
|
||||
|
||||
type ExaSimpleUploader struct {
|
||||
ChunkNumber string `json:"chunkNumber" gorm:"comment:当前切片标记"`
|
||||
CurrentChunkSize string `json:"currentChunkSize" gorm:"comment:当前切片容量"`
|
||||
CurrentChunkPath string `json:"currentChunkPath" gorm:"comment:切片本地路径"`
|
||||
TotalSize string `json:"totalSize" gorm:"comment:总容量"`
|
||||
Identifier string `json:"identifier" gorm:"comment:文件标识(md5)"`
|
||||
Filename string `json:"filename" gorm:"comment:文件名"`
|
||||
TotalChunks string `json:"totalChunks" gorm:"comment:切片总数"`
|
||||
IsDone bool `json:"isDone" gorm:"comment:是否上传完成"`
|
||||
FilePath string `json:"filePath" gorm:"comment:文件本地路径"`
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package request
|
||||
|
||||
// Paging common input parameter structure
|
||||
type PageInfo struct {
|
||||
Page int `json:"page" form:"page"` // 页码
|
||||
PageSize int `json:"pageSize" form:"pageSize"` // 每页大小
|
||||
}
|
||||
|
||||
// Find by id structure
|
||||
type GetById struct {
|
||||
ID float64 `json:"id" form:"id"` // 主键ID
|
||||
}
|
||||
|
||||
type IdsReq struct {
|
||||
Ids []int `json:"ids" form:"ids"`
|
||||
}
|
||||
|
||||
// Get role by id structure
|
||||
type GetAuthorityId struct {
|
||||
AuthorityId string // 角色ID
|
||||
}
|
||||
|
||||
type Empty struct{}
|
||||
@@ -0,0 +1,17 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"github.com/dgrijalva/jwt-go"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
)
|
||||
|
||||
// Custom claims structure
|
||||
type CustomClaims struct {
|
||||
UUID uuid.UUID
|
||||
ID uint
|
||||
Username string
|
||||
NickName string
|
||||
AuthorityId string
|
||||
BufferTime int64
|
||||
jwt.StandardClaims
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package response
|
||||
|
||||
import "gin-vue-admin/model/example"
|
||||
|
||||
type FilePathResponse struct {
|
||||
FilePath string `json:"filePath"`
|
||||
}
|
||||
|
||||
type FileResponse struct {
|
||||
File example.ExaFile `json:"file"`
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package response
|
||||
|
||||
import "gin-vue-admin/model/example"
|
||||
|
||||
type ExaCustomerResponse struct {
|
||||
Customer example.ExaCustomer `json:"customer"`
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package response
|
||||
|
||||
import "gin-vue-admin/model/example"
|
||||
|
||||
type ExaFileResponse struct {
|
||||
File example.ExaFileUploadAndDownload `json:"file"`
|
||||
}
|
||||
Reference in New Issue
Block a user