mirror of
https://github.com/the-programmers-hangout/Hermes.git
synced 2026-09-04 09:15:59 +02:00
40 lines
739 B
PHP
40 lines
739 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class EmoteLog extends Model
|
|
{
|
|
protected $fillable = [
|
|
'emote_id',
|
|
'user_id',
|
|
'guild_id',
|
|
'channel_id',
|
|
'message_id',
|
|
'emoji_unicode',
|
|
];
|
|
|
|
protected $casts = [
|
|
'emote_id' => 'string',
|
|
'guild_id' => 'string',
|
|
'channel_id' => 'string',
|
|
'message_id' => 'string',
|
|
'emoji_unicode' => 'boolean',
|
|
];
|
|
|
|
public function emote()
|
|
{
|
|
return $this->belongsTo(
|
|
Emote::class,
|
|
'emote_id',
|
|
'emote_id'
|
|
);
|
|
}
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class, 'user_id', 'discord_id');
|
|
}
|
|
}
|