Files
2026-02-05 19:23:03 +05:30

60 lines
1.7 KiB
Go

package models
import "time"
type Site struct {
ID int `json:"id"`
UUID string `json:"uuid"`
Domain string `json:"domain"`
URL string `json:"url"`
MaxDepth int `json:"max_depth"`
PageCount int `json:"page_count"`
Status string `json:"status"` // processing, completed, failed
IPAddress string `json:"ip_address"`
UserAgent string `json:"user_agent"`
Browser string `json:"browser"`
BrowserVersion string `json:"browser_version"`
OS string `json:"os"`
DeviceType string `json:"device_type"`
SessionID string `json:"session_id"`
Cookies string `json:"cookies"`
Referrer string `json:"referrer"`
CreatedAt time.Time `json:"created_at"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
LastCrawled *time.Time `json:"last_crawled,omitempty"`
}
type Page struct {
ID int `json:"id"`
SiteID int `json:"site_id"`
URL string `json:"url"`
Depth int `json:"depth"`
LastModified time.Time `json:"last_modified"`
Priority float64 `json:"priority"`
ChangeFreq string `json:"change_freq"`
}
type Event struct {
Type string `json:"type"`
Data interface{} `json:"data"`
}
type ProgressData struct {
UUID string `json:"uuid"`
PagesFound int `json:"pages_found"`
Depth int `json:"depth"`
CurrentURL string `json:"current_url"`
}
type CompleteData struct {
UUID string `json:"uuid"`
PagesFound int `json:"pages_found"`
SiteID int `json:"site_id"`
DownloadURL string `json:"download_url"`
}
type ErrorData struct {
UUID string `json:"uuid"`
Error string `json:"error"`
}