2021-03-03 10:48:34 +00:00
|
|
|
<?php
|
2021-03-03 11:56:14 +00:00
|
|
|
namespace Backend\Models;
|
2021-03-03 10:48:34 +00:00
|
|
|
use Illuminate\Database\Eloquent\Model as Eloquent;
|
2021-03-03 11:48:49 +00:00
|
|
|
class Group extends Eloquent
|
2021-03-03 10:48:34 +00:00
|
|
|
{
|
|
|
|
protected $fillable = [
|
|
|
|
'groupName', 'groupAmount', 'votes'
|
|
|
|
];
|
2021-03-04 09:19:58 +00:00
|
|
|
|
|
|
|
public function gameJam(){
|
2021-03-04 10:27:54 +00:00
|
|
|
return $this->belongsTo(GameJam::class);
|
2021-03-04 09:19:58 +00:00
|
|
|
}
|
|
|
|
public function keyWord(){
|
|
|
|
return $this->hasMany(KeyWord::class);
|
|
|
|
}
|
|
|
|
public function gameData(){
|
2021-03-04 10:27:54 +00:00
|
|
|
return $this->belongsTo(GameData::class);
|
2021-03-04 09:19:58 +00:00
|
|
|
}
|
2021-03-04 10:27:54 +00:00
|
|
|
public function password(){
|
2021-03-05 10:23:10 +00:00
|
|
|
return $this->hasOne(Password::class);
|
2021-03-04 09:19:58 +00:00
|
|
|
}
|
2021-03-05 12:00:07 +00:00
|
|
|
public function vote(){
|
|
|
|
return $this->hasMany(Vote::class);
|
|
|
|
}
|
|
|
|
|
2021-03-03 10:48:34 +00:00
|
|
|
}
|