Initialer Laravel Commit für BetiX
This commit is contained in:
34
app/Models/GuildMember.php
Normal file
34
app/Models/GuildMember.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class GuildMember extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'guild_id',
|
||||
'user_id',
|
||||
'role', // owner, admin, member
|
||||
'wagered',
|
||||
'joined_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'joined_at' => 'datetime',
|
||||
'wagered' => 'decimal:4',
|
||||
];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
public function guild()
|
||||
{
|
||||
return $this->belongsTo(Guild::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user