|
|
@@ -34,8 +34,7 @@ func ToCloudBrain(task *models.Cloudbrain) *api.Cloudbrain { |
|
|
|
|
|
|
|
StartTime: int64(task.StartTime), |
|
|
|
EndTime: int64(task.EndTime), |
|
|
|
|
|
|
|
Spec: ToSpecification(task.Spec), |
|
|
|
Spec: ToSpecification(task.Spec), |
|
|
|
} |
|
|
|
} |
|
|
|
func ToAttachment(attachment *models.Attachment) *api.AttachmentShow { |
|
|
@@ -89,6 +88,9 @@ func ToDataset(dataset *models.Dataset) *api.Dataset { |
|
|
|
} |
|
|
|
|
|
|
|
func ToSpecification(s *models.Specification) *api.SpecificationShow { |
|
|
|
if s == nil { |
|
|
|
return nil |
|
|
|
} |
|
|
|
return &api.SpecificationShow{ |
|
|
|
ID: s.ID, |
|
|
|
AccCardsNum: s.AccCardsNum, |
|
|
|