added model and migration for jobs
This commit is contained in:
1 parent
c3b4f75e60
commit
380742ad77
2 files changed
+39
No files matched your search
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class PhotoJob extends Model
|
||||||
|
{
|
||||||
|
protected $fillable = ['image_path', 'status'];
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<?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('photo_jobs', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('image_path');
|
||||||
|
$table->string('status')->default('pending');
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('photo_jobs');
|
||||||
|
}
|
||||||
|
};
|
||||||
Reference in new issue
Block a user