'datetime', 'expires_at' => 'datetime', ]; } public function workspace(): BelongsTo { return $this->belongsTo(Workspace::class); } protected function keyHint(): Attribute { return Attribute::make( get: fn () => 'tp_'.substr($this->token_lookup, 0, 8).'...', ); } protected function status(): Attribute { return Attribute::make( get: function () { if ($this->expires_at === null) { return Status::Active->value; } return now()->greaterThan($this->expires_at) ? Status::Expired->value : Status::Active->value; } ); } }