-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Showing
13 changed files
with
171 additions
and
19 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
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,5 @@ | ||
<?php | ||
|
||
return [ | ||
// sync does not configure anything | ||
]; |
40 changes: 40 additions & 0 deletions
40
database/migrations/2024_03_06_142650_01_create_platforms_table.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,40 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Facades\Schema; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
return new class extends Migration { | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::create('platforms', function (Blueprint $table) { | ||
$table->bigIncrements('id'); | ||
$table->string('title'); | ||
$table->string('slug'); | ||
$table->string('domain'); | ||
$table->boolean('selection')->nullable(); | ||
$table->tinyInteger('order')->nullable(); | ||
$table->boolean('locked')->nullable(); | ||
$table->boolean('master')->nullable(); | ||
$table->string('thumbnail')->nullable(); | ||
$table->unsignedBigInteger('platformable_id'); | ||
$table->string('platformable_type'); | ||
|
||
$table->index('platformable_id'); | ||
$table->index('platformable_type'); | ||
|
||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
Schema::dropIfExists('platforms'); | ||
} | ||
}; |
32 changes: 32 additions & 0 deletions
32
database/migrations/2024_03_06_142651_02_create_syncs_table.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,32 @@ | ||
<?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 | ||
{ | ||
Schema::create('syncs', function (Blueprint $table) { | ||
$table->id(); | ||
$table->string('name')->nullable(); | ||
$table->timestamp('started_at')->nullable()->index(); | ||
$table->timestamp('finished_at')->nullable(); | ||
$table->boolean('failed')->default(false)->index(); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
|
||
{ | ||
Schema::dropIfExists('sync'); | ||
} | ||
}; |
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
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
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
33 changes: 33 additions & 0 deletions
33
packages/sync/src/Resources/PlatformResource/Pages/ListPlatforms.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,33 @@ | ||
<?php | ||
|
||
namespace Moox\Sync\Resources\PlatformResource\Pages; | ||
|
||
use Filament\Actions\CreateAction; | ||
use Filament\Resources\Pages\ListRecords; | ||
use Moox\Sync\Models\Platform; | ||
use Moox\Sync\Resources\PlatformResource; | ||
|
||
class ListPlatforms extends ListRecords | ||
{ | ||
public static string $resource = PlatformResource::class; | ||
|
||
public function getActions(): array | ||
{ | ||
return []; | ||
} | ||
|
||
public function getTitle(): string | ||
{ | ||
return __('sync::translations.title'); | ||
} | ||
|
||
protected function getHeaderActions(): array | ||
{ | ||
return [ | ||
CreateAction::make() | ||
->using(function (array $data, string $model): Platform { | ||
return $model::create($data); | ||
}), | ||
]; | ||
} | ||
} |
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
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