Completed
Push — develop ( 3aebdd...e491f1 )
by Abdelrahman
02:10
created

ImportRecord   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 33
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cortex\Foundation\Models;
6
7
use Illuminate\Database\Eloquent\Model;
8
use Rinvex\Support\Traits\HashidsTrait;
9
10
class ImportRecord extends Model
11
{
12
    use HashidsTrait;
13
14
    /**
15
     * {@inheritdoc}
16
     */
17
    protected $fillable = [
18
        'resource',
19
        'data',
20
    ];
21
22
    /**
23
     * {@inheritdoc}
24
     */
25
    protected $casts = [
26
        'resource' => 'string',
27
        'data' => 'json',
28
        'status' => 'nullable|in:init,skip,fail,update,success',
29
    ];
30
31
    /**
32
     * Create a new Log model instance.
33
     *
34
     * @param array $attributes
35
     */
36
    public function __construct(array $attributes = [])
37
    {
38
        parent::__construct($attributes);
39
40
        $this->setTable(config('cortex.foundation.tables.import_records'));
41
    }
42
}
43