'datetime', ]; public function merchant(): BelongsTo { return $this->belongsTo(Merchant::class, 'merchant_id'); } public function merchantId(): ?int { return $this->merchant_id ? (int) $this->merchant_id : null; } public function isPlatformAdmin(): bool { return $this->merchantId() === null; } public function isMerchantAdmin(): bool { return $this->merchantId() !== null; } public function platformLabel(): string { return $this->isPlatformAdmin() ? 'platform' : 'merchant'; } }