Files
myaac/system/src/Models/Changelog.php
slawkens bde158e3d7 Database import tables on every install with "IF NOT EXISTS"
This fixed errors when one table is missing or is duplicated
2025-10-25 22:11:33 +02:00

34 lines
580 B
PHP

<?php
namespace MyAAC\Models;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $id
* @property int $type
* @property int $where
* @property string $body
* @property int $player_id
* @property int $date
*/
class Changelog extends Model {
protected $table = TABLE_PREFIX . 'changelog';
public $timestamps = false;
protected $fillable = [
'body', 'type', 'where',
'date', 'player_id', 'hide',
];
public function scopeIsPublic($query) {
$query->where('hide', '!=', 1);
}
public function player() {
return $this->belongsTo(Player::class);
}
}