*/ protected $fillable = [ 'tenant_id', 'user_id', 'role', 'experience_years', 'rating', 'skills', 'bio', ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'experience_years' => 'integer', 'rating' => 'decimal:2', 'skills' => 'array', ]; /** * Get the club that owns the instructor. */ public function tenant(): BelongsTo { return $this->belongsTo(Tenant::class); } /** * Get the user associated with the instructor. */ public function user(): BelongsTo { return $this->belongsTo(User::class); } /** * Get the packages that include this instructor. */ public function packages(): BelongsToMany { return $this->belongsToMany(ClubPackage::class, 'club_package_activities', 'instructor_id', 'package_id') ->withTimestamps(); } }