feat: add image optimization task model
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
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"`
|
||||
}
|
||||
Reference in New Issue
Block a user