user-detail

This commit is contained in:
xiaomlove
2021-04-27 19:13:32 +08:00
parent d1b7561aae
commit d2e05c812e
20 changed files with 594 additions and 50 deletions

View File

@@ -25,8 +25,11 @@ class ExamUserResource extends JsonResource
'status_text' => $this->statusText,
'created_at' => formatDatetime($this->created_at),
'progress' => $this->when($this->progress, $this->progress),
'progress_formatted' => $this->when($this->progress_formatted, $this->progress_formatted),
'begin' => formatDatetime($this->begin),
'end' => formatDatetime($this->end),
'uid' => $this->uid,
'exam_id' => $this->exam_id,
'user' => new UserResource($this->whenLoaded('user')),
'exam' => new ExamResource($this->whenLoaded('exam')),
];