otter-space-sdk/pkg/models/scrape_history.go
SoXX 27bc719a02 feat(database): added CRUD
- added Create
- added Get
- added Update
- added Delete
2024-10-15 12:25:32 +02:00

20 lines
558 B
Go

package models
import (
"time"
)
type ScrapeHistory struct {
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"`
}
func (ScrapeHistory) TableName() string {
return "ScrapeHistory"
}