<?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('we_chats', function (Blueprint $table) {
      $table->id();
      $table->string('name', 50)->comment('名称');
      $table->tinyInteger('type')->comment('1-公众号 2-小程序');
      $table->string('app_id', 80)->comment('小程序ID')->index();
      $table->string('app_secret', 100)->comment('小程序密钥')->index();
      $table->timestamps();
    });
  }

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