keyType = 'string'; $this->incrementing = false; } public function newUniqueId(): string { return (string) UuidHelper::v7(); } 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 => is_string($this->{$this->getKeyName()}) ? CarbonImmutable::instance(UuidHelper::toDateTime(UuidHelper::fromString($this->{$this->getKeyName()}))) : null, ); } }