Release v1.3.0 #100
3 changed files with 26 additions and 1 deletions
|
|
@ -14,6 +14,7 @@
|
||||||
* @property int $platform_channel_id
|
* @property int $platform_channel_id
|
||||||
* @property bool $is_active
|
* @property bool $is_active
|
||||||
* @property int $priority
|
* @property int $priority
|
||||||
|
* @property bool|null $auto_approve
|
||||||
* @property Carbon $created_at
|
* @property Carbon $created_at
|
||||||
* @property Carbon $updated_at
|
* @property Carbon $updated_at
|
||||||
*/
|
*/
|
||||||
|
|
@ -34,10 +35,12 @@ class Route extends Model
|
||||||
'platform_channel_id',
|
'platform_channel_id',
|
||||||
'is_active',
|
'is_active',
|
||||||
'priority',
|
'priority',
|
||||||
|
'auto_approve',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'is_active' => 'boolean',
|
'is_active' => 'boolean',
|
||||||
|
'auto_approve' => 'boolean',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('routes', function (Blueprint $table) {
|
||||||
|
$table->boolean('auto_approve')->nullable()->after('priority');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('routes', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('auto_approve');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -15,7 +15,7 @@ class RouteTest extends TestCase
|
||||||
|
|
||||||
public function test_fillable_fields(): void
|
public function test_fillable_fields(): void
|
||||||
{
|
{
|
||||||
$fillableFields = ['feed_id', 'platform_channel_id', 'is_active', 'priority'];
|
$fillableFields = ['feed_id', 'platform_channel_id', 'is_active', 'priority', 'auto_approve'];
|
||||||
$route = new Route;
|
$route = new Route;
|
||||||
|
|
||||||
$this->assertEquals($fillableFields, $route->getFillable());
|
$this->assertEquals($fillableFields, $route->getFillable());
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue