diff --git a/.env.example b/.env.example index 08e84ecb2..5b1b1aab1 100644 --- a/.env.example +++ b/.env.example @@ -64,10 +64,6 @@ HE4RT_DISCORD_BOT_KEY= HE4RT_DISCORD_LEVELUP_CHANNEL= HE4RT_DISCORD_GUILD= -DB_TEST_DATABASE="dev_he4rtbot" -DB_TEST_USERNAME="root" -DB_TEST_PASSWORD="root" - DISCORD_OAUTH_CLIENT_ID= DISCORD_OAUTH_CLIENT_SECRET= DISCORD_OAUTH_SCOPES= diff --git a/.env.pipeline b/.env.pipeline deleted file mode 100644 index b2b976084..000000000 --- a/.env.pipeline +++ /dev/null @@ -1,69 +0,0 @@ -APP_NAME=Laravel -APP_ENV=local -APP_KEY= -APP_DEBUG=true -APP_URL=http://localhost - -LOG_CHANNEL=stack -LOG_DEPRECATIONS_CHANNEL=null -LOG_LEVEL=debug - -DB_CONNECTION=testing -DB_HOST=127.0.0.1 -DB_PORT=3306 - -DB_DATABASE=he4rt -DB_USERNAME=root -DB_PASSWORD=root - -BROADCAST_DRIVER=log -CACHE_DRIVER=file -FILESYSTEM_DISK=local -QUEUE_CONNECTION=sync -SESSION_DRIVER=file -SESSION_LIFETIME=120 - -MEMCACHED_HOST=127.0.0.1 - -REDIS_HOST=127.0.0.1 -REDIS_PASSWORD=null -REDIS_PORT=6379 - -MAIL_MAILER=smtp -MAIL_HOST=mailhog -MAIL_PORT=1025 -MAIL_USERNAME=null -MAIL_PASSWORD=null -MAIL_ENCRYPTION=null -MAIL_FROM_ADDRESS="hello@example.com" -MAIL_FROM_NAME="${APP_NAME}" - -AWS_ACCESS_KEY_ID= -AWS_SECRET_ACCESS_KEY= -AWS_DEFAULT_REGION=us-east-1 -AWS_BUCKET= -AWS_USE_PATH_STYLE_ENDPOINT=false - -PUSHER_APP_ID= -PUSHER_APP_KEY= -PUSHER_APP_SECRET= -PUSHER_HOST= -PUSHER_PORT=443 -PUSHER_SCHEME=https -PUSHER_APP_CLUSTER=mt1 - -VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}" -VITE_PUSHER_HOST="${PUSHER_HOST}" -VITE_PUSHER_PORT="${PUSHER_PORT}" -VITE_PUSHER_SCHEME="${PUSHER_SCHEME}" -VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" - -HE4RT_SEASON_ID= -HE4RT_BOT_SECRET= -HE4RT_DISCORD_BOT_KEY= -HE4RT_DISCORD_LEVELUP_CHANNEL= -HE4RT_DISCORD_GUILD= - -DB_TEST_DATABASE="dev_he4rtbot" -DB_TEST_USERNAME="root" -DB_TEST_PASSWORD="root" diff --git a/.env.testing.example b/.env.testing.example index dcb353ed8..571819056 100644 --- a/.env.testing.example +++ b/.env.testing.example @@ -64,3 +64,13 @@ HE4RT_DISCORD_LEVELUP_CHANNEL= HE4RT_DISCORD_GUILD= REDIS_URL=127.0.0.1 + +DISCORD_OAUTH_CLIENT_ID= +DISCORD_OAUTH_CLIENT_SECRET= +DISCORD_OAUTH_SCOPES= +DISCORD_OAUTH_REDIRECT_URI= + +TWITCH_OAUTH_SCOPES= +TWITCH_OAUTH_CLIENT_ID= +TWITCH_OAUTH_CLIENT_SECRET= +TWITCH_OAUTH_REDIRECT_URI= diff --git a/Makefile b/Makefile index 4c642c9af..f0ad15b39 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ help: ## Show available commands .PHONY: route-list route-list: ## List all registered routes - @php artisan route:list --ansi + @php artisan route:list --except-vendor --ansi .PHONY: pint pint: ## Run Pint code style fixer diff --git a/Taskfile.yml b/Taskfile.yml index 8248f514f..58e52ca26 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -17,7 +17,7 @@ tasks: route-list: desc: List all registered routes aliases: [rl] - cmd: 'php artisan route:list --ansi' + cmd: 'php artisan route:list --except-vendor --ansi' pint: desc: Run Pint code style fixer diff --git a/app-modules/character/database/factories/WalletFactory.php b/app-modules/character/database/factories/WalletFactory.php index 2ba14ebcc..475130162 100644 --- a/app-modules/character/database/factories/WalletFactory.php +++ b/app-modules/character/database/factories/WalletFactory.php @@ -7,10 +7,9 @@ use He4rt\Character\Models\Character; use He4rt\Character\Models\Wallet; use Illuminate\Database\Eloquent\Factories\Factory; -use Illuminate\Database\Eloquent\Model; /** - * @extends Factory + * @extends Factory */ final class WalletFactory extends Factory { diff --git a/app-modules/character/database/migrations/2025_11_18_100010_create_character_wallet_table.php b/app-modules/character/database/migrations/2025_11_18_100010_create_character_wallet_table.php new file mode 100644 index 000000000..6c0bb2e5b --- /dev/null +++ b/app-modules/character/database/migrations/2025_11_18_100010_create_character_wallet_table.php @@ -0,0 +1,20 @@ +id(); + $table->integer('balance')->default(0); + $table->foreignUuid('character_id')->constrained('characters')->cascadeOnDelete(); + $table->timestampsTz(); + }); + } +}; diff --git a/app-modules/character/src/Models/Wallet.php b/app-modules/character/src/Models/Wallet.php index b258ca6c3..ba87e5b9d 100644 --- a/app-modules/character/src/Models/Wallet.php +++ b/app-modules/character/src/Models/Wallet.php @@ -4,6 +4,8 @@ namespace He4rt\Character\Models; +use He4rt\Character\Database\Factories\WalletFactory; +use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; @@ -13,7 +15,10 @@ */ final class Wallet extends Model { - protected $table = 'character_wallet'; + /** @use HasFactory */ + use HasFactory; + + protected $table = 'characters_wallet'; protected $fillable = [ 'character_id', diff --git a/app-modules/events/src/Models/Pivot/EventAttend.php b/app-modules/events/src/Models/Pivot/EventAttend.php index 3e87ccd12..e50068519 100644 --- a/app-modules/events/src/Models/Pivot/EventAttend.php +++ b/app-modules/events/src/Models/Pivot/EventAttend.php @@ -9,7 +9,7 @@ class EventAttend extends Pivot { - protected $table = 'event_attend'; + protected $table = 'events_attendees'; protected $fillable = [ 'status', diff --git a/app-modules/season/database/migrations/2025_10_30_072203_create_sessions_table.php b/app-modules/season/database/migrations/2025_10_30_072203_create_sessions_table.php index 209e17dd2..3f86eaf32 100644 --- a/app-modules/season/database/migrations/2025_10_30_072203_create_sessions_table.php +++ b/app-modules/season/database/migrations/2025_10_30_072203_create_sessions_table.php @@ -15,7 +15,7 @@ public function up(): void { Schema::create('sessions', function (Blueprint $table): void { $table->string('id')->primary(); - $table->foreignId('user_id')->nullable()->index(); + $table->foreignUuid('user_id')->nullable()->index(); $table->string('ip_address', 45)->nullable(); $table->text('user_agent')->nullable(); $table->longText('payload'); diff --git a/app-modules/sponsors/database/migrations/2025_11_05_193141_create_events_sponsors_table.php b/app-modules/sponsors/database/migrations/2025_11_05_193141_create_events_sponsors_table.php index fb7d8a686..c8291ad3b 100644 --- a/app-modules/sponsors/database/migrations/2025_11_05_193141_create_events_sponsors_table.php +++ b/app-modules/sponsors/database/migrations/2025_11_05_193141_create_events_sponsors_table.php @@ -26,6 +26,6 @@ public function up(): void */ public function down(): void { - Schema::dropIfExists('event_sponsors'); + Schema::dropIfExists('events_sponsors'); } }; diff --git a/app-modules/sponsors/src/Models/Pivot/SponsorAttend.php b/app-modules/sponsors/src/Models/Pivot/SponsorAttend.php index 6a1f3d55b..7c0ced96b 100644 --- a/app-modules/sponsors/src/Models/Pivot/SponsorAttend.php +++ b/app-modules/sponsors/src/Models/Pivot/SponsorAttend.php @@ -9,7 +9,7 @@ class SponsorAttend extends Pivot { - protected $table = 'sponsor_attend'; + protected $table = 'events_sponsors'; protected $fillable = [ 'level', diff --git a/composer.json b/composer.json index 7f093f430..8286c7eb8 100644 --- a/composer.json +++ b/composer.json @@ -94,7 +94,7 @@ "ide-helper": [ "@php artisan ide-helper:generate -q", "@php artisan ide-helper:meta -q", - "@php artisan ide-helper:models -q -N" + "@php artisan ide-helper:models -q -N --dir='app-modules/*/src/Models' --dir='app/Models'" ], "setup": [ "composer install",