build: initialize RetroHub with Laravel, Inertia, Vue, and Horizon
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Features\Settings\Models;
|
||||
|
||||
use App\Features\Games\Models\Game;
|
||||
use App\Models\User;
|
||||
use Database\Factories\SaveFileFactory;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class SaveFile extends Model
|
||||
{
|
||||
/** @use HasFactory<SaveFileFactory> */
|
||||
use HasFactory;
|
||||
|
||||
protected static ?string $factory = SaveFileFactory::class;
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'game_id',
|
||||
'file_path',
|
||||
'file_name',
|
||||
'file_size',
|
||||
'last_synced_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'last_synced_at' => 'datetime',
|
||||
];
|
||||
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
public function game(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Game::class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Features\Settings\Models;
|
||||
|
||||
use App\Models\User;
|
||||
use Database\Factories\UserSettingFactory;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class UserSetting extends Model
|
||||
{
|
||||
/** @use HasFactory<UserSettingFactory> */
|
||||
use HasFactory;
|
||||
|
||||
protected static ?string $factory = UserSettingFactory::class;
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'setting_key',
|
||||
'setting_value',
|
||||
];
|
||||
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user