Files
2026-01-26 17:07:35 +01:00

55 lines
2.2 KiB
Go

package models
import "time"
// MetaScore represents a simple SEO meta score and issues.
type MetaScore struct {
Title string `json:"title"`
Description string `json:"description"`
TitleScore int `json:"title_score"`
DescriptionScore int `json:"description_score"`
TitleIssues []string `json:"title_issues"`
DescriptionIssues []string `json:"description_issues"`
}
// ExternalImageIssue represents an image hosted on an external domain.
type ExternalImageIssue struct {
URL string `json:"url"`
Host string `json:"host"`
Source string `json:"source"` // src or srcset
}
// PostImageAudit summarizes external image findings for a post.
type PostImageAudit struct {
PostID int `json:"post_id"`
PostTitle string `json:"post_title"`
PostURL string `json:"post_url"`
ExternalCount int `json:"external_count"`
ExternalImages []ExternalImageIssue `json:"external_images"`
Meta *MetaScore `json:"meta,omitempty"`
}
// FeaturedImageMismatch represents a mismatch between EN and ES featured images.
type FeaturedImageMismatch struct {
EnglishPostID int `json:"english_post_id"`
SpanishPostID int `json:"spanish_post_id"`
EnglishTitle string `json:"english_title"`
SpanishTitle string `json:"spanish_title"`
EnglishURL string `json:"english_url"`
SpanishURL string `json:"spanish_url"`
EnglishFeaturedID int `json:"english_featured_id"`
SpanishFeaturedID int `json:"spanish_featured_id"`
}
// ImageAuditReport is a snapshot of external image issues and meta health.
type ImageAuditReport struct {
ID string `json:"id"`
CreatedAt time.Time `json:"created_at"`
DurationMs int64 `json:"duration_ms"`
TotalPosts int `json:"total_posts"`
ImagesChecked int `json:"images_checked"`
TotalExternalImages int `json:"total_external_images"`
Posts []PostImageAudit `json:"posts"`
FeaturedImageMismatches []FeaturedImageMismatch `json:"featured_image_mismatches"`
}