game-village-politics-backend/app/Models/ChatMessage.php

26 lines
476 B
PHP
Raw Permalink Normal View History

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class ChatMessage extends Model
{
public $timestamps = false;
protected $guarded = [];
protected $dateFormat = 'Y-m-d H:i:s.v';
protected function casts(): array
{
return ['created_at' => 'immutable_datetime'];
}
public function player(): BelongsTo
{
return $this->belongsTo(Player::class);
}
}