-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
db298b3
commit 582d9b7
Showing
4 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Enums; | ||
|
||
use App\Concerns\Enums\Arrayable; | ||
use App\Concerns\Enums\Comparable; | ||
use App\Concerns\Enums\HasLabel; | ||
|
||
enum BadgeRules: string | ||
{ | ||
use Arrayable; | ||
use Comparable; | ||
use HasLabel; | ||
|
||
case ACTIVITY_REGISTER_AS_USER = 'activity_register_as_user'; | ||
case DONATION_FIRST_COUNTER_DONATION = 'donation_first_counter_donation'; | ||
case DONATION_THREE_COUNTER_DONATION = 'donation_three_counter_donation'; | ||
case DONATION_TEN_COUNTER_DONATION = 'donation_ten_counter_donation'; | ||
case DONATION_FIFTEEN_COUNTER_DONATION = 'donation_fifteen_counter_donation'; | ||
case DONATION_TWENTY_FIVE_COUNTER_DONATION = 'donation_twenty_five_counter_donation'; | ||
case DONATION_FIFTY_COUNTER_DONATION = 'donation_fifty_counter_donation'; | ||
case DONATION_ONE_HUNDRED_AMOUNT_DONATION = 'donation_one_hundred_amount_donation'; | ||
case DONATION_FIVE_HUNDRED_AMOUNT_DONATION = 'donation_five_hundred_amount_donation'; | ||
case DONATION_ONE_THOUSAND_AMOUNT_DONATION = 'donation_one_thousand_amount_donation'; | ||
case DONATION_ONE_THOUSAND_FIVE_HUNDRED_AMOUNT_DONATION = 'donation_one_thousand_five_hundred_amount_donation'; | ||
case DONATION_TWO_THOUSAND_AMOUNT_DONATION = 'donation_two_thousand_amount_donation'; | ||
|
||
case DONATION_THREE_TIME_SAME_ORGANIZATION = 'donation_three_time_same_organization'; | ||
case DONATION_TOP_DONOR_ON_PROJECT = 'donation_top_donor_on_project'; | ||
case SHARING_FIRST_SHARE = 'sharing_first_share'; | ||
case SHARING_FIVE_SHARES = 'sharing_five_shares'; | ||
|
||
|
||
|
||
public function labelKeyPrefix(): string | ||
{ | ||
return 'badge.types'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
database/migrations/2023_10_23_112317_import_automated_badges.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
|
||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
// | ||
} | ||
}; |