<?php

namespace App\Imports;

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

class CustomerImport implements ToModel
{
    /**
    * @param array $row
    *
    * @return \Illuminate\Database\Eloquent\Model|null
    */
    public function model(array $row)
    {
        return new Customer([
            'id' => $row[0],
            'indexno' => $row[1],
            'name' => $row[2],
            'amount' => $row[3],
            'program' => $row[4],
            'level' => $row[5],
            'phone' => $row[6]
        ]);
    }
}
