1
|
|
|
<?php namespace FreedomCore\TrinityCore\Character\Models; |
2
|
|
|
|
3
|
|
|
use FreedomCore\TrinityCore\Character\Models\CharacterBaseModel; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* Class GuildFinderApplicant |
7
|
|
|
* |
8
|
|
|
* @package FreedomCore\TrinityCore\Character\Models |
9
|
|
|
* @property int $guildId |
10
|
|
|
* @property int $playerGuid |
11
|
|
|
* @property int $availability |
12
|
|
|
* @property int $classRole |
13
|
|
|
* @property int $interests |
14
|
|
|
* @property string|null $comment |
15
|
|
|
* @property int $submitTime |
16
|
|
|
* @property-read \FreedomCore\TrinityCore\Character\Models\Character $character |
17
|
|
|
* @property-read \FreedomCore\TrinityCore\Character\Models\Guild $guild |
18
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\CharacterBaseModel incrementID() |
19
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\GuildFinderApplicant whereAvailability($value) |
20
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\GuildFinderApplicant whereClassRole($value) |
21
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\GuildFinderApplicant whereComment($value) |
22
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\GuildFinderApplicant whereGuildId($value) |
23
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\GuildFinderApplicant whereInterests($value) |
24
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\GuildFinderApplicant wherePlayerGuid($value) |
25
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\GuildFinderApplicant whereSubmitTime($value) |
26
|
|
|
* @mixin \Eloquent |
27
|
|
|
*/ |
28
|
|
|
class GuildFinderApplicant extends CharacterBaseModel |
29
|
|
|
{ |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* @inheritdoc |
33
|
|
|
* @var string |
34
|
|
|
*/ |
35
|
|
|
protected $table = 'guild_finder_applicant'; |
36
|
|
|
/** |
37
|
|
|
* @inheritdoc |
38
|
|
|
* @var bool |
39
|
|
|
*/ |
40
|
|
|
public $incrementing = false; |
41
|
|
|
/** |
42
|
|
|
* @inheritdoc |
43
|
|
|
* @var bool |
44
|
|
|
*/ |
45
|
|
|
public $timestamps = false; |
46
|
|
|
/** |
47
|
|
|
* @inheritdoc |
48
|
|
|
* @var array |
49
|
|
|
*/ |
50
|
|
|
protected $casts = [ |
51
|
|
|
'guildId' => 'int', |
52
|
|
|
'playerGuid' => 'int', |
53
|
|
|
'availability' => 'int', |
54
|
|
|
'classRole' => 'int', |
55
|
|
|
'interests' => 'int', |
56
|
|
|
'submitTime' => 'int' |
57
|
|
|
]; |
58
|
|
|
/** |
59
|
|
|
* @inheritdoc |
60
|
|
|
* @var array |
61
|
|
|
*/ |
62
|
|
|
protected $fillable = [ |
63
|
|
|
'availability', |
64
|
|
|
'classRole', |
65
|
|
|
'interests', |
66
|
|
|
'comment', |
67
|
|
|
'submitTime' |
68
|
|
|
]; |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* Get character to which this application belongs to |
72
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
73
|
|
|
*/ |
74
|
|
|
public function character() |
75
|
|
|
{ |
76
|
|
|
return $this->belongsTo(Character::class, 'playerGuid'); |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
/** |
80
|
|
|
* Get guid to which character has applied through the LFG system |
81
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
82
|
|
|
*/ |
83
|
|
|
public function guild() |
84
|
|
|
{ |
85
|
|
|
return $this->belongsTo(Guild::class, 'guildId'); |
86
|
|
|
} |
87
|
|
|
} |
88
|
|
|
|