2022-04-02 07:06:34 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models\Supplier;
|
|
|
|
|
|
|
|
use App\Interfaces\SupplierItem;
|
|
|
|
use App\Models\Product\Email as ProductEmail;
|
|
|
|
|
|
|
|
final class Email extends Type implements SupplierItem
|
|
|
|
{
|
|
|
|
protected $table = 'supplier_email';
|
|
|
|
|
|
|
|
/* INTERFACES */
|
|
|
|
|
|
|
|
public function getBillingIntervalAttribute(): int
|
|
|
|
{
|
|
|
|
return 4; // Yearly
|
|
|
|
}
|
|
|
|
|
|
|
|
public function types()
|
|
|
|
{
|
2022-04-19 07:07:39 +00:00
|
|
|
return $this->belongsToMany(ProductEmail::class,$this->table,'id','id','id','supplier_item_id');
|
2022-04-02 07:06:34 +00:00
|
|
|
}
|
|
|
|
}
|