first commit

This commit is contained in:
2026-01-23 17:28:21 +07:00
commit 29ff8992b9
331 changed files with 30545 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
<?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('vocabularies', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->string('word'); // The main word (Kanji usually, or Kana if no Kanji)
$table->string('reading')->nullable(); // Kana / Furigana
$table->string('romaji')->nullable();
$table->string('meaning_en')->nullable();
$table->string('meaning_id')->nullable();
$table->foreignUuid('level_id')->nullable()->constrained('levels')->nullOnDelete();
$table->string('audio_url')->nullable();
$table->string('type')->nullable(); // noun, verb, adjective, etc.
$table->json('stroke_order_svg')->nullable(); // JSON for stroke animation
$table->json('example_sentences')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('vocabularies');
}
};