model

package
v0.0.0-...-f5a2786 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

自动生成模板ExaWfLeave

Index

Constants

This section is empty.

Variables

View Source
var AutoMoveErr error = errors.New("创建代码成功并移动文件成功")
View Source
var WorkflowBusinessStruct map[string]func() GVA_Workflow
View Source
var WorkflowBusinessTable map[string]func() interface{}

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 CasbinRule

type CasbinRule struct {
	PType string
	V0    string
	V1    string
	V2    string
	V3    string
	V4    string
	V5    string
}

func (*CasbinRule) TableName

func (c *CasbinRule) TableName() string

type ExaCustomer

type ExaCustomer struct {
	global.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.Model
	FileName     string
	FileMd5      string
	FilePath     string
	ExaFileChunk []ExaFileChunk
	ChunkTotal   int
	IsFinish     bool
}

file struct, 文件结构体

type ExaFileChunk

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

file chunk struct, 切片结构体

type ExaFileUploadAndDownload

type ExaFileUploadAndDownload struct {
	global.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 ExaWfLeave

type ExaWfLeave struct {
	global.Model
	Cause     string    `json:"cause" form:"cause" gorm:"column:cause;comment:"`
	StartTime time.Time `json:"startTime" form:"startTime" gorm:"column:start_time;comment:"`
	EndTime   time.Time `json:"endTime" form:"endTime" gorm:"column:end_time;comment:"`
}

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

func (ExaWfLeave) TableName

func (ExaWfLeave) TableName() string

type ExaWfLeaveWorkflow

type ExaWfLeaveWorkflow struct {
	// 工作流操作结构体
	WorkflowBase `json:"wf"`
	ExaWfLeave   `json:"business"`
}

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 GVA_Workflow

type GVA_Workflow interface {
	CreateWorkflowMove() *WorkflowMove
	GetBusinessType() string
	GetBusinessID() uint
	GetWorkflowBase() WorkflowBase
}

type JwtBlacklist

type JwtBlacklist struct {
	global.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:菜单图标"`
	CloseTab    bool   `json:"closeTab" gorm:"comment:自动关闭tab"`
}

type SysApi

type SysApi struct {
	global.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;"`
	DefaultRouter   string         `json:"defaultRouter" gorm:"comment:默认菜单;default:dashboard"`
}

type SysBaseMenu

type SysBaseMenu struct {
	global.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.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.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.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.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.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 WorkflowBase

type WorkflowBase struct {
	WorkflowMoveID    uint   `json:"workflowMoveID" gorm:"-"`
	BusinessID        uint   `json:"businessID" gorm:"<-:false;column:id"` // 业务对应ID(businessID)的返回
	BusinessType      string `json:"businessType" gorm:"-"`
	PromoterID        uint   `json:"promoterID" gorm:"-"`
	OperatorID        uint   `json:"operatorID" gorm:"-"`
	WorkflowProcessID string `json:"workflowProcessID" gorm:"-"`
	WorkflowNodeID    string `json:"workflowNodeID" gorm:"-"`
	Param             string `json:"param" gorm:"-"`
	Action            string `json:"action" gorm:"-"`
}

func (WorkflowBase) CreateWorkflowMove

func (w WorkflowBase) CreateWorkflowMove() (businessModel *WorkflowMove)

func (WorkflowBase) GetBusinessID

func (w WorkflowBase) GetBusinessID() (businessID uint)

func (WorkflowBase) GetBusinessType

func (w WorkflowBase) GetBusinessType() (businessType string)

func (WorkflowBase) GetWorkflowBase

func (w WorkflowBase) GetWorkflowBase() (workflowBase WorkflowBase)

type WorkflowEdge

type WorkflowEdge struct {
	ID                  string `json:"id" form:"id" gorm:"comment:唯一标识;primaryKey;unique;not null"`
	CreatedAt           time.Time
	UpdatedAt           time.Time
	DeletedAt           gorm.DeletedAt     `json:"-" gorm:"index"`
	WorkflowProcessID   string             `json:"-" gorm:"comment:流程标识"`
	Clazz               string             `json:"clazz" gorm:"comment:类型(线)"`
	Source              string             `json:"source" gorm:"comment:起点节点"`
	Target              string             `json:"target" gorm:"comment:目标节点"`
	SourceAnchor        int                `json:"sourceAnchor" gorm:"comment:起点"`
	TargetAnchor        int                `json:"targetAnchor" gorm:"comment:目标点"`
	Description         string             `json:"description" gorm:"comment:详细介绍"`
	Shape               string             `json:"shape" gorm:"comment:形状"`
	StartPoint          WorkflowStartPoint `json:"startPoint"` // 起点信息
	EndPoint            WorkflowEndPoint   `json:"endPoint"`   // 终点信息
	Label               string             `json:"label" gorm:"comment:标题"`
	HideIcon            bool               `json:"hideIcon" gorm:"comment:隐藏图标"`
	ConditionExpression string             `json:"conditionExpression" gorm:"comment:条件标识"`
	Seq                 string             `json:"seq" gorm:"comment:序号"`
	Reverse             bool               `json:"reverse" gorm:"comment:是否反向"`
}

type WorkflowEndPoint

type WorkflowEndPoint struct {
	WorkflowEdgeID string
	global.Model
	X     float64 `json:"x"`
	Y     float64 `json:"y"`
	Index int     `json:"index"`
}

type WorkflowMove

type WorkflowMove struct {
	global.Model
	WorkflowProcessID string          `json:"workflowProcessID" gorm:"comment:工作流模板ID"`
	WorkflowProcess   WorkflowProcess `gorm:"<-:false" json:"workflowProcess" gorm:"comment:工作流模板具体信息"`
	WorkflowNodeID    string          `json:"workflowNodeID" gorm:"comment:工作流节点ID"`
	WorkflowNode      WorkflowNode    `gorm:"<-:false" json:"workflowNode" gorm:"comment:工作流节点具体信息"`
	BusinessType      string          `json:"businessType" gorm:"comment:业务标记"`
	BusinessID        uint            `json:"businessID" gorm:"comment:业务ID"`
	PromoterID        uint            `json:"promoterID" gorm:"comment:当前流转发起人"`
	Promoter          SysUser         `gorm:"<-:false" json:"promoter" gorm:"comment:当前流转发起人信息"`
	OperatorID        uint            `json:"operatorID" gorm:"comment:当前流转操作人"`
	Operator          SysUser         `gorm:"<-:false" json:"operator" gorm:"comment:当前流转操作人信息"`
	Action            string          `json:"action" gorm:"comment:工作流驱动事件"`
	Param             string          `json:"param" gorm:"comment:工作流驱动参数"`
	IsActive          bool            `json:"isActive" gorm:"comment:是否是活跃节点 "`
}

type WorkflowNode

type WorkflowNode struct {
	ID                string `json:"id" form:"id" gorm:"comment:节点id;primaryKey;unique;not null"`
	CreatedAt         time.Time
	UpdatedAt         time.Time
	DeletedAt         gorm.DeletedAt `json:"-" gorm:"index"`
	WorkflowProcessID string         `json:"workflowProcessID" gorm:"comment:流程标识"`
	Clazz             string         `json:"clazz" gorm:"comment:节点类型"`
	Label             string         `json:"label" gorm:"comment:节点名称"`
	Type              string         `json:"type" gorm:"comment:图标类型"`
	Shape             string         `json:"shape" gorm:"comment:形状"`
	Description       string         `json:"description" gorm:"comment:详细介绍"`
	View              string         `json:"view" gorm:"comment:前端视图文件"`
	X                 float64        `json:"y" gorm:"comment:x位置"`
	Y                 float64        `json:"x" gorm:"comment:y位置"`
	WaitState         string         `json:"waitState" gorm:"comment:等待属性"`
	StateValue        string         `json:"stateValue" gorm:"comment:等待值"`
	To                string         `json:"to" gorm:"comment:收件人"`
	Subject           string         `json:"subject" gorm:"comment:标题"`
	Content           string         `json:"content" gorm:"comment:内容"`
	Cycle             string         `json:"cycle" gorm:"comment:循环时间"`
	Duration          string         `json:"duration" gorm:"comment:持续时间"`
	HideIcon          bool           `json:"hideIcon" gorm:"comment:是否隐藏图标"`
	DueDate           *time.Time     `json:"dueDate" gorm:"comment:到期时间"`
	AssignType        string         `json:"assignType" gorm:"comment:审批类型"`
	AssignValue       string         `json:"assignValue" gorm:"comment:审批类型值"`
	Success           bool           `json:"success" gorm:"comment:是否成功"`
}

type WorkflowProcess

type WorkflowProcess struct {
	ID          string `json:"id" form:"id" gorm:"comment:流程标识;primaryKey;unique;not null"`
	CreatedAt   time.Time
	UpdatedAt   time.Time
	DeletedAt   gorm.DeletedAt `json:"-" gorm:"index"`
	Name        string         `json:"name" gorm:"comment:流程名称"`
	Category    string         `json:"category" gorm:"comment:分类"`
	Clazz       string         `json:"clazz" gorm:"comment:类型"`
	Label       string         `json:"label" gorm:"comment:流程标题"`
	HideIcon    bool           `json:"hideIcon" gorm:"comment:是否隐藏图标"`
	Description string         `json:"description" gorm:"comment:详细介绍"`
	View        string         `json:"view" gorm:"comment:前端视图文件"`
	Nodes       []WorkflowNode `json:"nodes"` // 流程节点数据
	Edges       []WorkflowEdge `json:"edges"` // 流程链接数据
}

type WorkflowStartPoint

type WorkflowStartPoint struct {
	WorkflowEdgeID string
	global.Model
	X     float64 `json:"x"`
	Y     float64 `json:"y"`
	Index int     `json:"index"`
}

Jump to

Keyboard shortcuts

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