Files
Deathgarden_Rebirth-Rewrite/dist/app/Models/Game/PickedChallenge.php
Vari 76f6a50b5a Added Signature challenges and Picked challenges to the Database and changed all relations to reflect this.
Also update updateMetadatagroup to only update picked challenges when to challenge already exists for that item.

Updated the import-catalog command to also import the signature challenges and associate them with the items that want them.
2024-02-28 03:20:51 +01:00

37 lines
739 B
PHP

<?php
namespace App\Models\Game;
use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* @mixin IdeHelperPickedChallenge
*/
class PickedChallenge extends Model
{
use HasFactory, HasUuids;
protected $fillable = [
'id',
'completion_value',
'asset_path',
];
protected $attributes = [
'progress' => 0,
];
public function characterData(): BelongsTo
{
return $this->belongsTo(CharacterData::class);
}
public function catalogItem(): BelongsTo
{
return $this->belongsTo(CatalogItem::class);
}
}