Completed
Push — develop ( bdf589...e66eda )
by Abdelrahman
17:14 queued 10s
created

AttributeEntity::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Rinvex\Attributes\Models;
6
7
use Illuminate\Database\Eloquent\Model;
8
9
/**
10
 * Rinvex\Attributes\Models\AttributeEntity.
11
 *
12
 * @property int                 $attribute_id
13
 * @property string              $entity_type
14
 * @property \Carbon\Carbon|null $created_at
15
 * @property \Carbon\Carbon|null $updated_at
16
 *
17
 * @method static \Illuminate\Database\Eloquent\Builder|\Rinvex\Attributes\Models\AttributeEntity whereAttributeId($value)
18
 * @method static \Illuminate\Database\Eloquent\Builder|\Rinvex\Attributes\Models\AttributeEntity whereCreatedAt($value)
19
 * @method static \Illuminate\Database\Eloquent\Builder|\Rinvex\Attributes\Models\AttributeEntity whereEntityType($value)
20
 * @method static \Illuminate\Database\Eloquent\Builder|\Rinvex\Attributes\Models\AttributeEntity whereUpdatedAt($value)
21
 * @mixin \Eloquent
22
 */
23
class AttributeEntity extends Model
24
{
25
    /**
26
     * {@inheritdoc}
27
     */
28
    protected $fillable = [
29
        'entity_type',
30
    ];
31
32
    /**
33
     * {@inheritdoc}
34
     */
35
    protected $casts = [
36
        'entity_type' => 'string',
37
    ];
38
39
    /**
40
     * Create a new Eloquent model instance.
41
     *
42
     * @param array $attributes
43
     */
44
    public function __construct(array $attributes = [])
45
    {
46
        parent::__construct($attributes);
47
48
        $this->setTable(config('rinvex.attributes.tables.attribute_entity'));
49
    }
50
}
51