SmsReport   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 14
c 1
b 0
f 0
dl 0
loc 39
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A newFactory() 0 3 1
1
<?php
2
3
namespace HoomanMirghasemi\Sms\Models;
4
5
use HoomanMirghasemi\Sms\Database\Factories\SmsReportFactory;
6
use Illuminate\Database\Eloquent\Factories\HasFactory;
7
8
/**
9
 * App\Models\SmsReport.
10
 *
11
 * @property int                             $id                   identifier
12
 * @property string|null                     $mobile               mobile number sms sent to
13
 * @property string|null                     $message              sms text
14
 * @property string|null                     $from                 name of sms sender provider
15
 * @property string|null                     $number               sender number
16
 * @property string|null                     $web_service_response sms provider webservice response
17
 * @property bool                            $success              boolean: successful webservice response or fail
18
 * @property \Illuminate\Support\Carbon|null $created_at           when this record created
19
 * @property \Illuminate\Support\Carbon|null $updated_at           the record last updated time
20
 *
21
 * @method static \Illuminate\Database\Eloquent\Builder|SmsReport newModelQuery()
22
 * @method static \Illuminate\Database\Eloquent\Builder|SmsReport newQuery()
23
 * @method static \Illuminate\Database\Eloquent\Builder|SmsReport query()
24
 *
25
 * @mixin \Eloquent
26
 */
27
class SmsReport extends \Illuminate\Database\Eloquent\Model
28
{
29
    use HasFactory;
30
31
    public const TABLE = 'sms_reports';
32
33
    /**
34
     * The model table name in database.
35
     *
36
     * @var string
37
     */
38
    protected $table = self::TABLE;
39
40
    /**
41
     * An array of attribute names that are mass assignable in the database.
42
     *
43
     * @var string[]
44
     */
45
    protected $fillable = [
46
        'cell',
47
        'message',
48
        'from',
49
        'number',
50
        'web_service_response',
51
        'success',
52
    ];
53
54
    protected $casts = [
55
        'success' => 'boolean',
56
    ];
57
58
    /**
59
     * Create a new factory instance for the model.
60
     *
61
     * @return \Illuminate\Database\Eloquent\Factories\Factory
62
     */
63
    protected static function newFactory()
64
    {
65
        return new SmsReportFactory();
66
    }
67
}
68