More works on products
This commit is contained in:
@@ -4,14 +4,30 @@ namespace App\Models\Product;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
use App\Interfaces\ProductSupplier;
|
||||
use App\Models\Base\ProductType;
|
||||
use App\Traits\NextKey;
|
||||
use App\Interfaces\ProductItem;
|
||||
use App\Models\Service\Domain as ServiceDomain;
|
||||
use App\Models\Supplier\Domain as SupplierDomain;
|
||||
|
||||
class Domain extends ProductType implements ProductSupplier
|
||||
final class Domain extends Type implements ProductItem
|
||||
{
|
||||
use NextKey;
|
||||
const RECORD_ID = '';
|
||||
protected $table = 'product_domain';
|
||||
|
||||
// The model that is referenced when this product is ordered
|
||||
protected string $order_model = ServiceDomain::class;
|
||||
|
||||
/* RELATIONS */
|
||||
|
||||
/**
|
||||
* The offering supplied with this product
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function supplied()
|
||||
{
|
||||
return $this->hasOne(SupplierDomain::class,'id','supplier_domain_id');
|
||||
}
|
||||
|
||||
/* INTERFACES */
|
||||
|
||||
public function allowance(): Collection
|
||||
{
|
||||
|
Reference in New Issue
Block a user