'datetime', 'metadata' => 'array', 'access_token' => 'encrypted', 'refresh_token' => 'encrypted', ]; } protected static function booted(): void { static::creating(function (CalendarConnection $connection) { if (empty($connection->uuid)) { $connection->uuid = (string) Str::uuid(); } }); } public function organization(): BelongsTo { return $this->belongsTo(Organization::class, 'organization_id'); } public function isExpired(): bool { return $this->expires_at !== null && $this->expires_at->isPast(); } }