• File: ServiceConfig.php
  • Full Path: /var/www/imaliapitest/app/ServiceConfig.php
  • Date Modified: 05/19/2025 4:29 PM
  • File size: 651 bytes
  • MIME-type: text/x-php
  • Charset: utf-8
<?php

namespace App;

use DateTimeInterface;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class ServiceConfig extends Model
{
    use HasFactory;

    protected $fillable = [
        'public_id', 'description', 'notification_type', 'notification_group', 'status', 'name', 'type_id', 'min_amount', 'max_amount', 'min_value', 'max_value'
    ];

    protected $hidden = ['id'];


    protected function serializeDate(DateTimeInterface $date)
    {
        return $date->format('d-m-Y H:i:s');
    }

    function serviceAccounts() {
        return $this->hasMany(ServiceConfigAccount::class);
    }
}