Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
66.67% |
2 / 3 |
|
66.67% |
2 / 3 |
CRAP | |
0.00% |
0 / 1 |
UserAddOns | |
66.67% |
2 / 3 |
|
66.67% |
2 / 3 |
3.33 | |
0.00% |
0 / 1 |
user | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
addOn | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
newFactory | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | namespace App\Http\Models; |
4 | |
5 | use database\factories\http\models\UserAddOnsFactory; |
6 | use Illuminate\Database\Eloquent\Factories\HasFactory; |
7 | use App\Http\Models\Moloquent; |
8 | use MongoDB\Laravel\Eloquent\SoftDeletes; |
9 | |
10 | class UserAddOns extends Moloquent |
11 | { |
12 | use HasFactory, SoftDeletes; |
13 | |
14 | protected $fillable = [ |
15 | "user_id", |
16 | "add_on_id", |
17 | "stripe_id", |
18 | "stripe_price_id", |
19 | "quantity", |
20 | "status", |
21 | "starts_at", |
22 | "ends_at", |
23 | "product", |
24 | "created_at", |
25 | "updated_at" |
26 | ]; |
27 | |
28 | public function user() |
29 | { |
30 | return $this->belongsTo(User::class, 'user_id'); |
31 | } |
32 | |
33 | public function addOn() |
34 | { |
35 | return $this->belongsTo(AddOns::class, 'add_on_id'); |
36 | } |
37 | |
38 | protected static function newFactory() |
39 | { |
40 | return UserAddOnsFactory::new(); |
41 | } |
42 | } |