<?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('lesen_penjajas', function (Blueprint $table) {
            $table->id();
            $table->integer('user_id');
            $table->integer('syarikat_id');
            $table->enum('jenis', ['bukan kawasan berpusat','buah bermusim','food truck','foodtruck','car boot sale','berkenderaan','gerai','arked','pasar majlis','berpusat','sementara','lain-lain']);
            $table->string('jenis_lain')->nullable();
            $table->enum('status_tanah', ['hak milik persendirian', 'tanah kerajaan(rezab)','tanah sewa','tapak parkir','lain-lain']);
            $table->string('status_lain')->nullable();
            $table->string('no_petak')->nullable();
            $table->integer('kawasan_id');
            $table->integer('taman_id');
            $table->integer('jalan_id');
            $table->integer('penempatan_id');
            $table->text('makanan')->nullable();
            $table->text('minuman')->nullable();
            $table->text('lain')->nullable();
            $table->time('masa_jualan_mula')->nullable();
            $table->time('masa_jualan_tamat')->nullable();
            $table->enum('jenis_kenderaan', ['kereta sorong', 'basikal','motosikal','beca / basikal roda tiga','motosikal roda tiga','kereta / wagon', 'van','lori'])->nullable();
            $table->string('no_pendaftaran')->nullable();
            $table->string('longitude')->nullable();
            $table->string('latitude')->nullable();
            $table->timestamps();
        });
    }

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