Code Duplication    Length = 46-46 lines in 2 locations

src/Models/Log/Finger.php 1 location

@@ 7-52 (lines=46) @@
4
5
use Audit\Models\Base;
6
7
class Finger extends Base
8
{
9
10
    protected $organizationPerspective = false;
11
12
    protected $table = 'log_fingers';       
13
14
    /**
15
     * The attributes that are mass assignable.
16
     *
17
     * @var array
18
     */
19
    protected $fillable = [
20
        'customer_id',
21
        'credit_card_id',
22
        'user_id',
23
    ];
24
25
26
    protected $mappingProperties = array(
27
28
        'customer_id' => [
29
            'type' => 'integer',
30
            "analyzer" => "standard",
31
        ],
32
        'credit_card_id' => [
33
            'type' => 'integer',
34
            "analyzer" => "standard",
35
        ],
36
        'user_id' => [
37
            'type' => 'integer',
38
            "analyzer" => "standard",
39
        ],
40
        'score' => [
41
            'type' => 'float',
42
            "analyzer" => "standard",
43
        ],
44
    );
45
46
47
    public function user()
48
    {
49
        return $this->belongsTo(\Illuminate\Support\Facades\Config::get('sitec.core.models.user', \App\Models\User::class), 'user_id', 'id');
50
    }
51
52
}

src/Models/Log/Type.php 1 location

@@ 12-57 (lines=46) @@
9
10
use Audit\Models\Base;
11
12
class Type extends Base
13
{
14
15
    protected $organizationPerspective = false;
16
17
    protected $table = 'log_types';       
18
19
    /**
20
     * The attributes that are mass assignable.
21
     *
22
     * @var array
23
     */
24
    protected $fillable = [
25
        'customer_id',
26
        'credit_card_id',
27
        'user_id',
28
    ];
29
30
31
    protected $mappingProperties = array(
32
33
        'customer_id' => [
34
            'type' => 'integer',
35
            "analyzer" => "standard",
36
        ],
37
        'credit_card_id' => [
38
            'type' => 'integer',
39
            "analyzer" => "standard",
40
        ],
41
        'user_id' => [
42
            'type' => 'integer',
43
            "analyzer" => "standard",
44
        ],
45
        'score' => [
46
            'type' => 'float',
47
            "analyzer" => "standard",
48
        ],
49
    );
50
51
52
    public function user()
53
    {
54
        return $this->belongsTo(\Illuminate\Support\Facades\Config::get('sitec.core.models.user', \App\Models\User::class), 'user_id', 'id');
55
    }
56
57
}