1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace Cortex\Testimonials\Models; |
6
|
|
|
|
7
|
|
|
use Rinvex\Tenants\Traits\Tenantable; |
8
|
|
|
use Cortex\Foundation\Traits\Auditable; |
9
|
|
|
use Rinvex\Support\Traits\HashidsTrait; |
10
|
|
|
use Spatie\Activitylog\Traits\LogsActivity; |
11
|
|
|
use Rinvex\Testimonials\Models\Testimonial as BaseTestimonial; |
12
|
|
|
|
13
|
|
|
/** |
14
|
|
|
* Cortex\Testimonials\Models\Testimonial. |
15
|
|
|
* |
16
|
|
|
* @property int $id |
17
|
|
|
* @property int $subject_id |
18
|
|
|
* @property string $subject_type |
19
|
|
|
* @property int $attestant_id |
20
|
|
|
* @property string $attestant_type |
21
|
|
|
* @property bool $is_approved |
22
|
|
|
* @property string $body |
23
|
|
|
* @property \Carbon\Carbon|null $created_at |
24
|
|
|
* @property \Carbon\Carbon|null $updated_at |
25
|
|
|
* @property \Carbon\Carbon|null $deleted_at |
26
|
|
|
* @property-read \Cortex\Auth\Models\User|\Illuminate\Database\Eloquent\Model|\Eloquent $attestant |
27
|
|
|
* @property-read \Illuminate\Database\Eloquent\Model|\Eloquent $subject |
28
|
|
|
* @property \Illuminate\Database\Eloquent\Collection|\Cortex\Tenants\Models\Tenant[] $tenants |
29
|
|
|
* |
30
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial approved() |
31
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial disapproved() |
32
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial whereAttestantId($value) |
33
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial whereAttestantType($value) |
|
|
|
|
34
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial whereBody($value) |
35
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial whereCreatedAt($value) |
36
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial whereDeletedAt($value) |
37
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial whereId($value) |
38
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial whereIsApproved($value) |
39
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial whereSubjectId($value) |
40
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial whereSubjectType($value) |
41
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial whereUpdatedAt($value) |
42
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial withAllTenants($tenants, $group = null) |
|
|
|
|
43
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial withAnyTenants($tenants, $group = null) |
|
|
|
|
44
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial withTenants($tenants, $group = null) |
|
|
|
|
45
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial withoutAnyTenants() |
46
|
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\Cortex\Testimonials\Models\Testimonial withoutTenants($tenants, $group = null) |
|
|
|
|
47
|
|
|
* @mixin \Eloquent |
48
|
|
|
*/ |
49
|
|
|
class Testimonial extends BaseTestimonial |
|
|
|
|
50
|
|
|
{ |
51
|
|
|
use Auditable; |
52
|
|
|
use Tenantable; |
53
|
|
|
use HashidsTrait; |
54
|
|
|
use LogsActivity; |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* Indicates whether to log only dirty attributes or all. |
58
|
|
|
* |
59
|
|
|
* @var bool |
60
|
|
|
*/ |
61
|
|
|
protected static $logOnlyDirty = true; |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* The attributes that are logged on change. |
65
|
|
|
* |
66
|
|
|
* @var array |
67
|
|
|
*/ |
68
|
|
|
protected static $logFillable = true; |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* The attributes that are ignored on change. |
72
|
|
|
* |
73
|
|
|
* @var array |
74
|
|
|
*/ |
75
|
|
|
protected static $ignoreChangedAttributes = [ |
|
|
|
|
76
|
|
|
'created_at', |
77
|
|
|
'updated_at', |
78
|
|
|
'deleted_at', |
79
|
|
|
]; |
80
|
|
|
} |
81
|
|
|
|
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.