<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('syarikats', function (Blueprint $table) {
            $table->id();
            $table->string('name');
            $table->enum('jenis_perniagaan', ['milikan tunggal','perkongsian','perkongsian liabiliti terhad','sendirian berhad','berhad','koperasi','pertubuhan/persatuan/kelab']);
            $table->string('nossm')->unique();
            $table->string('alamat');
            $table->string('notelefon')->nullable();
            $table->string('bil_cawangan')->nullable();
            $table->string('tarikh_luput')->nullable();
            $table->timestamps();
        });
    }

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