Build world campaigns rewards and recaps
This commit is contained in:
45
app/Models/WorldEditorialSuggestionState.php
Normal file
45
app/Models/WorldEditorialSuggestionState.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class WorldEditorialSuggestionState extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
public const STATUS_PINNED = 'pinned';
|
||||
|
||||
public const STATUS_DISMISSED = 'dismissed';
|
||||
|
||||
public const STATUS_NOT_RELEVANT = 'not_relevant';
|
||||
|
||||
protected $fillable = [
|
||||
'world_id',
|
||||
'related_type',
|
||||
'related_id',
|
||||
'status',
|
||||
'section_key',
|
||||
'acted_by_user_id',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'related_id' => 'integer',
|
||||
'world_id' => 'integer',
|
||||
'acted_by_user_id' => 'integer',
|
||||
];
|
||||
|
||||
public function world(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(World::class);
|
||||
}
|
||||
|
||||
public function actor(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'acted_by_user_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user