model

package
v0.0.0-...-830e4ae Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Approve

type Approve struct {
	Id             string `gorm:"primary_key"`
	Procinst_id    string
	Procflow_id    string
	Form_id        string
	User_id        string
	User_name      string
	User_dept_id   string
	User_dept_name string
	User_email     string
	User_phone     string
	Node_id        string
	Node_type      string
	Data           string
	Deal_time      *time.Time
	Deal_result    string
	Update_id      string
	Create_id      string
	Create_time    *time.Time
	Update_time    *time.Time
	Status         string
}

type ApproveList

type ApproveList struct {
	Id          string `gorm:"primary_key"`
	Procinst_id string
	Procflow_id string
	Form_id     string
	Name        string
	NodeId      string
	Procdef_id  string
}

type End

type End struct {
	Name   string `json:"name,omitempty"`
	Id     string `json:"id"`
	PrevId string `json:"prevId,omitempty"`
}

type Fork

type Fork struct {
	Name   string   `json:"name,omitempty"`
	Id     string   `json:"id"`
	NextId []string `json:"nextId,omitempty"`
	Conds  string   `json:"conds,omitempty"`
	Params []*Param `json:"params,omitempty"`

	//result can set nodeid as name, stop as value to stop process
	Results []*Result `json:"results,omitempty"`
}

type Form

type Form struct {
	Id          string `gorm:"primary_key"`
	Form_name   string
	Form        string
	Form_desc   string
	Create_id   string
	Update_id   string
	Create_time *time.Time
	Update_time *time.Time
	Status      string
}

type Formdata

type Formdata struct {
	Id          string `gorm:"primary_key"`
	Form_id     string
	Procinst_id string
	Task_id     string
	Form_name   string
	Form_data   string
	Create_id   string
	Update_id   string
	Create_time *time.Time
	Update_time *time.Time
	Status      string
}

type Node

type Node struct {
	Id   string
	Type string
}

type Param

type Param struct {
	Name  string `json:"name,omitempty"`
	Type  string `json:"type,omitempty"`
	Value string `json:"value,omitempty"`
}

type Procdef

type Procdef struct {
	Id           string `gorm:"primary_key"`
	Company_id   string
	Company_name string
	Name         string
	Ver          string
	Resource     string
	Create_id    string
	Update_id    string
	Create_time  *time.Time
	Update_time  *time.Time
	Status       string
}

type Process

type Process struct {
	Id    string  `json:"id"`
	Name  string  `json:"name"`
	Start *Start  `json:"start"`
	End   []*End  `json:"end"`
	Tasks []*Task `json:"tasks"`
	Forks []*Fork `json:"forks"`
}

node type: start, end, task, fork, join

type Procflow

type Procflow struct {
	Id           string `gorm:"primary_key"`
	Procdef_id   string
	Procinst_id  string
	Prev_flow_id string
	Node_id      string
	Node_name    string
	Node_type    string
	Prev_id      string
	Update_id    string
	Create_id    string
	Create_time  *time.Time
	Update_time  *time.Time
	Status       string
}

type Procinst

type Procinst struct {
	Id               string `gorm:"primary_key"`
	Name             string
	Procdef_id       string
	Create_name      string
	Create_dept_id   string
	Create_dept_name string
	Create_email     string
	Create_phone     string
	Current_flow     string
	Current_name     string
	Start_id         string
	Create_id        string
	Version          int
	Update_id        string
	Create_time      *time.Time
	Update_time      *time.Time
	Status           string
}

type Result

type Result struct {
	Name  string `json:"name,omitempty"`
	Type  string `json:"type,omitempty"`
	Value string `json:"value,omitempty"`
}

type Start

type Start struct {
	Name   string `json:"name,omitempty"`
	Id     string `json:"id"`
	FormId string `json:"formId,omitempty"`
	NextId string `json:"nextId,omitempty"`
}

type Task

type Task struct {
	Name   string `json:"name,omitempty"`
	Id     string `json:"id"`
	PrevId string `json:"prevId,omitempty"`
	NextId string `json:"nextId,omitempty"`
	// 0 noneed: noneed approve, direct to next node
	// 1 list: select approvers from approver list
	// 2 manual: manual select approvers
	// 4 manager: select user direct manager as approver
	// Support combine with add: i.e. 5=4+1=manager+list
	ApproveType int     `json:"approveType,omitempty"`
	Approvers   []*User `json:"approvers,omitempty"`

	// and sign need number, defaule need all sign
	ApproveNum int `json:"approveNum,omitempty"`
	RejectNum  int `json:"rejectNum,omitempty"`
	// and sign , or sign : default or sign,
	ActType  string         `json:"actType,omitempty"`
	Url      string         `json:"url,omitempty"`
	FormId   string         `json:"formId,omitempty"`
	ValueMap map[string]any `json:"valueMap,omitempty"`
}

type User

type User struct {
	Name        string `json:"name,omitempty"`
	Id          string `json:"id,omitempty"`
	DeptId      string `json:"deptId,omitempty"`
	DeptName    string `json:"deptName,omitempty"`
	Phone       string `json:"phone,omitempty"`
	Email       string `json:"email,omitempty"`
	ManagerId   string `json:"managerId,omitempty"`
	ManagerName string `json:"managerName,omitempty"`
}

Jump to

Keyboard shortcuts

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