'array', 'last_online_at' => 'datetime', ]; } protected static function booted(): void { static::creating(function (self $device) { $device->uuid ??= (string) Str::uuid(); }); } public function organization(): BelongsTo { return $this->belongsTo(Organization::class, 'organization_id'); } public function branch(): BelongsTo { return $this->belongsTo(Branch::class, 'branch_id'); } }