Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| AddOns | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| userAddOns | |
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\AddOnsFactory; |
| 6 | use Illuminate\Database\Eloquent\Factories\HasFactory; |
| 7 | use MongoDB\Laravel\Eloquent\SoftDeletes; |
| 8 | |
| 9 | /** |
| 10 | * @property string|null $stripe_id |
| 11 | * @property string|null $stripe_price_id |
| 12 | * @property int|null $priority |
| 13 | * @property string $name |
| 14 | * @property string|null $identifier |
| 15 | * @property string|null $description |
| 16 | * @property float|null $price |
| 17 | * @property string|null $product |
| 18 | * @property bool|null $is_recurrent |
| 19 | * @property string|null $recurrency_type |
| 20 | * @property array|null $features |
| 21 | */ |
| 22 | class AddOns extends Moloquent |
| 23 | { |
| 24 | use HasFactory, SoftDeletes; |
| 25 | |
| 26 | protected $fillable = [ |
| 27 | 'stripe_id', |
| 28 | 'stripe_price_id', |
| 29 | 'priority', |
| 30 | 'name', |
| 31 | 'identifier', |
| 32 | 'description', |
| 33 | 'price', |
| 34 | 'product', |
| 35 | 'is_recurrent', |
| 36 | 'recurrency_type', |
| 37 | 'features', |
| 38 | 'created_at', |
| 39 | 'updated_at', |
| 40 | ]; |
| 41 | |
| 42 | public function userAddOns() |
| 43 | { |
| 44 | return $this->hasMany(UserAddOns::class, 'add_on_id'); |
| 45 | } |
| 46 | |
| 47 | protected static function newFactory() |
| 48 | { |
| 49 | return AddOnsFactory::new(); |
| 50 | } |
| 51 | } |