mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
30 lines
630 B
PHP
30 lines
630 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
use App\Classes\General\Interfaces\KeyValueInterface;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
|
|
|
class VoucherCampaign extends AbstractModel implements KeyValueInterface
|
|
{
|
|
protected $table = 'voucher_campaigns';
|
|
|
|
/**
|
|
* @return HasMany
|
|
*/
|
|
public function vouchers()
|
|
{
|
|
return $this->hasMany(Voucher::class, 'voucher_campaign_id');
|
|
}
|
|
|
|
/**
|
|
* @return MorphMany
|
|
*/
|
|
public function attributesKVP(): MorphMany
|
|
{
|
|
return $this->morphMany(KeyValuePair::class, 'owner');
|
|
}
|
|
}
|