<?php

namespace App\Imports;

use App\Models\CampaignUnsubscriber;
use Maatwebsite\Excel\Concerns\ToModel;

class CampaignUnsubscriberImport implements ToModel
{
    /**
    * @param array $row
    *
    * @return \Illuminate\Database\Eloquent\Model|null
    */
    public function model(array $row)
    {
        return new CampaignUnsubscriber([
            'email' => $row[0],
            'type' => 0
        ]);
    }
}
