33 lines
1.0 KiB
Go
33 lines
1.0 KiB
Go
package model
|
|
|
|
import (
|
|
"approveflow/app/base"
|
|
"encoding/json"
|
|
"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
|
|
}
|
|
|
|
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)
|
|
}
|