*/ use HasFactory; use HasUuids; /** * The table associated with the model. * * @var string */ protected $table = 'organization_invitations'; /** * Get the attributes that should be cast. * * @return array */ public function casts(): array { return [ 'accepted_at' => 'datetime', ]; } /** * Get the organization that the invitation belongs to. * * @return BelongsTo */ public function organization(): BelongsTo { return $this->belongsTo(Organization::class, 'organization_id'); } /** * Get the organization that the invitation belongs to. * * @return BelongsTo */ public function team(): BelongsTo { return $this->belongsTo(Organization::class, 'organization_id'); } }