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