|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* |
|
4
|
|
|
* rmarchiv.tk |
|
5
|
|
|
* (c) 2016-2017 by Marcel 'ryg' Hering |
|
6
|
|
|
*/ |
|
7
|
|
|
|
|
8
|
|
|
namespace App\Models; |
|
9
|
|
|
|
|
10
|
|
|
use GeneaLabs\LaravelModelCaching\Traits\Cachable; |
|
11
|
|
|
use Illuminate\Database\Eloquent\Model; |
|
12
|
|
|
use Spatie\Activitylog\Traits\LogsActivity; |
|
13
|
|
|
|
|
14
|
|
|
/** |
|
15
|
|
|
* Class GamesDeveloper. |
|
16
|
|
|
* |
|
17
|
|
|
* @property int $id |
|
18
|
|
|
* @property int $user_id |
|
19
|
|
|
* @property int $game_id |
|
20
|
|
|
* @property int $developer_id |
|
21
|
|
|
* @property string $deleted_at |
|
22
|
|
|
* @property \Carbon\Carbon $created_at |
|
23
|
|
|
* @property \Carbon\Carbon $updated_at |
|
24
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\GamesDeveloper whereId($value) |
|
25
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\GamesDeveloper whereUserId($value) |
|
26
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\GamesDeveloper whereGameId($value) |
|
27
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\GamesDeveloper whereDeveloperId($value) |
|
28
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\GamesDeveloper whereDeletedAt($value) |
|
29
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\GamesDeveloper whereCreatedAt($value) |
|
30
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\GamesDeveloper whereUpdatedAt($value) |
|
31
|
|
|
* @mixin \Eloquent |
|
32
|
|
|
* @property-read \App\Models\Developer $developer |
|
33
|
|
|
* @property-read \App\Models\Game $game |
|
34
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\Venturecraft\Revisionable\Revision[] $revisionHistory |
|
35
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\Spatie\Activitylog\Models\Activity[] $activity |
|
36
|
|
|
*/ |
|
37
|
|
|
class GamesDeveloper extends Model |
|
38
|
|
|
{ |
|
39
|
|
|
use \Venturecraft\Revisionable\RevisionableTrait; |
|
40
|
|
|
use LogsActivity; |
|
41
|
|
|
|
|
42
|
|
|
protected $table = 'games_developer'; |
|
43
|
|
|
|
|
44
|
|
|
public $timestamps = true; |
|
45
|
|
|
|
|
46
|
|
|
protected $fillable = [ |
|
47
|
|
|
'user_id', |
|
48
|
|
|
'game_id', |
|
49
|
|
|
'developer_id', |
|
50
|
|
|
]; |
|
51
|
|
|
|
|
52
|
|
|
protected $guarded = []; |
|
53
|
|
|
|
|
54
|
|
|
public function developer() |
|
|
|
|
|
|
55
|
|
|
{ |
|
56
|
|
|
return $this->hasOne('App\Models\Developer', 'id', 'developer_id')->with('user'); |
|
57
|
|
|
} |
|
58
|
|
|
|
|
59
|
|
|
public function game() |
|
|
|
|
|
|
60
|
|
|
{ |
|
61
|
|
|
return $this->hasOne('App\Models\Game', 'id', 'game_id')->with('comments', 'maker', 'gamefiles', 'cdcs'); |
|
62
|
|
|
} |
|
63
|
|
|
} |
|
64
|
|
|
|
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@returnannotation as described here.