PixelPlacerBot/app/Models/CommandHistory.php
2024-07-28 18:06:05 -04:00

31 lines
658 B
PHP
Executable File

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class CommandHistory extends Model
{
use HasFactory;
protected $table = 'command_history'; // Specify the correct table name
protected $fillable = ['twitch_user_id', 'game_session_id', 'x', 'y', 'palette_color_id', 'timestamp'];
public function user()
{
return $this->belongsTo(TwitchUser::class);
}
public function gameSession()
{
return $this->belongsTo(GameSession::class);
}
public function color()
{
return $this->belongsTo(PaletteColor::class);
}
}