firstcommit
This commit is contained in:
0
Modules/Package/database/factories/.gitkeep
Normal file
0
Modules/Package/database/factories/.gitkeep
Normal file
0
Modules/Package/database/migrations/.gitkeep
Normal file
0
Modules/Package/database/migrations/.gitkeep
Normal file
@@ -0,0 +1,41 @@
|
||||
<?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('packages', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->uuid();
|
||||
$table->unsignedBigInteger('country_id');
|
||||
$table->string('title');
|
||||
$table->text('description');
|
||||
$table->float('price', 8, 2);
|
||||
$table->string('duration');
|
||||
$table->integer('group_size');
|
||||
$table->integer('ordering');
|
||||
$table->string('image')->nullable();
|
||||
$table->string('image_path')->nullable();
|
||||
$table->string('status')->default('active');
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('country_id')->references('id')->on('countries');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('packages');
|
||||
}
|
||||
};
|
0
Modules/Package/database/seeders/.gitkeep
Normal file
0
Modules/Package/database/seeders/.gitkeep
Normal file
20
Modules/Package/database/seeders/PackageDatabaseSeeder.php
Normal file
20
Modules/Package/database/seeders/PackageDatabaseSeeder.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Package\database\seeders;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Modules\Package\app\Models\Package;
|
||||
use Modules\CountryList\app\Models\Country;
|
||||
|
||||
class PackageDatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user