PixelPlacerBot/app/Models/CommandHistory.php

31 lines
658 B
PHP
Raw Normal View History

2024-07-27 15:40:35 -04:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class CommandHistory extends Model
{
use HasFactory;
2024-07-28 18:06:05 -04:00
protected $table = 'command_history'; // Specify the correct table name
2024-07-27 15:40:35 -04:00
2024-07-28 18:06:05 -04:00
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);
}
2024-07-27 15:40:35 -04:00
}