Product class optimisation

This commit is contained in:
2023-05-04 10:02:25 +10:00
parent a5238bfbdc
commit 0ac35c3d43
10 changed files with 31 additions and 85 deletions

View File

@@ -42,17 +42,8 @@ final class Phone extends Type implements ProductItem
// The model that is referenced when this product is ordered
protected string $order_model = ServicePhone::class;
/* RELATIONS */
/**
* The offering supplied with this product
*
* @return \Illuminate\Database\Eloquent\Relations\HasOne
*/
public function supplied()
{
return $this->hasOne(SupplierPhone::class,'id','supplier_item_id');
}
// The model that the supplier supplies
const SupplierModel = SupplierPhone::class;
/* INTERFACES */