Skip to content

Commit

Permalink
Rename quote field to quota
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasdotvin committed May 19, 2022
1 parent 03d9272 commit 1e7220d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions database/factories/FeatureFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function definition()
PeriodicityType::Week,
PeriodicityType::Day,
]),
'quote' => false,
'quota' => false,
];
}

Expand All @@ -41,27 +41,27 @@ public function consumable()
public function notConsumable()
{
return $this->state(fn (array $attributes) => [
'quote' => false,
'quota' => false,
'consumable' => false,
'periodicity' => null,
'periodicity_type' => null,
]);
}

public function quote()
public function quota()
{
return $this->state(fn (array $attributes) => [
'consumable' => true,
'quote' => true,
'quota' => true,
'periodicity' => null,
'periodicity_type' => null,
]);
}

public function notQuote()
public function notQuota()
{
return $this->state(fn (array $attributes) => [
'quote' => false,
'quota' => false,
]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function up()
$table->id();
$table->string('name');
$table->boolean('consumable');
$table->boolean('quote')->default(false);
$table->boolean('quota')->default(false);
$table->unsignedInteger('periodicity')->nullable();
$table->string('periodicity_type')->nullable();
$table->softDeletes();
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Feature.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Feature extends Model
'name',
'periodicity_type',
'periodicity',
'quote',
'quota',
];

public function plans()
Expand Down

0 comments on commit 1e7220d

Please sign in to comment.