$this->id, 'base_name' => $this->whenLoaded('base', function () { return $this->base?->name ?? ''; }, ''), 'point_name' => $this->whenLoaded('device', function () { return $this->device?->monitoring_point ?? ''; }, ''), 'device_type' => $this->whenLoaded('device', function () { return $this->device?->type ?? 0; }, ''), 'lv' => $this->lv, 'status' => $this->status, 'content' => $this->content, 'created_at' => strtotime($this->created_at) ?? 0, //录入时间 ]; } }