Files

56 lines
5.1 KiB
Go

// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
package model
import (
"time"
)
const TableNameWfTask = "wf_task"
// WfTask mapped from table <wf_task>
type WfTask struct {
ID string `gorm:"column:id;primaryKey;comment:任务主键UUID" json:"id"` // 任务主键UUID
ProcessInstanceID *string `gorm:"column:process_instance_id;comment:流程实例ID" json:"processInstanceId"` // 流程实例ID
ProcessID string `gorm:"column:process_id;not null" json:"processId"`
TaskType string `gorm:"column:task_type;not null;default:user_task;comment:任务类型" json:"taskType"` // 任务类型
TaskDefKey string `gorm:"column:task_def_key;not null;comment:任务节点ID" json:"taskDefKey"` // 任务节点ID
Name string `gorm:"column:name;not null" json:"name"`
Description *string `gorm:"column:description" json:"description"`
ParentID *string `gorm:"column:parent_id;comment:父任务ID(会签场景)" json:"parentId"` // 父任务ID(会签场景)
Status string `gorm:"column:status;not null;default:created;comment:状态:created | assigned | pending | active | delegated | suspended | completed | returned | withdrawn | terminated" json:"status"` // 状态:created | assigned | pending | active | delegated | suspended | completed | returned | withdrawn | terminated
Assignee *string `gorm:"column:assignee;comment:当前办理人" json:"assignee"` // 当前办理人
Owner *string `gorm:"column:owner;comment:任务拥有人(委托前)" json:"owner"` // 任务拥有人(委托前)
DueDate *time.Time `gorm:"column:due_date;comment:到期时间" json:"dueDate"` // 到期时间
Priority int32 `gorm:"column:priority;not null;default:50" json:"priority"`
FormKey *string `gorm:"column:form_key" json:"formKey"`
Variables *string `gorm:"column:variables;default:{};comment:任务变量" json:"variables"` // 任务变量
ClaimedAt *time.Time `gorm:"column:claimed_at;comment:签收时间" json:"claimedAt"` // 签收时间
SequenceOrder int32 `gorm:"column:sequence_order;not null;comment:会签序号(用于顺序会签排序,0表示主任务或非会签任务)" json:"sequenceOrder"` // 会签序号(用于顺序会签排序,0表示主任务或非会签任务)
ApprovalType string `gorm:"column:approval_type;not null;default:single;comment:审批类型:single、any、all、sequential、vote" json:"approvalType"` // 审批类型:single、any、all、sequential、vote
ApprovalRule *string `gorm:"column:approval_rule;default:{};comment:会签规则JSON" json:"approvalRule"` // 会签规则JSON
DelegateFrom *string `gorm:"column:delegate_from;comment:委托人ID" json:"delegateFrom"` // 委托人ID
DelegateReason *string `gorm:"column:delegate_reason" json:"delegateReason"`
DelegateTime *time.Time `gorm:"column:delegate_time;comment:委托时间" json:"delegateTime"` // 委托时间
EndedAt *time.Time `gorm:"column:ended_at;comment:完成时间" json:"endedAt"` // 完成时间
Comment *string `gorm:"column:comment" json:"comment"`
EndReason *string `gorm:"column:end_reason" json:"endReason"`
Duration *int64 `gorm:"column:duration" json:"duration"`
TenantID string `gorm:"column:tenant_id;not null;comment:租户ID" json:"tenantId"` // 租户ID
CreatedBy string `gorm:"column:created_by;not null" json:"createdBy"`
// PrevAssignee 只读投影列,仅存在于 wf_hi_task(流转轨迹行的前一任办理人):
// 历史表查询按 WfTask 承接扫描结果时靠它带出该列。运行表 wf_task 无此列,
// gorm 的 -> 只读权限保证它不进任何 INSERT/UPDATE
PrevAssignee *string `gorm:"->;column:prev_assignee" json:"prevAssignee"`
CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"createdAt"` // 创建时间
UpdatedBy *string `gorm:"column:updated_by" json:"updatedBy"`
UpdatedAt *time.Time `gorm:"column:updated_at;comment:最后更新时间" json:"updatedAt"` // 最后更新时间
}
// TableName WfTask's table name
func (*WfTask) TableName() string {
return TableNameWfTask
}