'datetime']; } protected static function booted(): void { static::creating(function (DentalChart $chart) { if (! $chart->uuid) { $chart->uuid = (string) Str::uuid(); } }); } public function getRouteKeyName(): string { return 'uuid'; } public function organization(): BelongsTo { return $this->belongsTo(Organization::class, 'organization_id'); } public function patient(): BelongsTo { return $this->belongsTo(Patient::class, 'patient_id'); } public function teeth(): HasMany { return $this->hasMany(DentalTooth::class, 'dental_chart_id'); } public function events(): HasMany { return $this->hasMany(DentalChartEvent::class, 'dental_chart_id'); } }