2024-11-14 17:02:41 +08:00
|
|
|
package model
|
|
|
|
|
|
|
|
import (
|
|
|
|
"approveflow/app/base"
|
2024-11-19 17:03:12 +08:00
|
|
|
"encoding/json"
|
2024-11-14 17:02:41 +08:00
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
// BatchApprovalTask 批量审批任务表
|
|
|
|
type BatchApprovalTask struct {
|
|
|
|
ID int64 `gorm:"primaryKey;autoIncrement" json:"id"` // 主键ID
|
|
|
|
ApproverID int64 `gorm:"not null" json:"approver_id"` // 审批人ID
|
|
|
|
InstanceStepIDs []int64 `gorm:"type:json" json:"instance_step_ids"` // 批量审批的步骤实例ID列表
|
|
|
|
Status string `gorm:"type:varchar(50);not null" json:"status"` // 任务状态
|
|
|
|
Comments string `gorm:"type:text" json:"comments"` // 批量审批的意见
|
|
|
|
ActionTime time.Time `json:"action_time"` // 审批时间
|
|
|
|
base.Model
|
|
|
|
}
|
2024-11-19 17:03:12 +08:00
|
|
|
|
|
|
|
type BatchApprovalTaskContent struct {
|
|
|
|
InstanceID int64
|
|
|
|
InstanceStepID int64
|
|
|
|
base.Model
|
|
|
|
}
|
|
|
|
|
|
|
|
func (task *BatchApprovalTask) MarshalBinary() ([]byte, error) {
|
|
|
|
return json.Marshal(task)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (task *BatchApprovalTask) UnmarshalBinary(data []byte) error {
|
|
|
|
return json.Unmarshal(data, task)
|
|
|
|
}
|