1 | <?php namespace FreedomCore\TrinityCore\Character\Models; |
||
40 | class Guild extends CharacterBaseModel |
||
41 | { |
||
42 | |||
43 | /** |
||
44 | * @inheritdoc |
||
45 | * @var string |
||
46 | */ |
||
47 | protected $table = 'guild'; |
||
48 | /** |
||
49 | * @inheritdoc |
||
50 | * @var string |
||
51 | */ |
||
52 | protected $primaryKey = 'guildid'; |
||
53 | /** |
||
54 | * @inheritdoc |
||
55 | * @var bool |
||
56 | */ |
||
57 | public $incrementing = true; |
||
58 | /** |
||
59 | * @inheritdoc |
||
60 | * @var bool |
||
61 | */ |
||
62 | public $timestamps = false; |
||
63 | /** |
||
64 | * @inheritdoc |
||
65 | * @var array |
||
66 | */ |
||
67 | protected $casts = [ |
||
68 | 'guildid' => 'int', |
||
69 | 'leaderguid' => 'int', |
||
70 | 'EmblemStyle' => 'int', |
||
71 | 'EmblemColor' => 'int', |
||
72 | 'BorderStyle' => 'int', |
||
73 | 'BorderColor' => 'int', |
||
74 | 'BackgroundColor' => 'int', |
||
75 | 'createdate' => 'int', |
||
76 | 'BankMoney' => 'int' |
||
77 | ]; |
||
78 | /** |
||
79 | * @inheritdoc |
||
80 | * @var array |
||
81 | */ |
||
82 | protected $fillable = [ |
||
83 | 'name', |
||
84 | 'leaderguid', |
||
85 | 'EmblemStyle', |
||
86 | 'EmblemColor', |
||
87 | 'BorderStyle', |
||
88 | 'BorderColor', |
||
89 | 'BackgroundColor', |
||
90 | 'info', |
||
91 | 'motd', |
||
92 | 'createdate', |
||
93 | 'BankMoney' |
||
94 | ]; |
||
95 | |||
96 | /** |
||
97 | * Get character of the leader of the guild |
||
98 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
||
99 | */ |
||
100 | public function leader() |
||
104 | |||
105 | /** |
||
106 | * Get members of the guild |
||
107 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
||
108 | */ |
||
109 | public function members() |
||
113 | |||
114 | /** |
||
115 | * Recruitment Settings For Specified Guild |
||
116 | * @return \Illuminate\Database\Eloquent\Relations\HasOne |
||
117 | */ |
||
118 | public function recruitmentSettings() |
||
122 | |||
123 | /** |
||
124 | * Get guild applications through the LFG system |
||
125 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
||
126 | */ |
||
127 | public function applicants() |
||
131 | } |
||
132 |