<?php
namespace ModulesGarden\Servers\OpenXchange\App\Models;


/**
 *
 * Created by PhpStorm.
 * User: Tomasz Bielecki ( tomasz.bi@modulesgarden.com )
 * Date: 09.09.19
 * Time: 11:07
 * Class ProductConfiguration
 */
class MailboxDeleteList extends \ModulesGarden\Servers\OpenXchange\Core\Models\ExtendedEloquentModel
{
    protected $table      = 'MailboxDeleteList';

    protected $primaryKey = 'id';

    protected $guarded    = ['id'];

    protected $fillable   = ['mailbox_name', 'service_id','days_to_delete'];

    protected $softDelete = false;

    public $timestamps    = true;
    
    public static function getRequests($service_id)
    {
        $requests = self::where('service_id', $service_id)->get();
        $data     = [];

        foreach($requests as $request)
        {
            $data[] = $request->toArray();
        }

        return $data;
    }
}