新增小店抢购报告导出并优化停止条件
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
package types
|
||||
|
||||
import "time"
|
||||
|
||||
// XiaodianRunReport 保存一次和平小店抢购的可导出快照,不包含 Cookie 等敏感凭据。
|
||||
type XiaodianRunReport struct {
|
||||
ReportID string `json:"reportId"`
|
||||
StartedAt time.Time `json:"startedAt"`
|
||||
FinishedAt time.Time `json:"finishedAt"`
|
||||
Stopped bool `json:"stopped"`
|
||||
Accounts []XiaodianRunReportAccount `json:"accounts"`
|
||||
}
|
||||
|
||||
// XiaodianRunReportAccount 是单个账号在一次小店任务中的最终状态。
|
||||
type XiaodianRunReportAccount struct {
|
||||
AccountName string `json:"accountName"`
|
||||
ProductID string `json:"productId"`
|
||||
ProductName string `json:"productName"`
|
||||
ProductPrice int `json:"productPrice"`
|
||||
PayType int `json:"payType"`
|
||||
PayLabel string `json:"payLabel"`
|
||||
Attempts int `json:"attempts"`
|
||||
Status string `json:"status"`
|
||||
FailureReason string `json:"failureReason,omitempty"`
|
||||
LastMessage string `json:"lastMessage,omitempty"`
|
||||
RoleName string `json:"roleName,omitempty"`
|
||||
}
|
||||
|
||||
// XiaodianReportExportResult 是最近一次小店任务报告的导出结果。
|
||||
type XiaodianReportExportResult struct {
|
||||
Success bool `json:"success"`
|
||||
Cancelled bool `json:"cancelled"`
|
||||
FilePath string `json:"filePath,omitempty"`
|
||||
AccountCount int `json:"accountCount"`
|
||||
RecordCount int `json:"recordCount"`
|
||||
Error string `json:"error,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user