*/ protected $fillable = [ 'contact_id', 'name', 'active', ]; /** * The attributes that should be cast to native types. * * @var array */ protected $casts = [ 'active' => 'boolean', ]; /** * Get the contact associated with the goal. * * @return \Illuminate\Database\Eloquent\Relations\BelongsTo<\App\Models\Contact, $this> */ public function contact(): BelongsTo { return $this->belongsTo(Contact::class); } /** * Get the streaks associated with the goal. * * @return \Illuminate\Database\Eloquent\Relations\HasMany<\App\Models\Streak, $this> */ public function streaks(): HasMany { return $this->hasMany(Streak::class); } /** * Get the goal's feed item. * * @return \Illuminate\Database\Eloquent\Relations\MorphOne<\App\Models\ContactFeedItem, $this> */ public function feedItem(): MorphOne { return $this->morphOne(ContactFeedItem::class, 'feedable'); } }