Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
33.33% |
1 / 3 |
|
33.33% |
1 / 3 |
CRAP | |
0.00% |
0 / 1 |
| CompanyPOC | |
33.33% |
1 / 3 |
|
33.33% |
1 / 3 |
5.67 | |
0.00% |
0 / 1 |
| user | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| company | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| newFactory | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Http\Models\Admin; |
| 4 | |
| 5 | use App\Http\Models\Moloquent; |
| 6 | use App\Http\Models\Admin\Company; |
| 7 | use App\Http\Models\Auth\User; |
| 8 | use Database\Factories\Http\Models\CompanyPOCFactory; |
| 9 | use Illuminate\Database\Eloquent\Relations\BelongsTo; |
| 10 | use Illuminate\Database\Eloquent\Factories\HasFactory; |
| 11 | use MongoDB\Laravel\Eloquent\SoftDeletes; |
| 12 | |
| 13 | class CompanyPOC extends Moloquent |
| 14 | { |
| 15 | use HasFactory, SoftDeletes; |
| 16 | |
| 17 | protected $fillable = [ |
| 18 | "company_id", |
| 19 | "first_name", |
| 20 | "last_name", |
| 21 | "email", |
| 22 | "user_id", |
| 23 | "root" |
| 24 | ]; |
| 25 | |
| 26 | public function user(): BelongsTo |
| 27 | { |
| 28 | return $this->belongsTo(User::class); |
| 29 | } |
| 30 | |
| 31 | public function company(): BelongsTo |
| 32 | { |
| 33 | return $this->belongsTo(Company::class); |
| 34 | } |
| 35 | |
| 36 | protected static function newFactory() |
| 37 | { |
| 38 | return CompanyPOCFactory::new(); |
| 39 | } |
| 40 | } |