id(); // Laravel 主鍵 $table->bigInteger('chat_id')->unique(); // Telegram 群組/頻道 ID(可能為負數) $table->string('type')->nullable()->comment('群类型'); // group、supergroup、channel、private $table->string('title')->nullable()->comment('群名稱'); $table->string('creator')->nullable()->comment('群主ID'); $table->text('description')->nullable()->comment('群組描述'); // 群組描述(如有) $table->string('invite_link')->nullable()->comment('群組邀請連結'); // 群組邀請連結(如有) // 可選擴充 $table->string('photo_small_file_id')->nullable()->comment('群头像160x160'); $table->string('photo_big_file_id')->nullable()->comment('群头像640x640'); $table->timestamps(); // 建立/更新時間 }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('tg_chats'); } };