Files
backend/internal/models/job.go

25 lines
849 B
Go

package models
import "time"
// ImportJobStatus определяет возможные статусы задачи импорта
type ImportJobStatus string
const (
JobStatusPending ImportJobStatus = "pending"
JobStatusDownloading ImportJobStatus = "downloading"
JobStatusProcessing ImportJobStatus = "processing"
JobStatusCompleted ImportJobStatus = "completed"
JobStatusFailed ImportJobStatus = "failed"
)
// ImportJob представляет задачу на импорт модпака
type ImportJob struct {
ID int `json:"id"`
Status ImportJobStatus `json:"status"`
Progress int `json:"progress"` // 0-100
ErrorMessage string `json:"error_message,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}