2024-10-15 09:23:33 +00:00
|
|
|
package models
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
type ScrapeHistory struct {
|
2024-10-15 10:25:32 +00:00
|
|
|
ScrapeTaskID ScrapeTaskID `json:"scrape_task_id" gorm:"primaryKey"`
|
|
|
|
UserSourceID UserSourceID `json:"user_source_id" gorm:""`
|
|
|
|
CreatedAt time.Time `json:"created_at" gorm:""`
|
|
|
|
FinishedAt time.Time `json:"finished_at" gorm:""`
|
|
|
|
Error string `json:"error" gorm:"null"`
|
|
|
|
AddedPosts int `json:"added_posts" gorm:"not null"`
|
|
|
|
DeletedPosts int `json:"deleted_posts" gorm:"not null"`
|
2024-10-15 09:23:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (ScrapeHistory) TableName() string {
|
|
|
|
return "ScrapeHistory"
|
|
|
|
}
|