<?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('ezypos_licenses', function (Blueprint $table) {
            $table->id();
            $table->string('master_dealer_id');
            $table->string('sub_dealer_id')->default('');
            $table->string('app_id');
            $table->string('license_key');
            $table->string('status');
            $table->string('cloud_id')->default('');
            $table->string('license_type');
            $table->integer('change_license_count')->default(0);
            $table->dateTime('registered_date')->nullable();
            $table->timestamps();
        });
    }

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