feat: prompt from station

This commit is contained in:
2026-04-06 17:00:12 +08:00
parent d19b770ef4
commit ad0add4500
12 changed files with 29 additions and 300 deletions

View File

@@ -1,36 +0,0 @@
<?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('terminal_prompts', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('terminal_id')->comment('终端ID');
$table->text('prompt_template')->comment('提示词模板');
$table->json('variables')->nullable()->comment('变量配置');
$table->timestamps();
// 添加外键约束
$table->foreign('terminal_id')
->references('id')
->on('terminals')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('terminal_prompts');
}
};

View File

@@ -0,0 +1,22 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('terminals', function (Blueprint $table) {
$table->text('prompt_template')->nullable()->comment('AI提示词模板');
});
}
public function down(): void
{
Schema::table('terminals', function (Blueprint $table) {
$table->dropColumn('prompt_template');
});
}
};