model

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 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 AsyncTask

type AsyncTask struct {
	ID        uint32 `gorm:"primary_key"`
	CreatedAt int64  `gorm:"autoCreateTime:milli;not null"`
	UpdatedAt int64  `gorm:"autoUpdateTime:milli;not null"`
	// 用户
	User string `gorm:"index:idx_async_task_user"`
	// 任务组
	Group string `gorm:"index:idx_async_task_group"`
	// 任务类型
	Type uint32 `gorm:"index:idx_async_task_type;not null"`
	// 状态
	State trans.TaskState `gorm:"index:idx_async_task_state;not null"`
	// 标记
	Mark trans.TaskMark `gorm:"index:idx_async_task_mark;not null"`
	// 结束时间戳(finished/failed)
	DoneAt int64 `gorm:"not null"`
	// 序列化上下文
	Ctx string `gorm:"type:longtext;not null"`
}

AsyncTask 异步任务 DB Model target变化不会导致state变化

Jump to

Keyboard shortcuts

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