You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
923 B
45 lines
923 B
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
class OrderAgreement extends SoftDeletesModel
|
|
{
|
|
protected $table = "order_agreements";
|
|
|
|
public function paramedicSign()
|
|
{
|
|
return $this->hasOne(Uploads::class, 'id', 'paramedic_sign_id');
|
|
}
|
|
|
|
public function customerSign()
|
|
{
|
|
return $this->hasOne(Uploads::class, 'id', 'customer_sign_id');
|
|
}
|
|
|
|
public function companySign()
|
|
{
|
|
return $this->hasOne(Uploads::class, 'id', 'company_sign_id');
|
|
}
|
|
|
|
public function file()
|
|
{
|
|
return $this->hasOne(Uploads::class, 'id', 'file_id');
|
|
}
|
|
|
|
public function order()
|
|
{
|
|
return $this->hasOne(Orders::class, 'id', 'order_id');
|
|
}
|
|
|
|
public function paramedic()
|
|
{
|
|
return $this->hasOne(Paramedic::class, 'id', 'paramedic_id');
|
|
}
|
|
|
|
public function customer()
|
|
{
|
|
return $this->hasOne(\App\Customer::class, 'id', 'customer_id');
|
|
}
|
|
|
|
}
|