<?php

namespace App\Database\Seeds;

use CodeIgniter\Database\Seeder;

class CounterSeeder extends Seeder {
  public function run() {
    $now = date('Y-m-d H:i:s');
    // counter
    $data = [
      ['CounterID' => 1, 'CounterValue' => '1', 'CounterStart' => '1', 'CounterEnd' => '99999', 'CounterDesc' => 'Counter for Order#', 'CounterReset' => 'Y', 'CreateDate' => "$now" ],
      ['CounterID' => 2, 'CounterValue' => '1', 'CounterStart' => '1', 'CounterEnd' => '9999', 'CounterDesc' => 'Counter for Visit#', 'CounterReset' => 'M', 'CreateDate' => "$now" ]
    ];
    $this->db->table('counter')->insertBatch($data);
  }
}