model

package
v0.0.0-...-88294d8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

自动生成模板SysDictionary

自动生成模板SysDictionaryDetail

自动生成模板SysOperationRecord

Index

Constants

This section is empty.

Variables

View Source
var AutoMoveErr error = errors.New("创建代码成功并移动文件成功")

Functions

This section is empty.

Types

type AutoCodeStruct

type AutoCodeStruct struct {
	StructName         string  `json:"structName"`
	TableName          string  `json:"tableName"`
	PackageName        string  `json:"packageName"`
	Abbreviation       string  `json:"abbreviation"`
	Description        string  `json:"description"`
	AutoCreateApiToSql bool    `json:"autoCreateApiToSql"`
	AutoMoveFile       bool    `json:"autoMoveFile"`
	Fields             []Field `json:"fields"`
}

初始版本自动化代码工具

type CasbinModel

type CasbinModel struct {
	Ptype       string `json:"ptype" gorm:"column:p_type"`
	AuthorityId string `json:"rolename" gorm:"column:v0"`
	Path        string `json:"path" gorm:"column:v1"`
	Method      string `json:"method" gorm:"column:v2"`
}

type ExaCustomer

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"`
	SysUserAuthorityID string  `json:"sysUserAuthorityID" form:"sysUserAuthorityID" gorm:"comment:管理角色ID"`
	SysUser            SysUser `json:"sysUser" form:"sysUser" gorm:"comment:管理详情"`
}

type ExaFile

type ExaFile struct {
	global.GVA_MODEL
	FileName     string
	FileMd5      string
	FilePath     string
	ExaFileChunk []ExaFileChunk
	ChunkTotal   int
	IsFinish     bool
}

file struct, 文件结构体

type ExaFileChunk

type ExaFileChunk struct {
	global.GVA_MODEL
	ExaFileID       uint
	FileChunkNumber int
	FileChunkPath   string
}

file chunk struct, 切片结构体

type ExaFileUploadAndDownload

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:编号"`
}

type ExaSimpleUploader

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:文件本地路径"`
}

type Field

type Field struct {
	FieldName       string `json:"fieldName"`
	FieldDesc       string `json:"fieldDesc"`
	FieldType       string `json:"fieldType"`
	FieldJson       string `json:"fieldJson"`
	DataType        string `json:"dataType"`
	DataTypeLong    string `json:"dataTypeLong"`
	Comment         string `json:"comment"`
	ColumnName      string `json:"columnName"`
	FieldSearchType string `json:"fieldSearchType"`
	DictType        string `json:"dictType"`
}

type JwtBlacklist

type JwtBlacklist struct {
	global.GVA_MODEL
	Jwt string `gorm:"type:text;comment:jwt"`
}

type Meta

type Meta struct {
	KeepAlive   bool   `json:"keepAlive" gorm:"comment:是否缓存"`
	DefaultMenu bool   `json:"defaultMenu" gorm:"comment:是否是基础路由(开发中)"`
	Title       string `json:"title" gorm:"comment:菜单名"`
	Icon        string `json:"icon" gorm:"comment:菜单图标"`
}

type SysApi

type SysApi struct {
	global.GVA_MODEL
	Path        string `json:"path" gorm:"comment:api路径"`
	Description string `json:"description" gorm:"comment:api中文描述"`
	ApiGroup    string `json:"apiGroup" gorm:"comment:api组"`
	Method      string `json:"method" gorm:"default:POST" gorm:"comment:方法"`
}

type SysAuthority

type SysAuthority struct {
	CreatedAt       time.Time
	UpdatedAt       time.Time
	DeletedAt       *time.Time     `sql:"index"`
	AuthorityId     string         `json:"authorityId" gorm:"not null;unique;primary_key;comment:角色ID;size:90"`
	AuthorityName   string         `json:"authorityName" gorm:"comment:角色名"`
	ParentId        string         `json:"parentId" gorm:"comment:父角色ID"`
	DataAuthorityId []SysAuthority `json:"dataAuthorityId" gorm:"many2many:sys_data_authority_id"`
	Children        []SysAuthority `json:"children" gorm:"-"`
	SysBaseMenus    []SysBaseMenu  `json:"menus" gorm:"many2many:sys_authority_menus;"`
}

type SysBaseMenu

type SysBaseMenu struct {
	global.GVA_MODEL
	MenuLevel     uint   `json:"-"`
	ParentId      string `json:"parentId" gorm:"comment:父菜单ID"`
	Path          string `json:"path" gorm:"comment:路由path"`
	Name          string `json:"name" gorm:"comment:路由name"`
	Hidden        bool   `json:"hidden" gorm:"comment:是否在列表隐藏"`
	Component     string `json:"component" gorm:"comment:对应前端文件路径"`
	Sort          int    `json:"sort" gorm:"comment:排序标记"`
	Meta          `json:"meta" gorm:"comment:附加属性"`
	SysAuthoritys []SysAuthority         `json:"authoritys" gorm:"many2many:sys_authority_menus;"`
	Children      []SysBaseMenu          `json:"children" gorm:"-"`
	Parameters    []SysBaseMenuParameter `json:"parameters"`
}

type SysBaseMenuParameter

type SysBaseMenuParameter struct {
	global.GVA_MODEL
	SysBaseMenuID uint
	Type          string `json:"type" gorm:"comment:地址栏携带参数为params还是query"`
	Key           string `json:"key" gorm:"comment:地址栏携带参数的key"`
	Value         string `json:"value" gorm:"comment:地址栏携带参数的值"`
}

type SysDictionary

type SysDictionary struct {
	global.GVA_MODEL
	Name                 string                `json:"name" form:"name" gorm:"column:name;comment:字典名(中)"`
	Type                 string                `json:"type" form:"type" gorm:"column:type;comment:字典名(英)"`
	Status               *bool                 `json:"status" form:"status" gorm:"column:status;comment:状态"`
	Desc                 string                `json:"desc" form:"desc" gorm:"column:desc;comment:描述"`
	SysDictionaryDetails []SysDictionaryDetail `json:"sysDictionaryDetails" form:"sysDictionaryDetails"`
}

如果含有time.Time 请自行import time包

type SysDictionaryDetail

type SysDictionaryDetail struct {
	global.GVA_MODEL
	Label           string `json:"label" form:"label" gorm:"column:label;comment:展示值"`
	Value           int    `json:"value" form:"value" gorm:"column:value;comment:字典值"`
	Status          *bool  `json:"status" form:"status" gorm:"column:status;comment:启用状态"`
	Sort            int    `json:"sort" form:"sort" gorm:"column:sort;comment:排序标记"`
	SysDictionaryID int    `json:"sysDictionaryID" form:"sysDictionaryID" gorm:"column:sys_dictionary_id;comment:关联标记"`
}

如果含有time.Time 请自行import time包

type SysMenu

type SysMenu struct {
	SysBaseMenu
	MenuId      string                 `json:"menuId" gorm:"comment:菜单ID"`
	AuthorityId string                 `json:"-" gorm:"comment:角色ID"`
	Children    []SysMenu              `json:"children" gorm:"-"`
	Parameters  []SysBaseMenuParameter `json:"parameters" gorm:"foreignKey:SysBaseMenuID;references:MenuId"`
}

func (SysMenu) TableName

func (s SysMenu) TableName() string

type SysOperationRecord

type SysOperationRecord struct {
	global.GVA_MODEL
	Ip           string        `json:"ip" form:"ip" gorm:"column:ip;comment:请求ip"`
	Method       string        `json:"method" form:"method" gorm:"column:method;comment:请求方法"`
	Path         string        `json:"path" form:"path" gorm:"column:path;comment:请求路径"`
	Status       int           `json:"status" form:"status" gorm:"column:status;comment:请求状态"`
	Latency      time.Duration `json:"latency" form:"latency" gorm:"column:latency;comment:延迟"`
	Agent        string        `json:"agent" form:"agent" gorm:"column:agent;comment:代理"`
	ErrorMessage string        `json:"error_message" form:"error_message" gorm:"column:error_message;comment:错误信息"`
	Body         string        `json:"body" form:"body" gorm:"type:longtext;column:body;comment:请求Body"`
	Resp         string        `json:"resp" form:"resp" gorm:"type:longtext;column:resp;comment:响应Body"`
	UserID       int           `json:"user_id" form:"user_id" gorm:"column:user_id;comment:用户id"`
	User         SysUser       `json:"user"`
}

如果含有time.Time 请自行import time包

type SysUser

type SysUser struct {
	global.GVA_MODEL
	UUID        uuid.UUID    `json:"uuid" gorm:"comment:用户UUID"`
	Username    string       `json:"userName" gorm:"comment:用户登录名"`
	Password    string       `json:"-"  gorm:"comment:用户登录密码"`
	NickName    string       `json:"nickName" gorm:"default:系统用户;comment:用户昵称" `
	HeaderImg   string       `json:"headerImg" gorm:"default:http://qmplusimg.henrongyi.top/head.png;comment:用户头像"`
	Authority   SysAuthority `json:"authority" gorm:"foreignKey:AuthorityId;references:AuthorityId;comment:用户角色"`
	AuthorityId string       `json:"authorityId" gorm:"default:888;comment:用户角色ID"`
}

type SysWorkFlowProcess

type SysWorkFlowProcess struct {
	global.GVA_MODEL
	ApplicationID  uint   `json:"applicationID" gorm:"comment:当前工作流所属申请的ID"` // 当前工作流所属申请的ID
	CurrentNode    string `json:"currentNode" gorm:"comment:当前进度节点"`         // 当前进度节点
	HistoricalNode string `json:"historicalNode" gorm:"comment:上一个进度节点"`     // 上一个进度节点
	CurrentUser    string `json:"currentUser" gorm:"comment:当前进度操作人"`        // 当前进度操作人
	HistoricalUser string `json:"historicalUser" gorm:"comment:上一个进度的操作人"`   // 上一个进度的操作人
	State          bool   `json:"state" gorm:"comment:是否是正在进行的状态"`           // 状态 是否是正在进行的状态
}

工作流流转表

type SysWorkflow

type SysWorkflow struct {
	global.GVA_MODEL
	WorkflowNickName    string                `json:"workflowNickName" gorm:"comment:工作流中文名称"`  // 工作流名称
	WorkflowName        string                `json:"workflowName" gorm:"comment:工作流英文名称"`      // 工作流英文id
	WorkflowDescription string                `json:"workflowDescription" gorm:"comment:工作流描述"` // 工作流描述
	WorkflowStepInfo    []SysWorkflowStepInfo `json:"workflowStep" gorm:"comment:工作流步骤"`        // 工作流步骤
}

工作流属性表

type SysWorkflowStepInfo

type SysWorkflowStepInfo struct {
	global.GVA_MODEL
	SysWorkflowID   uint    `json:"workflowID" gorm:"comment:所属工作流ID"`      // 所属工作流ID
	IsStart         bool    `json:"isStart" gorm:"comment:是否是开始流节点"`        // 是否是开始流节点
	StepName        string  `json:"stepName" gorm:"comment:工作流节点名称"`        // 工作流名称
	StepNo          float64 `json:"stepNo" gorm:"comment:步骤id (第几步)"`       // 步骤id (第几步)
	StepAuthorityID string  `json:"stepAuthorityID" gorm:"comment:操作者级别id"` // 操作者级别id
	IsEnd           bool    `json:"isEnd" gorm:"comment:是否是完结流节点"`          // 是否是完结流节点
}

工作流状态表

type System

type System struct {
	Config config.Server
}

配置文件结构体

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL