basic CRUD for listings

This commit is contained in:
2025-11-05 14:47:19 -08:00
parent 8355d57fc4
commit 4c3eb027ea
8 changed files with 107 additions and 18 deletions

View File

@@ -15,8 +15,10 @@ return new class extends Migration
Schema::create('listings', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->text('title')->nullable(false);
$table->softDeletes();
$table->string('title')->nullable(false);
$table->text('description')->nullable(false);
$table->enum('condition', ['parts only', 'poor', 'fair', 'good', 'excellent'])->nullable();
$table->text('location')->nullable(false);
$table->decimal('price')->default(0.0);
$table->foreignIdFor(User::class)->nullable(false);