| Code Coverage
| Classes and Traits | Functions and Methods | Lines
Total | 0.00% covered (danger) | 0.00% | 0 / 1 | 0.00% covered (danger) | 0.00% | 0 / 5 | CRAP | 0.00% covered (danger) | 0.00% | 0 / 7
Rejected | 0.00% covered (danger) | 0.00% | 0 / 1 | 0.00% covered (danger) | 0.00% | 0 / 5 | 56.00 | 0.00% covered (danger) | 0.00% | 0 / 7
owner | 0.00% covered (danger) | 0.00% | 0 / 1 | 2.00 | 0.00% covered (danger) | 0.00% | 0 / 1
logistic | 0.00% covered (danger) | 0.00% | 0 / 1 | 2.00 | 0.00% covered (danger) | 0.00% | 0 / 1
logisticName | 0.00% covered (danger) | 0.00% | 0 / 1 | 6.00 | 0.00% covered (danger) | 0.00% | 0 / 2
qualityLabel | 0.00% covered (danger) | 0.00% | 0 / 1 | 2.00 | 0.00% covered (danger) | 0.00% | 0 / 1
qualityLabelName | 0.00% covered (danger) | 0.00% | 0 / 1 | 6.00 | 0.00% covered (danger) | 0.00% | 0 / 2

1 | <?php
2 |
3 | namespace App;
4 |
5 | use Illuminate\Database\Eloquent\Builder;
6 | use Illuminate\Database\Eloquent\Model;
7 |
8 | /**
9 | * @method static Builder orderBy(string $string, string $string1)
10 | */
11 | class Rejected extends Model
12 | {
13 | protected $fillable=['id_owner','order_number','sender','mobile_sender',
14 | 'logistic_number','logistic_number_return','id_logistic_return',
15 | 'validity_at','batch_number','id_quality_label','amount','name_goods',
16 | 'barcode_goods','is_loaded','fee_collected','id_logistic_return','remark','is_checked','created_at','goodses'];
17 | function owner(){
18 | return $this->hasOne('App\Owner','id','id_owner');
19 | }
20 | function logistic(){
21 | return $this->hasOne('App\Logistic','id','id_logistic_return');
22 | }
23 | function logisticName(){
24 | $logistic=$this->hasOne('App\Logistic','id','id_logistic_return')->first();
25 | return $logistic?$logistic['name']:'';
26 | }
27 | function qualityLabel(){
28 | return $this->hasOne('App\QualityLabel','id','id_quality_label');
29 | }
30 | function qualityLabelName(){
31 | $qualityLabel=$this->hasOne('App\QualityLabel','id','id_quality_label')->first();
32 | return $qualityLabel?$qualityLabel['name']:'';
33 | }
34 | }