package inspection

import (
	"time"

	"dc-inspection/pkg/database"
)

// Record 巡检记录统一结构（各巡检模块的输出格式）
type Record struct {
	InspectionType string
	Target         string
	Status         string
	Metrics        string
	Details        string
	Message        string
	InspectedAt    time.Time
}

// ToDBRecord 转换为 database.InspectionRecord
func (r *Record) ToDBRecord() *database.InspectionRecord {
	return &database.InspectionRecord{
		InspectionType: r.InspectionType,
		Target:         r.Target,
		Status:         r.Status,
		Metrics:        r.Metrics,
		Details:        r.Details,
		Message:        r.Message,
		InspectedAt:    r.InspectedAt,
	}
}
