This commit is contained in:
@@ -9,6 +9,7 @@ use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
use Illuminate\Database\Eloquent\Attributes\Hidden;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||
@@ -30,6 +31,7 @@ use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
* @property WorkspaceType $type
|
||||
* @property bool $personal_workspace
|
||||
* @property bool $lifetime_access
|
||||
* @property int|null $plan_id
|
||||
* @property string|null $stripe_id
|
||||
* @property string|null $pm_type
|
||||
* @property string|null $pm_last_four
|
||||
@@ -37,7 +39,7 @@ use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
*/
|
||||
#[Fillable(['name', 'type', 'personal_workspace', 'lifetime_access'])]
|
||||
#[Fillable(['name', 'type', 'personal_workspace', 'lifetime_access', 'plan_id'])]
|
||||
#[Hidden(['stripe_id'])]
|
||||
class Organization extends Model
|
||||
{
|
||||
@@ -69,6 +71,14 @@ class Organization extends Model
|
||||
->withTimestamps();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsTo<Plan, $this>
|
||||
*/
|
||||
public function plan(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Plan::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return HasMany<Folder, $this>
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user