keyType = 'string'; $this->incrementing = false; } public function newUniqueId(): string { return (string) Uuid::uuid7(); } public function getCreatedAtColumn() { return null; } /** * @return \Illuminate\Database\Eloquent\Casts\Attribute<\Carbon\CarbonInterface|null,never> */ protected function createdAt(): Attribute { return Attribute::make( get: fn (): ?CarbonInterface => $this->{$this->getKeyName()} ? CarbonImmutable::instance(UuidV7::fromString($this->{$this->getKeyName()})->getDateTime()) : null, ); } }