garrisonFollower()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php namespace FreedomCore\TrinityCore\Character\Models;
2
3
use FreedomCore\TrinityCore\Character\Models\CharacterBaseModel;
4
5
/**
6
 * Class CharacterGarrisonFollowerAbility
7
 *
8
 * @package FreedomCore\TrinityCore\Character\Models
9
 * @property int $dbId
10
 * @property int $abilityId
11
 * @property int $slot
12
 * @property-read \FreedomCore\TrinityCore\Character\Models\CharacterGarrisonFollower $garrisonFollower
13
 * @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\CharacterBaseModel incrementID()
14
 * @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\CharacterGarrisonFollowerAbility whereAbilityId($value)
15
 * @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\CharacterGarrisonFollowerAbility whereDbId($value)
16
 * @method static \Illuminate\Database\Eloquent\Builder|\FreedomCore\TrinityCore\Character\Models\CharacterGarrisonFollowerAbility whereSlot($value)
17
 * @mixin \Eloquent
18
 */
19
class CharacterGarrisonFollowerAbility extends CharacterBaseModel
20
{
21
22
    /**
23
    * @inheritdoc
24
    * @var bool
25
    */
26
    public $incrementing = true;
27
    /**
28
    * @inheritdoc
29
    * @var bool
30
    */
31
    public $timestamps = false;
32
    /**
33
    * @inheritdoc
34
    * @var array
35
    */
36
    protected $casts = [
37
        'dbId' => 'int',
38
        'abilityId' => 'int',
39
        'slot' => 'int'
40
    ];
41
42
    /**
43
     * Get garrison follower to whom this
44
     * ability belongs to
45
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
46
     */
47
    public function garrisonFollower()
48
    {
49
        return $this->belongsTo(CharacterGarrisonFollower::class, 'dbId');
50
    }
51
}
52