ldc-gen-game-web/app/Models/Participation.php
2020-11-04 11:49:43 +01:00

30 lines
689 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Participation extends Model
{
protected $table = "participation";
public function user() {
return $this->belongsTo('App\User', 'user_id');
}
public function code() {
return $this->belongsTo('App\Models\Codes', 'code_unique_id');
}
public function code_ean() {
return $this->belongsTo('App\Models\CodesEAN', 'code_ean_id');
}
public function instant_win() {
return $this->hasOne('App\Models\InstantWin', 'participation_id');
}
public function reduction() {
return $this->hasOne('App\Models\Reductions', 'reduction_id');
}
}