(int)$model->id, 'name' => $model->name, 'type' => $model->type, 'start_date' => $model->start_date, 'end_date' => $model->end_date, 'weeks' => $model->weeks, 'assign_admin_ids' => $model->assign_admin_ids, 'assign_admin' => $model->assign_admin, 'admin' => $model->admin, 'paper_id' => $model->paper_id, 'allot_nums' => PaperResult::query()->where('paper_id', $model->paper_id)->where('status', ModelStatusEnum::OK)->count(), 'paper' => $model->paper, 'status' => $model->status, 'created_at' => $model->created_at->format(Carbon::DEFAULT_TO_STRING_FORMAT), 'updated_at' => $model->updated_at->format(Carbon::DEFAULT_TO_STRING_FORMAT) ]; } }