PointType::points()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Gamer\Models;
4
5
use Support\Models\Base;
6
7
class PointType extends Base
8
{
9
10
    /**
11
     * The attributes that are mass assignable.
12
     *
13
     * @var array
14
     */
15
    protected $fillable = [
16
        'name',
17
        'cpf',
18
        'email',
19
        'role_id'
20
    ];
21
22
    protected $mappingProperties = array(
23
        /**
24
         * User Info
25
         */
26
        'name' => [
27
            'type' => 'string',
28
            "analyzer" => "standard",
29
        ],
30
        'cpf' => [
31
            'type' => 'string',
32
            "analyzer" => "standard",
33
        ],
34
        'email' => [
35
            'type' => 'string',
36
            "analyzer" => "standard",
37
        ],
38
39
        /**
40
         * Grupo de Usuário:
41
         * 
42
         * 3 -> Usuário de Produtora
43
         * Default: 3
44
         */
45
        'role_id' => [
46
            'type' => 'string',
47
            "analyzer" => "standard",
48
        ],
49
    );
50
51
    public function points()
52
    {
53
        return $this->hasMany('Gamer\Models\Point', 'point_type_id', 'id');
54
    }
55
}
56