58 lines
1.0 KiB
PHP
58 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Models\Product;
|
|
|
|
use Illuminate\Support\Collection;
|
|
|
|
use App\Interfaces\ProductItem;
|
|
use App\Models\Invoice;
|
|
use App\Models\Service\Email as ServiceEmail;
|
|
use App\Models\Supplier\Email as SupplierEmail;
|
|
|
|
final class Email extends Type implements ProductItem
|
|
{
|
|
protected $table = 'product_email';
|
|
|
|
// The model that is referenced when this product is ordered
|
|
protected string $order_model = ServiceEmail::class;
|
|
|
|
// When comparing billing/pricing/charging, what metric to normalise to
|
|
const DefaultBill = Invoice::BILL_YEARLY;
|
|
// The model that the supplier supplies
|
|
const SupplierModel = SupplierEmail::class;
|
|
|
|
/* INTERFACES */
|
|
|
|
public function allowance(): Collection
|
|
{
|
|
// N/A
|
|
return collect();
|
|
}
|
|
|
|
public function allowance_string(): string
|
|
{
|
|
// N/A
|
|
return '';
|
|
}
|
|
|
|
public function getContractTermAttribute(): int
|
|
{
|
|
return 12;
|
|
}
|
|
|
|
public function getCostAttribute(): float
|
|
{
|
|
// N/A
|
|
return 0;
|
|
}
|
|
|
|
public function getSupplierAttribute()
|
|
{
|
|
return '';
|
|
}
|
|
|
|
public function hasUsage(): bool
|
|
{
|
|
return FALSE;
|
|
}
|
|
} |