| 1234567891011121314151617181920 |
- package model
- import (
- "time"
- "gorm.io/datatypes"
- )
- type Task struct {
- ID uint `gorm:"primaryKey;autoIncrement" json:"id"`
- TaskType string `gorm:"type:enum('full','discover','search','github','scrape','crawl','clean','score');not null;index" json:"task_type"`
- Status string `gorm:"type:enum('pending','running','completed','failed','stopped');default:'pending';index" json:"status"`
- Params datatypes.JSON `gorm:"type:json" json:"params"`
- Progress datatypes.JSON `gorm:"type:json" json:"progress"`
- Result datatypes.JSON `gorm:"type:json" json:"result"`
- ErrorMsg string `gorm:"type:text" json:"error_msg"`
- StartedAt *time.Time `json:"started_at"`
- FinishedAt *time.Time `json:"finished_at"`
- CreatedAt time.Time `json:"created_at"`
- }
|