mirror of https://github.com/pixelfed/pixelfed
Add Federated Reports
parent
c294368b8f
commit
383c6fe8ee
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class RemoteReport extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $casts = [
|
||||
'status_ids' => 'array',
|
||||
'action_taken_meta' => 'array',
|
||||
'report_meta' => 'array'
|
||||
];
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
<?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('remote_reports', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->json('status_ids')->nullable();
|
||||
$table->text('comment')->nullable();
|
||||
$table->bigInteger('account_id')->unsigned()->nullable();
|
||||
$table->string('uri')->nullable();
|
||||
$table->unsignedInteger('instance_id')->nullable();
|
||||
$table->timestamp('action_taken_at')->nullable()->index();
|
||||
$table->json('report_meta')->nullable();
|
||||
$table->json('action_taken_meta')->nullable();
|
||||
$table->bigInteger('action_taken_by_account_id')->unsigned()->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('remote_reports');
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue