39 lines
1001 B
Go
39 lines
1001 B
Go
package models
|
|
|
|
type ImageTaskInput struct {
|
|
SourcePath string `json:"sourcePath"`
|
|
Operation string `json:"operation"`
|
|
}
|
|
|
|
type ImageTaskFilter struct {
|
|
Status string `json:"status"`
|
|
Operation string `json:"operation"`
|
|
Limit int `json:"limit"`
|
|
Offset int `json:"offset"`
|
|
}
|
|
|
|
type ImageTask struct {
|
|
ID int64 `json:"id"`
|
|
SourcePath string `json:"sourcePath"`
|
|
Status string `json:"status"`
|
|
Operation string `json:"operation"`
|
|
DurationMs int64 `json:"durationMs"`
|
|
ErrorMessage string `json:"errorMessage"`
|
|
CreatedAt string `json:"createdAt"`
|
|
UpdatedAt string `json:"updatedAt"`
|
|
}
|
|
|
|
type ImageTaskResult struct {
|
|
ID int64 `json:"id"`
|
|
TaskID int64 `json:"taskId"`
|
|
OutputPath string `json:"outputPath"`
|
|
BeforeSize int64 `json:"beforeSize"`
|
|
AfterSize int64 `json:"afterSize"`
|
|
CreatedAt string `json:"createdAt"`
|
|
}
|
|
|
|
type ImageTaskDetail struct {
|
|
Task ImageTask `json:"task"`
|
|
Result ImageTaskResult `json:"result"`
|
|
}
|