<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('enrollments', function (Blueprint $table) {
            $table->id(); // This is equivalent to 'id' int(11) auto_increment
            $table->string('idno');
            $table->string('account', 18);
            $table->string('paystatus', 100)->default('pending');
            $table->string('amount', 100);
            $table->string('name');
            $table->string('phone');
            $table->string('email')->nullable();
            $table->integer('course');
            $table->string('station');
            $table->date('startdate');
            $table->string('paymentmode');
            $table->string('companyname');
            $table->timestamps(); // This creates 'created_at' and 'updated_at' columns companyname
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('enrollments');
    }
};
