<?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::table('stores', function (Blueprint $table) {
            // Tanggal kedaluwarsa masa aktif SaaS
            $table->date('subscription_valid_until')->nullable()->after('auto_replenish');
            
            // Status blokir paksa (jika klien melanggar aturan atau telat bayar)
            $table->boolean('is_active')->default(true)->after('subscription_valid_until');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('stores', function (Blueprint $table) {
            //
        });
    }
};
