otter-space-sdk/pkg/models/scrape_history.go
SoXX 4312cbdff5
All checks were successful
Gitea Build Check / Build (pull_request) Successful in 3m4s
feat(database): added model
- added model
- added test for model
2024-10-15 11:23:42 +02:00

20 lines
541 B
Go

package models
import (
"time"
)
type ScrapeHistory struct {
ScrapeTaskID string `json:"scrape_task_id" gorm:"primaryKey"`
UserSourceID string `json:"user_source_id" gorm:""`
CreatedAt time.Time `json:"created_at" gorm:""`
FinishedAt time.Time `json:"finished_at" gorm:"null"`
Error string `json:"error" gorm:"null"`
AddedPosts int `json:"added_posts" gorm:"not null"`
DeletedPosts int `json:"deleted_posts" gorm:"not null"`
}
func (ScrapeHistory) TableName() string {
return "ScrapeHistory"
}