forked from admin/services_core
31 lines
623 B
PHP
31 lines
623 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class TenantPaymentSetting extends Model
|
|
{
|
|
protected $guarded = ['id'];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return ['enabled_methods' => 'array'];
|
|
}
|
|
|
|
public function tenant()
|
|
{
|
|
return $this->belongsTo(Tenant::class);
|
|
}
|
|
|
|
public function tenantGateway()
|
|
{
|
|
return $this->belongsTo(PaymentGatewayAccount::class, 'tenant_gateway_account_id');
|
|
}
|
|
|
|
public function platformGateway()
|
|
{
|
|
return $this->belongsTo(PaymentGatewayAccount::class, 'platform_gateway_account_id');
|
|
}
|
|
}
|