<?php

namespace App\Models;

use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class PrefixRedirect extends Model
{
    use SoftDeletes;

    protected $fillable = [
        'address',
        'mask'
    ];

    public function prunable() {
        return static::where('deleted_at', '<=', Carbon::now()->subDays(2))->orWhere('created_at', '<=', Carbon::now()->subDays(2));
    }
}
