mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
- Updated timestamp fields across the codebase from `*_ts` to `*_at` for consistency and clarity. - Renamed constants for node status from "on"/"off" to "online"/"offline" to better reflect their meanings. - Enhanced validation and error handling in various components to ensure data integrity. - Refactored test cases to align with the new naming conventions and improve readability.
52 lines
959 B
Go
52 lines
959 B
Go
package entity
|
|
|
|
import (
|
|
"go.mongodb.org/mongo-driver/bson"
|
|
"time"
|
|
)
|
|
|
|
type Export struct {
|
|
Id string `json:"id"`
|
|
Type string `json:"type"`
|
|
Target string `json:"target"`
|
|
Query bson.M `json:"query"`
|
|
Status string `json:"status"`
|
|
StartedAt time.Time `json:"started_at"`
|
|
EndedAt time.Time `json:"ended_at"`
|
|
FileName string `json:"file_name"`
|
|
DownloadPath string `json:"-"`
|
|
Limit int `json:"-"`
|
|
}
|
|
|
|
func (e *Export) GetId() string {
|
|
return e.Id
|
|
}
|
|
|
|
func (e *Export) GetType() string {
|
|
return e.Type
|
|
}
|
|
|
|
func (e *Export) GetTarget() string {
|
|
return e.Target
|
|
}
|
|
|
|
func (e *Export) GetQuery() bson.M {
|
|
return e.Query
|
|
}
|
|
|
|
func (e *Export) GetStatus() string {
|
|
return e.Status
|
|
}
|
|
|
|
func (e *Export) GetStartTs() time.Time {
|
|
return e.StartedAt
|
|
}
|
|
|
|
func (e *Export) GetEndTs() time.Time {
|
|
return e.EndedAt
|
|
}
|
|
|
|
func (e *Export) GetDownloadPath() string {
|
|
return e.DownloadPath
|
|
}
|