package model import "time" // TaskLog records the execution of a plugin or processor run. type TaskLog struct { ID uint `gorm:"primaryKey;autoIncrement" json:"id"` TaskType string `gorm:"size:50;not null;index" json:"task_type"` // collect / clean PluginName string `gorm:"size:100" json:"plugin_name"` Status string `gorm:"size:20;default:'pending';index" json:"status"` // pending / running / completed / failed / stopped ItemsProcessed int `gorm:"default:0" json:"items_processed"` MerchantsAdded int `gorm:"default:0" json:"merchants_added"` ErrorsCount int `gorm:"default:0" json:"errors_count"` StartedAt *time.Time `json:"started_at"` FinishedAt *time.Time `json:"finished_at"` Detail string `gorm:"type:text" json:"detail"` CreatedAt time.Time `json:"created_at"` }