2024-07-27 15:40:35 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
class CurrentState extends Model
|
|
|
|
{
|
|
|
|
use HasFactory;
|
|
|
|
|
|
|
|
protected $table = 'current_state';
|
|
|
|
|
2024-07-28 18:06:05 -04:00
|
|
|
protected $fillable = ['game_session_id', 'x', 'y', 'palette_color_id', 'updated_by', 'updated_at'];
|
|
|
|
|
|
|
|
public function gameSession()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(GameSession::class);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function color()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(PaletteColor::class, 'palette_color_id');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function updatedBy()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(TwitchUser::class, 'updated_by');
|
|
|
|
}
|
2024-07-27 15:40:35 -04:00
|
|
|
}
|