first(); $status = $this->faker->randomElement([DeviceRecord::STATUS_SUCCESS, DeviceRecord::STATUS_FAIL]); $data = [ 'title' => $this->faker->word(), 'description' => $this->faker->sentence(), 'content' => $this->faker->paragraph(), ]; $result_success = ['code' => 0, 'msg' => '成功']; $result_fail = ['code' => 1, 'msg' => '请求超时']; return [ 'data' => $data, 'device_id' => $device->id, 'result' => $status ? $result_success : $result_fail, 'status' => $status, 'store_id' => $device->store_id, ]; } }