Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 5 |
CRAP | |
0.00% |
0 / 7 |
| Rejected | |
0.00% |
0 / 1 |
|
0.00% |
0 / 5 |
56.00 | |
0.00% |
0 / 7 |
| owner | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 1 |
|||
| logistic | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 1 |
|||
| logisticName | |
0.00% |
0 / 1 |
6.00 | |
0.00% |
0 / 2 |
|||
| qualityLabel | |
0.00% |
0 / 1 |
2.00 | |
0.00% |
0 / 1 |
|||
| qualityLabelName | |
0.00% |
0 / 1 |
6.00 | |
0.00% |
0 / 2 |
|||
| <?php | |
| namespace App; | |
| use Illuminate\Database\Eloquent\Builder; | |
| use Illuminate\Database\Eloquent\Model; | |
| /** | |
| * @method static Builder orderBy(string $string, string $string1) | |
| */ | |
| class Rejected extends Model | |
| { | |
| protected $fillable=['id_owner','order_number','sender','mobile_sender', | |
| 'logistic_number','logistic_number_return','id_logistic_return', | |
| 'validity_at','batch_number','id_quality_label','amount','name_goods', | |
| 'barcode_goods','is_loaded','fee_collected','id_logistic_return','remark','is_checked','created_at','goodses']; | |
| function owner(){ | |
| return $this->hasOne('App\Owner','id','id_owner'); | |
| } | |
| function logistic(){ | |
| return $this->hasOne('App\Logistic','id','id_logistic_return'); | |
| } | |
| function logisticName(){ | |
| $logistic=$this->hasOne('App\Logistic','id','id_logistic_return')->first(); | |
| return $logistic?$logistic['name']:''; | |
| } | |
| function qualityLabel(){ | |
| return $this->hasOne('App\QualityLabel','id','id_quality_label'); | |
| } | |
| function qualityLabelName(){ | |
| $qualityLabel=$this->hasOne('App\QualityLabel','id','id_quality_label')->first(); | |
| return $qualityLabel?$qualityLabel['name']:''; | |
| } | |
| } |