migrate to gtea from bistbucket
This commit is contained in:
1
database/.gitignore
vendored
Normal file
1
database/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.sqlite*
|
||||
19
database/factories/BusinessCategoryFactory.php
Normal file
19
database/factories/BusinessCategoryFactory.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class BusinessCategoryFactory extends Factory
|
||||
{
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->company . ' ' . $this->faker->randomElement(['Store', 'Shop', 'Mart', 'Center', 'Outlet']) . ' ' . $this->faker->numberBetween(1, 10000),
|
||||
'description' => $this->faker->sentence(),
|
||||
'status' => 1,
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
];
|
||||
}
|
||||
}
|
||||
38
database/factories/UserFactory.php
Normal file
38
database/factories/UserFactory.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
|
||||
*/
|
||||
class UserFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => fake()->name(),
|
||||
'email' => fake()->unique()->safeEmail(),
|
||||
'email_verified_at' => now(),
|
||||
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
|
||||
'remember_token' => Str::random(10),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the model's email address should be unverified.
|
||||
*/
|
||||
public function unverified(): static
|
||||
{
|
||||
return $this->state(fn (array $attributes) => [
|
||||
'email_verified_at' => null,
|
||||
]);
|
||||
}
|
||||
}
|
||||
33
database/migrations/2014_10_10_000001_create_plans_table.php
Normal file
33
database/migrations/2014_10_10_000001_create_plans_table.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?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('plans', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('subscriptionName');
|
||||
$table->integer('duration')->default(0); // Duration in days
|
||||
$table->double('offerPrice', 10, 2)->nullable();
|
||||
$table->double('subscriptionPrice', 10, 2)->default(0);
|
||||
$table->boolean('status')->default(1);
|
||||
$table->longText('features')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('plans');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
<?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('business_categories', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name')->unique();
|
||||
$table->text('description')->nullable();
|
||||
$table->boolean('status')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('business_categories');
|
||||
}
|
||||
};
|
||||
@@ -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('businesses', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('plan_subscribe_id')->nullable();
|
||||
$table->foreignId('business_category_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('companyName');
|
||||
$table->date('will_expire')->nullable();
|
||||
$table->string('address')->nullable();
|
||||
$table->string('phoneNumber')->nullable();
|
||||
$table->string('pictureUrl')->nullable();
|
||||
$table->timestamp('subscriptionDate')->nullable();
|
||||
$table->double('remainingShopBalance', 10, 2)->default(0);
|
||||
$table->double('shopOpeningBalance', 10, 2)->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('businesses');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('currencies', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name')->unique();
|
||||
$table->string('country_name')->nullable();
|
||||
$table->string('code')->unique();
|
||||
$table->double('rate', 10, 2)->nullable();
|
||||
$table->string('symbol')->nullable();
|
||||
$table->string('position')->nullable();
|
||||
$table->boolean('status')->default(1);
|
||||
$table->boolean('is_default')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('currencies');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,40 @@
|
||||
<?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('gateways', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->foreignId('currency_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('mode'); // 1 = Sandbox || 0 = Live
|
||||
$table->string('status');
|
||||
$table->boolean('charge')->default(0);
|
||||
$table->string('image')->nullable();
|
||||
$table->text('data')->nullable();
|
||||
$table->text('manual_data')->nullable();
|
||||
$table->boolean('is_manual')->default(0);
|
||||
$table->boolean('accept_img')->default(0);
|
||||
$table->string('namespace')->nullable();
|
||||
$table->integer('phone_required')->default(0);
|
||||
$table->text('instructions')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('gateways');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
<?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('plan_subscribes', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('plan_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('gateway_id')->nullable()->constrained()->cascadeOnDelete();
|
||||
$table->double('price', 10, 2)->default(0);
|
||||
$table->string('payment_status')->default('unpaid');
|
||||
$table->integer('duration')->default(0);
|
||||
$table->text('notes')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('plan_subscribes');
|
||||
}
|
||||
};
|
||||
38
database/migrations/2014_10_12_000003_create_users_table.php
Normal file
38
database/migrations/2014_10_12_000003_create_users_table.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?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('users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('business_id')->nullable()->constrained('businesses')->cascadeOnDelete();
|
||||
$table->string('email')->nullable()->unique();
|
||||
$table->string('name')->nullable();
|
||||
$table->string('role')->default('shop-owner'); // admin || shop-owner || staff
|
||||
$table->string('phone')->nullable();
|
||||
$table->string('image')->nullable();
|
||||
$table->string('lang')->nullable();
|
||||
$table->longText('visibility')->nullable();
|
||||
$table->string('password')->nullable();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?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('password_reset_tokens', function (Blueprint $table) {
|
||||
$table->string('email')->primary();
|
||||
$table->string('token');
|
||||
$table->timestamp('created_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('password_reset_tokens');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('password_resets', function (Blueprint $table) {
|
||||
$table->string('email')->index();
|
||||
$table->string('token');
|
||||
$table->timestamp('created_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('password_resets');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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('failed_jobs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('uuid')->unique();
|
||||
$table->text('connection');
|
||||
$table->text('queue');
|
||||
$table->longText('payload');
|
||||
$table->longText('exception');
|
||||
$table->timestamp('failed_at')->useCurrent();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('failed_jobs');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,33 @@
|
||||
<?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('personal_access_tokens', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->morphs('tokenable');
|
||||
$table->string('name');
|
||||
$table->string('token', 64)->unique();
|
||||
$table->text('abilities')->nullable();
|
||||
$table->timestamp('last_used_at')->nullable();
|
||||
$table->timestamp('expires_at')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('personal_access_tokens');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('notifications', function (Blueprint $table) {
|
||||
$table->uuid('id')->primary();
|
||||
$table->string('type');
|
||||
$table->morphs('notifiable');
|
||||
$table->text('data');
|
||||
$table->timestamp('read_at')->nullable();
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('notifications');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
<?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('options', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('key');
|
||||
$table->longText('value');
|
||||
$table->boolean('status')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('options');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
<?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('brands', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('brandName');
|
||||
$table->boolean('status')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('brands');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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('categories', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('categoryName');
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->boolean('variationCapacity')->default(0);
|
||||
$table->boolean('variationColor')->default(0);
|
||||
$table->boolean('variationSize')->default(0);
|
||||
$table->boolean('variationType')->default(0);
|
||||
$table->boolean('variationWeight')->default(0);
|
||||
$table->boolean('status')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('categories');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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('parties', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name')->nullable();
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('email')->nullable();
|
||||
$table->string('type')->default('Retailer'); // Retailer || Dealer || Wholesaler || Supplier
|
||||
$table->string('phone')->unique()->nullable();
|
||||
$table->double('due', 10, 2)->default(0);
|
||||
$table->string('address')->nullable();
|
||||
$table->string('image')->nullable();
|
||||
$table->boolean('status')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('parties');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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('expense_categories', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('categoryName');
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->text('categoryDescription')->nullable();
|
||||
$table->boolean('status')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('expense_categories');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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('expenses', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->double('amount', 10, 2);
|
||||
$table->foreignId('expense_category_id')->nullable()->constrained()->nullOnDelete();
|
||||
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('expanseFor')->nullable();
|
||||
$table->string('paymentType')->default('Cash');
|
||||
$table->string('referenceNo')->nullable();
|
||||
$table->text('note')->nullable();
|
||||
$table->timestamp('expenseDate')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('expenses');
|
||||
}
|
||||
};
|
||||
30
database/migrations/2023_12_24_170916_create_units_table.php
Normal file
30
database/migrations/2023_12_24_170916_create_units_table.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?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('units', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('unitName');
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->boolean('status')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('units');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,46 @@
|
||||
<?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('products', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('productName');
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('unit_id')->nullable()->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('brand_id')->nullable()->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('category_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('productCode')->unique();
|
||||
$table->string('productPicture')->nullable();
|
||||
$table->double('productDealerPrice', 10, 2)->default(0);
|
||||
$table->double('productPurchasePrice', 10, 2)->default(0);
|
||||
$table->double('productSalePrice', 10, 2)->default(0);
|
||||
$table->double('productWholeSalePrice', 10, 2)->default(0);
|
||||
$table->integer('productStock')->default(0);
|
||||
$table->string('size')->nullable();
|
||||
$table->string('type')->nullable();
|
||||
$table->string('color')->nullable();
|
||||
$table->string('weight')->nullable();
|
||||
$table->string('capacity')->nullable();
|
||||
$table->string('productManufacturer')->nullable();
|
||||
$table->text('meta')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('products');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
<?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('purchases', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('party_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
|
||||
$table->double("discountAmount", 10, 2)->default(0);
|
||||
$table->double("dueAmount", 10, 2)->default(0);
|
||||
$table->double("paidAmount", 10, 2)->default(0);
|
||||
$table->double("totalAmount", 10, 2)->default(0);
|
||||
$table->string("invoiceNumber")->nullable();
|
||||
$table->boolean("isPaid")->default(0);
|
||||
$table->string("paymentType")->default("Cash");
|
||||
$table->timestamp("purchaseDate")->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('purchases');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,33 @@
|
||||
<?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('purchase_details', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('purchase_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('product_id')->constrained()->cascadeOnDelete();
|
||||
$table->double('productDealerPrice', 10, 2)->default(0);
|
||||
$table->double('productPurchasePrice', 10, 2)->default(0);
|
||||
$table->double('productSalePrice', 10, 2)->default(0);
|
||||
$table->double('productWholeSalePrice', 10, 2)->default(0);
|
||||
$table->integer('quantities')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('purchase_details');
|
||||
}
|
||||
};
|
||||
42
database/migrations/2023_12_26_170106_create_sales_table.php
Normal file
42
database/migrations/2023_12_26_170106_create_sales_table.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?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('sales', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('party_id')->nullable()->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
|
||||
$table->double('discountAmount', 10, 2)->default(0);
|
||||
$table->double('dueAmount', 10, 2)->default(0);
|
||||
$table->boolean('isPaid')->default(0);
|
||||
$table->double('vat_amount', 10, 2)->default(0);
|
||||
$table->double('vat_percent', 10, 2)->default(0);
|
||||
$table->double('paidAmount', 10, 2)->default(0);
|
||||
$table->double('totalAmount', 10, 2)->default(0);
|
||||
$table->double('lossProfit', 10, 2)->default(0);
|
||||
$table->string('paymentType')->nullable();
|
||||
$table->string('invoiceNumber')->nullable();
|
||||
$table->timestamp('saleDate')->nullable();
|
||||
$table->text('meta')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('sales');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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('sale_details', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('sale_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('product_id')->constrained()->cascadeOnDelete();
|
||||
$table->double('price', 10, 2)->default(0);
|
||||
$table->double('lossProfit', 10, 2)->default(0);
|
||||
$table->integer('quantities')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('sale_details');
|
||||
}
|
||||
};
|
||||
@@ -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('banners', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('imageUrl');
|
||||
$table->boolean('status')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('banners');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
<?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('due_collects', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('party_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('sale_id')->nullable()->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('purchase_id')->nullable()->constrained()->cascadeOnDelete();
|
||||
$table->string('invoiceNumber')->nullable();
|
||||
$table->double('totalDue', 10, 2)->default(0);
|
||||
$table->double('dueAmountAfterPay', 10, 2)->default(0);
|
||||
$table->double('payDueAmount', 10, 2)->default(0);
|
||||
$table->string('paymentType')->default('Cash');
|
||||
$table->timestamp('paymentDate')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('due_collects');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,138 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
$teams = config('permission.teams');
|
||||
$tableNames = config('permission.table_names');
|
||||
$columnNames = config('permission.column_names');
|
||||
$pivotRole = $columnNames['role_pivot_key'] ?? 'role_id';
|
||||
$pivotPermission = $columnNames['permission_pivot_key'] ?? 'permission_id';
|
||||
|
||||
if (empty($tableNames)) {
|
||||
throw new \Exception('Error: config/permission.php not loaded. Run [php artisan config:clear] and try again.');
|
||||
}
|
||||
if ($teams && empty($columnNames['team_foreign_key'] ?? null)) {
|
||||
throw new \Exception('Error: team_foreign_key on config/permission.php not loaded. Run [php artisan config:clear] and try again.');
|
||||
}
|
||||
|
||||
Schema::create($tableNames['permissions'], function (Blueprint $table) {
|
||||
$table->bigIncrements('id'); // permission id
|
||||
$table->string('name'); // For MySQL 8.0 use string('name', 125);
|
||||
$table->string('guard_name'); // For MySQL 8.0 use string('guard_name', 125);
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['name', 'guard_name']);
|
||||
});
|
||||
|
||||
Schema::create($tableNames['roles'], function (Blueprint $table) use ($teams, $columnNames) {
|
||||
$table->bigIncrements('id'); // role id
|
||||
if ($teams || config('permission.testing')) { // permission.testing is a fix for sqlite testing
|
||||
$table->unsignedBigInteger($columnNames['team_foreign_key'])->nullable();
|
||||
$table->index($columnNames['team_foreign_key'], 'roles_team_foreign_key_index');
|
||||
}
|
||||
$table->string('name'); // For MySQL 8.0 use string('name', 125);
|
||||
$table->string('guard_name'); // For MySQL 8.0 use string('guard_name', 125);
|
||||
$table->timestamps();
|
||||
if ($teams || config('permission.testing')) {
|
||||
$table->unique([$columnNames['team_foreign_key'], 'name', 'guard_name']);
|
||||
} else {
|
||||
$table->unique(['name', 'guard_name']);
|
||||
}
|
||||
});
|
||||
|
||||
Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames, $columnNames, $pivotPermission, $teams) {
|
||||
$table->unsignedBigInteger($pivotPermission);
|
||||
|
||||
$table->string('model_type');
|
||||
$table->unsignedBigInteger($columnNames['model_morph_key']);
|
||||
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_permissions_model_id_model_type_index');
|
||||
|
||||
$table->foreign($pivotPermission)
|
||||
->references('id') // permission id
|
||||
->on($tableNames['permissions'])
|
||||
->onDelete('cascade');
|
||||
if ($teams) {
|
||||
$table->unsignedBigInteger($columnNames['team_foreign_key']);
|
||||
$table->index($columnNames['team_foreign_key'], 'model_has_permissions_team_foreign_key_index');
|
||||
|
||||
$table->primary([$columnNames['team_foreign_key'], $pivotPermission, $columnNames['model_morph_key'], 'model_type'],
|
||||
'model_has_permissions_permission_model_type_primary');
|
||||
} else {
|
||||
$table->primary([$pivotPermission, $columnNames['model_morph_key'], 'model_type'],
|
||||
'model_has_permissions_permission_model_type_primary');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames, $columnNames, $pivotRole, $teams) {
|
||||
$table->unsignedBigInteger($pivotRole);
|
||||
|
||||
$table->string('model_type');
|
||||
$table->unsignedBigInteger($columnNames['model_morph_key']);
|
||||
$table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_roles_model_id_model_type_index');
|
||||
|
||||
$table->foreign($pivotRole)
|
||||
->references('id') // role id
|
||||
->on($tableNames['roles'])
|
||||
->onDelete('cascade');
|
||||
if ($teams) {
|
||||
$table->unsignedBigInteger($columnNames['team_foreign_key']);
|
||||
$table->index($columnNames['team_foreign_key'], 'model_has_roles_team_foreign_key_index');
|
||||
|
||||
$table->primary([$columnNames['team_foreign_key'], $pivotRole, $columnNames['model_morph_key'], 'model_type'],
|
||||
'model_has_roles_role_model_type_primary');
|
||||
} else {
|
||||
$table->primary([$pivotRole, $columnNames['model_morph_key'], 'model_type'],
|
||||
'model_has_roles_role_model_type_primary');
|
||||
}
|
||||
});
|
||||
|
||||
Schema::create($tableNames['role_has_permissions'], function (Blueprint $table) use ($tableNames, $pivotRole, $pivotPermission) {
|
||||
$table->unsignedBigInteger($pivotPermission);
|
||||
$table->unsignedBigInteger($pivotRole);
|
||||
|
||||
$table->foreign($pivotPermission)
|
||||
->references('id') // permission id
|
||||
->on($tableNames['permissions'])
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->foreign($pivotRole)
|
||||
->references('id') // role id
|
||||
->on($tableNames['roles'])
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->primary([$pivotPermission, $pivotRole], 'role_has_permissions_permission_id_role_id_primary');
|
||||
});
|
||||
|
||||
app('cache')
|
||||
->store(config('permission.cache.store') != 'default' ? config('permission.cache.store') : null)
|
||||
->forget(config('permission.cache.key'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
$tableNames = config('permission.table_names');
|
||||
|
||||
if (empty($tableNames)) {
|
||||
throw new \Exception('Error: config/permission.php not found and defaults could not be merged. Please publish the package configuration before proceeding, or drop the tables manually.');
|
||||
}
|
||||
|
||||
Schema::drop($tableNames['role_has_permissions']);
|
||||
Schema::drop($tableNames['model_has_roles']);
|
||||
Schema::drop($tableNames['model_has_permissions']);
|
||||
Schema::drop($tableNames['roles']);
|
||||
Schema::drop($tableNames['permissions']);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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('features', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('title');
|
||||
$table->string('bg_color')->nullable();
|
||||
$table->string('image')->nullable();
|
||||
$table->boolean('status')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('features');
|
||||
}
|
||||
};
|
||||
@@ -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('pos_app_interfaces', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('image');
|
||||
$table->boolean('status');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('pos_app_interfaces');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
<?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('languages', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('icon')->nullable();
|
||||
$table->boolean('status')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('languages');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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('testimonials', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->text('text')->nullable();
|
||||
$table->integer('star');
|
||||
$table->string('client_name');
|
||||
$table->string('client_image')->nullable();
|
||||
$table->string('work_at');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('testimonials');
|
||||
}
|
||||
};
|
||||
35
database/migrations/2024_04_16_094724_create_blogs_table.php
Normal file
35
database/migrations/2024_04_16_094724_create_blogs_table.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?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('blogs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('user_id')->constrained()->cascadeOnDelete(); // Creator Id
|
||||
$table->string('title')->unique();
|
||||
$table->string('slug')->unique();
|
||||
$table->string('image');
|
||||
$table->boolean('status')->default(1);
|
||||
$table->longText('descriptions')->nullable();
|
||||
$table->text('tags')->nullable();
|
||||
$table->longText('meta')->nullable(); // Meta Title, Meta Description
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('blogs');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,33 @@
|
||||
<?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('comments', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('blog_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('comment_id')->nullable()->constrained()->cascadeOnDelete();
|
||||
$table->string('name');
|
||||
$table->string('email');
|
||||
$table->string('comment');
|
||||
$table->boolean('status')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('comments');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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('messages', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('phone');
|
||||
$table->string('email');
|
||||
$table->string('company_name')->nullable();
|
||||
$table->string('message');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('messages');
|
||||
}
|
||||
};
|
||||
32
database/migrations/2024_08_06_174713_create_jobs_table.php
Normal file
32
database/migrations/2024_08_06_174713_create_jobs_table.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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('jobs', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('queue')->index();
|
||||
$table->longText('payload');
|
||||
$table->unsignedTinyInteger('attempts');
|
||||
$table->unsignedInteger('reserved_at')->nullable();
|
||||
$table->unsignedInteger('available_at');
|
||||
$table->unsignedInteger('created_at');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('jobs');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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('income_categories', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('categoryName');
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->text('categoryDescription')->nullable();
|
||||
$table->boolean('status')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('income_categories');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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('incomes', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->double('amount', 10, 2);
|
||||
$table->foreignId('income_category_id')->nullable()->constrained()->nullOnDelete();
|
||||
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('incomeFor')->nullable();
|
||||
$table->string('paymentType')->default('Cash');
|
||||
$table->string('referenceNo')->nullable();
|
||||
$table->text('note')->nullable();
|
||||
$table->timestamp('incomeDate')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('incomes');
|
||||
}
|
||||
};
|
||||
@@ -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::table('products', function (Blueprint $table) {
|
||||
$table->dropUnique(['productCode']);
|
||||
$table->string('productCode')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('products', function (Blueprint $table) {
|
||||
$table->string('productCode')->nullable(false)->unique()->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?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::table('users', function (Blueprint $table) {
|
||||
$table->string('status')->nullable()->after('password');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn('status');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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('sale_returns', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('sale_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('invoice_no')->nullable();
|
||||
$table->timestamp('return_date')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('sale_returns');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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('sale_return_details', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('sale_return_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('sale_detail_id')->constrained('sale_details')->cascadeOnDelete();
|
||||
$table->double('return_amount', 10, 2)->default(0);
|
||||
$table->integer('return_qty');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('sale_return_details');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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('purchase_returns', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('purchase_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('invoice_no')->nullable();
|
||||
$table->timestamp('return_date')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('purchase_returns');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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('purchase_return_details', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('purchase_return_id')->constrained('purchase_returns')->cascadeOnDelete();
|
||||
$table->foreignId('purchase_detail_id')->constrained('purchase_details')->cascadeOnDelete();
|
||||
$table->double('return_amount', 10, 2)->default(0);
|
||||
$table->integer('return_qty');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('purchase_return_details');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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('user_currencies', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('currency_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('name');
|
||||
$table->string('country_name')->nullable();
|
||||
$table->string('code');
|
||||
$table->double('rate')->nullable();
|
||||
$table->string('symbol')->nullable();
|
||||
$table->string('position')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('user_currencies');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?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::table('categories', function (Blueprint $table) {
|
||||
$table->string('icon')->nullable()->after('business_id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('categories', function (Blueprint $table) {
|
||||
$table->dropColumn('icon');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
<?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::table('brands', function (Blueprint $table) {
|
||||
$table->string('icon')->nullable()->after('brandName');
|
||||
$table->string('description')->nullable()->after('brandName');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('brands', function (Blueprint $table) {
|
||||
$table->dropColumn('icon');
|
||||
$table->dropColumn('description');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,53 @@
|
||||
<?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()
|
||||
{
|
||||
Schema::table('products', function (Blueprint $table) {
|
||||
$table->double('productStock', 10, 2)->default(0)->change();
|
||||
});
|
||||
|
||||
Schema::table('sale_details', function (Blueprint $table) {
|
||||
$table->double('quantities', 10, 2)->default(0)->change();
|
||||
});
|
||||
|
||||
Schema::table('purchase_details', function (Blueprint $table) {
|
||||
$table->double('quantities', 10, 2)->default(0)->change();
|
||||
});
|
||||
|
||||
Schema::table('purchase_return_details', function (Blueprint $table) {
|
||||
$table->double('return_qty', 10, 2)->default(0)->change();
|
||||
});
|
||||
|
||||
Schema::table('sale_return_details', function (Blueprint $table) {
|
||||
$table->double('return_qty', 10, 2)->default(0)->change();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::table('products', function (Blueprint $table) {
|
||||
$table->integer('productStock')->default(0)->change();
|
||||
});
|
||||
|
||||
Schema::table('purchase_details', function (Blueprint $table) {
|
||||
$table->integer('quantities')->default(0)->change();
|
||||
});
|
||||
|
||||
Schema::table('purchase_return_details', function (Blueprint $table) {
|
||||
$table->integer('return_qty')->default(0)->change();
|
||||
});
|
||||
|
||||
Schema::table('sale_return_details', function (Blueprint $table) {
|
||||
$table->integer('return_qty')->default(0)->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
32
database/migrations/2025_01_16_153449_create_vats_table.php
Normal file
32
database/migrations/2025_01_16_153449_create_vats_table.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?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('vats', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->double('rate')->default(0);
|
||||
$table->longText('sub_vat')->nullable();
|
||||
$table->boolean('status')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('vats');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
<?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::table('sales', function (Blueprint $table) {
|
||||
$table->foreignId('vat_id')->nullable()->constrained()->nullOnDelete()->after('vat_percent');
|
||||
});
|
||||
Schema::table('products', function (Blueprint $table) {
|
||||
$table->foreignId('vat_id')->nullable()->constrained()->cascadeOnDelete()->after('productStock');
|
||||
$table->string('vat_type')->default('exclusive')->after('productStock');
|
||||
$table->double('vat_amount', 10, 2)->default(0)->after('productStock');
|
||||
$table->double('profit_percent')->default(0)->after('productStock');
|
||||
});
|
||||
Schema::table('purchases', function (Blueprint $table) {
|
||||
$table->foreignId('vat_id')->nullable()->constrained()->nullOnDelete()->after('isPaid');
|
||||
$table->double('vat_amount', 10, 2)->default(0)->after('isPaid');
|
||||
$table->double('vat_percent', 10, 2)->default(0)->after('isPaid');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('sales', function (Blueprint $table) {
|
||||
$table->dropColumn('vat_id');
|
||||
});
|
||||
Schema::table('products', function (Blueprint $table) {
|
||||
$table->dropColumn('vat_id');
|
||||
$table->dropColumn('vat_type');
|
||||
$table->dropColumn('vat_amount');
|
||||
$table->dropColumn('profit_percent');
|
||||
});
|
||||
Schema::table('purchases', function (Blueprint $table) {
|
||||
$table->dropColumn('vat_id');
|
||||
$table->dropColumn('vat_amount');
|
||||
$table->dropColumn('vat_percent');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -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::table('businesses', function (Blueprint $table) {
|
||||
$table->string('vat_name')->nullable()->after('shopOpeningBalance');
|
||||
$table->string('vat_no')->nullable()->after('shopOpeningBalance');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('businesses', function (Blueprint $table) {
|
||||
$table->dropColumn(['vat_name', 'vat_no']);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,47 @@
|
||||
<?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::table('products', function (Blueprint $table) {
|
||||
$table->double('alert_qty')->default(0)->after('productStock');
|
||||
$table->date('expire_date')->nullable()->after('productStock');
|
||||
});
|
||||
Schema::table('sales', function (Blueprint $table) {
|
||||
$table->string('discount_type')->default('flat')->after('discountAmount'); // flat, percent
|
||||
$table->double('discount_percent')->default(0)->after('discountAmount');
|
||||
$table->double('shipping_charge')->default(0)->after('discountAmount');
|
||||
$table->string('image')->nullable()->after('saleDate');
|
||||
});
|
||||
Schema::table('purchases', function (Blueprint $table) {
|
||||
$table->string('discount_type')->default('flat')->after('discountAmount'); // flat, percent
|
||||
$table->double('discount_percent')->default(0)->after('discountAmount');
|
||||
$table->double('shipping_charge')->default(0)->after('discountAmount');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('products', function (Blueprint $table) {
|
||||
$table->dropColumn(['alert_qty', 'expire_date']);
|
||||
});
|
||||
Schema::table('sales', function (Blueprint $table) {
|
||||
$table->dropColumn(['discount_type', 'discount_percent', 'shipping_charge', 'image']);
|
||||
});
|
||||
Schema::table('purchases', function (Blueprint $table) {
|
||||
$table->dropColumn(['discount_type', 'discount_percent', 'shipping_charge']);
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
<?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('payment_types', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('name');
|
||||
$table->boolean('status')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('payment_types');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,60 @@
|
||||
<?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::table('sales', function (Blueprint $table) {
|
||||
$table->foreignId('payment_type_id')->nullable()->after('paymentType');
|
||||
});
|
||||
Schema::table('purchases', function (Blueprint $table) {
|
||||
$table->foreignId('payment_type_id')->nullable()->after('paymentType');
|
||||
$table->string("paymentType")->nullable()->change();
|
||||
});
|
||||
Schema::table('due_collects', function (Blueprint $table) {
|
||||
$table->foreignId('payment_type_id')->nullable()->after('paymentType');
|
||||
$table->string("paymentType")->nullable()->change();
|
||||
});
|
||||
Schema::table('incomes', function (Blueprint $table) {
|
||||
$table->foreignId('payment_type_id')->nullable()->after('paymentType');
|
||||
$table->string("paymentType")->nullable()->change();
|
||||
});
|
||||
Schema::table('expenses', function (Blueprint $table) {
|
||||
$table->foreignId('payment_type_id')->nullable()->after('paymentType');
|
||||
$table->string("paymentType")->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('sales', function (Blueprint $table) {
|
||||
$table->dropColumn('payment_type_id');
|
||||
});
|
||||
Schema::table('purchases', function (Blueprint $table) {
|
||||
$table->dropColumn('payment_type_id');
|
||||
$table->string("paymentType")->default("Cash")->change();
|
||||
});
|
||||
Schema::table('due_collects', function (Blueprint $table) {
|
||||
$table->dropColumn('payment_type_id');
|
||||
$table->string("paymentType")->default("Cash")->change();
|
||||
});
|
||||
Schema::table('incomes', function (Blueprint $table) {
|
||||
$table->dropColumn('payment_type_id');
|
||||
$table->string("paymentType")->default("Cash")->change();
|
||||
});
|
||||
Schema::table('expenses', function (Blueprint $table) {
|
||||
$table->dropColumn('payment_type_id');
|
||||
$table->string("paymentType")->default("Cash")->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -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::table('parties', function (Blueprint $table) {
|
||||
$table->dropUnique('parties_phone_unique');
|
||||
$table->string('phone')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('parties', function (Blueprint $table) {
|
||||
$table->string('phone')->unique()->nullable()->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
<?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::table('sales', function (Blueprint $table) {
|
||||
$table->string('rounding_option')->nullable()->after('totalAmount');
|
||||
$table->double('rounding_amount', 10, 2)->default(0)->after('totalAmount');
|
||||
$table->double('actual_total_amount', 10, 2)->default(0)->after('totalAmount');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('sales', function (Blueprint $table) {
|
||||
$table->dropColumn(['rounding_option', 'rounding_amount', 'actual_total_amount']);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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::table('sales', function (Blueprint $table) {
|
||||
$table->double('change_amount')->default(0)->after('paidAmount');
|
||||
});
|
||||
|
||||
Schema::table('purchases', function (Blueprint $table) {
|
||||
$table->double('change_amount')->default(0)->after('paidAmount');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('sales', function (Blueprint $table) {
|
||||
$table->dropColumn('change_amount');
|
||||
});
|
||||
|
||||
Schema::table('purchases', function (Blueprint $table) {
|
||||
$table->dropColumn('change_amount');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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::table('users', function (Blueprint $table) {
|
||||
$table->string('provider')->nullable()->after('visibility');
|
||||
$table->string('provider_id')->nullable()->after('visibility');
|
||||
$table->boolean('is_verified')->default(0)->after('visibility');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn('provider');
|
||||
$table->dropColumn('provider_id');
|
||||
$table->dropColumn('is_verified');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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::table('purchase_details', function (Blueprint $table) {
|
||||
$table->date('expire_date')->nullable()->after('quantities');
|
||||
});
|
||||
|
||||
Schema::table('sales', function (Blueprint $table) {
|
||||
$table->string('type')->nullable()->after('user_id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('purchase_details', function (Blueprint $table) {
|
||||
$table->dropColumn('expire_date');
|
||||
});
|
||||
Schema::table('sales', function (Blueprint $table) {
|
||||
$table->dropColumn('type');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -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('product_settings', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->longText('modules');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('product_settings');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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('warehouses', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('name');
|
||||
$table->string('phone')->nullable();
|
||||
$table->string('email')->nullable()->unique();
|
||||
$table->string('address')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('warehouses');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
<?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('transfers', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('from_warehouse_id')->nullable()->constrained('warehouses')->nullOnDelete();
|
||||
$table->foreignId('to_warehouse_id')->nullable()->constrained('warehouses')->nullOnDelete();
|
||||
$table->date('transfer_date');
|
||||
$table->string('invoice_no')->unique();
|
||||
$table->text('note')->nullable();
|
||||
$table->double('shipping_charge', 10, 2)->default(0);
|
||||
$table->double('sub_total', 10, 2)->default(0);
|
||||
$table->double('total_discount', 10, 2)->default(0);
|
||||
$table->double('total_tax', 10, 2)->default(0);
|
||||
$table->double('grand_total', 12, 2)->default(0);
|
||||
$table->enum('status', ['pending', 'completed', 'cancelled'])->default('pending');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('transfers');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
<?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('transfer_products', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('transfer_id')->constrained('transfers')->cascadeOnDelete();
|
||||
$table->foreignId('product_id')->nullable()->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('warehouse_id')->nullable()->constrained()->cascadeOnDelete();
|
||||
$table->integer('quantity')->default(1);
|
||||
$table->double('unit_price', 10, 2)->default(0);
|
||||
$table->double('discount', 10, 2)->default(0);
|
||||
$table->double('tax', 10, 2)->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('transfer_products');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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('variations', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('name');
|
||||
$table->boolean('status')->default(1);
|
||||
$table->longText('values');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('variations');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
<?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('stocks', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('product_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('batch_no')->nullable();
|
||||
$table->double('productStock')->default(0);
|
||||
$table->double('productPurchasePrice')->default(0);
|
||||
$table->double('profit_percent')->default(0);
|
||||
$table->double('productSalePrice')->default(0);
|
||||
$table->double('productWholeSalePrice')->default(0);
|
||||
$table->double('productDealerPrice')->default(0);
|
||||
$table->string('mfg_date')->nullable();
|
||||
$table->string('expire_date')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('stocks');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
<?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('product_models', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->boolean('status')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('product_models');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,67 @@
|
||||
<?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::table('products', function (Blueprint $table) {
|
||||
$table->foreignId('model_id')->nullable()->constrained('product_models')->nullOnDelete()->after('category_id');
|
||||
$table->foreignId('warehouse_id')->nullable()->constrained()->nullOnDelete()->after('category_id');
|
||||
$table->string('product_type')->default('single')->nullable()->after('productPicture');
|
||||
$table->dropForeign(['unit_id']);
|
||||
$table->dropForeign(['brand_id']);
|
||||
$table->dropForeign(['category_id']);
|
||||
$table->foreignId('category_id')->nullable()->change();
|
||||
$table->foreign('unit_id')->references('id')->on('units')->nullOnDelete();
|
||||
$table->foreign('brand_id')->references('id')->on('brands')->nullOnDelete();
|
||||
$table->foreign('category_id')->references('id')->on('categories')->nullOnDelete();
|
||||
});
|
||||
|
||||
Schema::table('sale_details', function (Blueprint $table) {
|
||||
$table->foreignId('stock_id')->nullable()->constrained()->nullOnDelete()->after('product_id');
|
||||
$table->string('expire_date')->nullable()->after('quantities');
|
||||
$table->string('mfg_date')->nullable()->after('quantities');
|
||||
$table->double('productPurchasePrice')->default(0)->after('quantities');
|
||||
});
|
||||
|
||||
Schema::table('purchase_details', function (Blueprint $table) {
|
||||
$table->foreignId('stock_id')->nullable()->constrained()->nullOnDelete()->after('product_id');
|
||||
$table->string('profit_percent')->nullable()->after('quantities');
|
||||
$table->string('mfg_date')->nullable()->after('quantities');
|
||||
$table->string('expire_date')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('products', function (Blueprint $table) {
|
||||
$table->dropColumn(['model_id', 'warehouse_id', 'product_type']);
|
||||
$table->dropForeign(['category_id']);
|
||||
$table->dropForeign(['unit_id']);
|
||||
$table->dropForeign(['brand_id']);
|
||||
$table->unsignedBigInteger('category_id')->nullable(false)->change();
|
||||
$table->foreign('category_id')->references('id')->on('categories')->cascadeOnDelete();
|
||||
$table->foreign('unit_id')->references('id')->on('units')->cascadeOnDelete();
|
||||
$table->foreign('brand_id')->references('id')->on('brands')->cascadeOnDelete();
|
||||
});
|
||||
|
||||
Schema::table('sale_details', function (Blueprint $table) {
|
||||
$table->dropColumn(['stock_id', 'expire_date', 'productPurchasePrice', 'mfg_date']);
|
||||
});
|
||||
|
||||
Schema::table('purchase_details', function (Blueprint $table) {
|
||||
$table->dropColumn(['stock_id', 'profit_percent', 'mfg_date']);
|
||||
$table->date('expire_date')->nullable()->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?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::table('plans', function (Blueprint $table) {
|
||||
$table->longText('visibility')->nullable()->after('status');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('plans', function (Blueprint $table) {
|
||||
$table->dropColumn('visibility');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
<?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('shelves', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('name');
|
||||
$table->boolean('status')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('shelves');
|
||||
}
|
||||
};
|
||||
30
database/migrations/2025_08_17_040002_create_racks_table.php
Normal file
30
database/migrations/2025_08_17_040002_create_racks_table.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?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('racks', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('name');
|
||||
$table->boolean('status')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('racks');
|
||||
}
|
||||
};
|
||||
@@ -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('rack_shelf', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('rack_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('shelf_id')->constrained()->cascadeOnDelete();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('rack_shelf');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
<?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('branches', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('name');
|
||||
$table->string('phone')->nullable();
|
||||
$table->string('email')->nullable();
|
||||
$table->string('address')->nullable();
|
||||
$table->longText('description')->nullable();
|
||||
$table->boolean('status')->default(1);
|
||||
$table->boolean('is_main')->default(0);
|
||||
$table->double('branchOpeningBalance')->default(0);
|
||||
$table->double('branchRemainingBalance')->default(0);
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('branches');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,272 @@
|
||||
<?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
|
||||
{
|
||||
// PARTIES TABLE
|
||||
Schema::table('parties', function (Blueprint $table) {
|
||||
$table->double('credit_limit')->default(0)->after('due');
|
||||
$table->double('loyalty_points')->default(0)->after('due');
|
||||
$table->double('wallet')->default(0)->after('due'); // advance amount
|
||||
$table->double('opening_balance')->default(0)->after('due');
|
||||
$table->string('opening_balance_type')->nullable()->after('due'); // advance / due
|
||||
$table->text('billing_address')->nullable()->after('status');
|
||||
$table->text('shipping_address')->nullable()->after('status');
|
||||
$table->text('meta')->nullable()->after('status');
|
||||
});
|
||||
|
||||
// USERS TABLE
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->foreignId('branch_id')->nullable()->after('business_id')->constrained('branches')->cascadeOnDelete();
|
||||
$table->foreignId('active_branch_id')->nullable()->after('business_id')->constrained('branches')->nullOnDelete();
|
||||
});
|
||||
|
||||
// STOCKS TABLE
|
||||
Schema::table('stocks', function (Blueprint $table) {
|
||||
$table->foreignId('branch_id')->nullable()->after('business_id')->constrained('branches')->nullOnDelete();
|
||||
$table->foreignId('warehouse_id')->nullable()->after('branch_id')->constrained('warehouses')->nullOnDelete();
|
||||
});
|
||||
|
||||
Schema::table('product_settings', function (Blueprint $table) {
|
||||
$table->foreignId('branch_id')->nullable()->after('business_id')->constrained('branches')->nullOnDelete();
|
||||
});
|
||||
|
||||
Schema::table('sale_returns', function (Blueprint $table) {
|
||||
$table->foreignId('branch_id')->nullable()->after('business_id')->constrained('branches')->nullOnDelete();
|
||||
});
|
||||
|
||||
Schema::table('purchase_returns', function (Blueprint $table) {
|
||||
$table->foreignId('branch_id')->nullable()->after('business_id')->constrained('branches')->nullOnDelete();
|
||||
});
|
||||
|
||||
// EXPENSES
|
||||
Schema::table('expenses', function (Blueprint $table) {
|
||||
$table->dropForeign(['user_id']);
|
||||
$table->unsignedBigInteger('user_id')->nullable()->change();
|
||||
});
|
||||
Schema::table('expenses', function (Blueprint $table) {
|
||||
$table->foreign('user_id')->references('id')->on('users')->nullOnDelete();
|
||||
$table->foreignId('branch_id')->nullable()->after('business_id')->constrained('branches')->nullOnDelete();
|
||||
});
|
||||
|
||||
// INCOMES
|
||||
Schema::table('incomes', function (Blueprint $table) {
|
||||
$table->dropForeign(['user_id']);
|
||||
$table->unsignedBigInteger('user_id')->nullable()->change();
|
||||
});
|
||||
Schema::table('incomes', function (Blueprint $table) {
|
||||
$table->foreign('user_id')->references('id')->on('users')->nullOnDelete();
|
||||
$table->foreignId('branch_id')->nullable()->after('business_id')->constrained('branches')->nullOnDelete();
|
||||
});
|
||||
|
||||
// SALES
|
||||
Schema::table('sales', function (Blueprint $table) {
|
||||
$table->dropForeign(['party_id']);
|
||||
$table->dropForeign(['user_id']);
|
||||
$table->unsignedBigInteger('party_id')->nullable()->change();
|
||||
$table->unsignedBigInteger('user_id')->nullable()->change();
|
||||
});
|
||||
Schema::table('sales', function (Blueprint $table) {
|
||||
$table->foreign('party_id')->references('id')->on('parties')->nullOnDelete();
|
||||
$table->foreign('user_id')->references('id')->on('users')->nullOnDelete();
|
||||
$table->foreignId('branch_id')->nullable()->after('business_id')->constrained('branches')->nullOnDelete();
|
||||
});
|
||||
|
||||
// PURCHASES
|
||||
Schema::table('purchases', function (Blueprint $table) {
|
||||
$table->dropForeign(['party_id']);
|
||||
$table->dropForeign(['user_id']);
|
||||
$table->unsignedBigInteger('party_id')->nullable()->change();
|
||||
$table->unsignedBigInteger('user_id')->nullable()->change();
|
||||
});
|
||||
Schema::table('purchases', function (Blueprint $table) {
|
||||
$table->foreign('party_id')->references('id')->on('parties')->nullOnDelete();
|
||||
$table->foreign('user_id')->references('id')->on('users')->nullOnDelete();
|
||||
$table->foreignId('branch_id')->nullable()->after('business_id')->constrained('branches')->nullOnDelete();
|
||||
});
|
||||
|
||||
// DUE COLLECTS
|
||||
Schema::table('due_collects', function (Blueprint $table) {
|
||||
$table->dropForeign(['party_id']);
|
||||
$table->dropForeign(['user_id']);
|
||||
$table->dropForeign(['sale_id']);
|
||||
$table->dropForeign(['purchase_id']);
|
||||
|
||||
$table->unsignedBigInteger('party_id')->nullable()->change();
|
||||
$table->unsignedBigInteger('user_id')->nullable()->change();
|
||||
$table->unsignedBigInteger('sale_id')->nullable()->change();
|
||||
$table->unsignedBigInteger('purchase_id')->nullable()->change();
|
||||
});
|
||||
Schema::table('due_collects', function (Blueprint $table) {
|
||||
$table->foreign('party_id')->references('id')->on('parties')->nullOnDelete();
|
||||
$table->foreign('user_id')->references('id')->on('users')->nullOnDelete();
|
||||
$table->foreign('sale_id')->references('id')->on('sales')->nullOnDelete();
|
||||
$table->foreign('purchase_id')->references('id')->on('purchases')->nullOnDelete();
|
||||
$table->foreignId('branch_id')->nullable()->after('business_id')->constrained('branches')->nullOnDelete();
|
||||
});
|
||||
|
||||
// Plan
|
||||
Schema::table('plans', function (Blueprint $table) {
|
||||
$table->boolean('allow_multibranch')->default(0)->after('status');
|
||||
$table->integer('addon_domain_limit')->nullable()->after('allow_multibranch');
|
||||
$table->integer('subdomain_limit')->nullable()->after('addon_domain_limit');
|
||||
});
|
||||
|
||||
// PLAN SUBSCRIBED
|
||||
Schema::table('plan_subscribes', function (Blueprint $table) {
|
||||
$table->boolean('allow_multibranch')->default(0)->after('price');
|
||||
$table->integer('addon_domain_limit')->default(0)->after('price');
|
||||
$table->integer('subdomain_limit')->default(0)->after('price');
|
||||
});
|
||||
|
||||
// BUSINESS TABLE
|
||||
Schema::table('businesses', function (Blueprint $table) {
|
||||
$table->string('email')->nullable()->after('address');
|
||||
$table->boolean('status')->default(1)->after('vat_name');
|
||||
});
|
||||
|
||||
// TRANSFERS
|
||||
Schema::table('transfers', function (Blueprint $table) {
|
||||
$table->foreignId('from_branch_id')->nullable()->after('business_id')->constrained('branches')->nullOnDelete();
|
||||
$table->foreignId('to_branch_id')->nullable()->after('from_warehouse_id')->constrained('branches')->nullOnDelete();
|
||||
});
|
||||
|
||||
Schema::table('transfer_products', function (Blueprint $table) {
|
||||
$table->dropConstrainedForeignId('warehouse_id');
|
||||
$table->foreignId('stock_id')->nullable()->after('transfer_id')->constrained('stocks')->nullOnDelete();
|
||||
});
|
||||
|
||||
// Products
|
||||
Schema::table('products', function (Blueprint $table) {
|
||||
$table->foreignId('rack_id')->nullable()->after('business_id')->constrained('racks')->nullOnDelete();
|
||||
$table->foreignId('shelf_id')->nullable()->after('rack_id')->constrained('shelves')->nullOnDelete();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
// PARTIES
|
||||
Schema::table('parties', function (Blueprint $table) {
|
||||
$table->dropColumn(['credit_limit', 'loyalty_points', 'wallet', 'opening_balance', 'opening_balance_type', 'billing_address', 'shipping_address', 'meta']);
|
||||
});
|
||||
|
||||
// USERS
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn(['branch_id', 'active_branch_id']);
|
||||
});
|
||||
|
||||
// STOCKS
|
||||
Schema::table('stocks', function (Blueprint $table) {
|
||||
$table->dropColumn(['branch_id', 'warehouse_id']);
|
||||
});
|
||||
|
||||
Schema::table('product_settings', function (Blueprint $table) {
|
||||
$table->dropColumn('branch_id');
|
||||
});
|
||||
|
||||
Schema::table('sale_returns', function (Blueprint $table) {
|
||||
$table->dropColumn('branch_id');
|
||||
});
|
||||
|
||||
Schema::table('purchase_returns', function (Blueprint $table) {
|
||||
$table->dropColumn('branch_id');
|
||||
});
|
||||
|
||||
// EXPENSES
|
||||
Schema::table('expenses', function (Blueprint $table) {
|
||||
$table->dropForeign(['user_id']);
|
||||
$table->dropColumn('branch_id');
|
||||
$table->unsignedBigInteger('user_id')->nullable(false)->change();
|
||||
});
|
||||
Schema::table('expenses', function (Blueprint $table) {
|
||||
$table->foreign('user_id')->references('id')->on('users')->cascadeOnDelete();
|
||||
});
|
||||
|
||||
// INCOMES
|
||||
Schema::table('incomes', function (Blueprint $table) {
|
||||
$table->dropForeign(['user_id']);
|
||||
$table->dropColumn('branch_id');
|
||||
$table->unsignedBigInteger('user_id')->nullable(false)->change();
|
||||
});
|
||||
Schema::table('incomes', function (Blueprint $table) {
|
||||
$table->foreign('user_id')->references('id')->on('users')->cascadeOnDelete();
|
||||
});
|
||||
|
||||
// SALES
|
||||
Schema::table('sales', function (Blueprint $table) {
|
||||
$table->dropForeign(['party_id', 'user_id']);
|
||||
$table->dropColumn('branch_id');
|
||||
$table->unsignedBigInteger('party_id')->nullable(false)->change();
|
||||
$table->unsignedBigInteger('user_id')->nullable(false)->change();
|
||||
});
|
||||
Schema::table('sales', function (Blueprint $table) {
|
||||
$table->foreign('party_id')->references('id')->on('parties')->cascadeOnDelete();
|
||||
$table->foreign('user_id')->references('id')->on('users')->cascadeOnDelete();
|
||||
});
|
||||
|
||||
// PURCHASES
|
||||
Schema::table('purchases', function (Blueprint $table) {
|
||||
$table->dropForeign(['party_id', 'user_id']);
|
||||
$table->dropColumn('branch_id');
|
||||
$table->unsignedBigInteger('party_id')->nullable(false)->change();
|
||||
$table->unsignedBigInteger('user_id')->nullable(false)->change();
|
||||
});
|
||||
Schema::table('purchases', function (Blueprint $table) {
|
||||
$table->foreign('party_id')->references('id')->on('parties')->cascadeOnDelete();
|
||||
$table->foreign('user_id')->references('id')->on('users')->cascadeOnDelete();
|
||||
});
|
||||
|
||||
// DUE COLLECTS
|
||||
Schema::table('due_collects', function (Blueprint $table) {
|
||||
$table->dropForeign(['party_id', 'user_id', 'sale_id', 'purchase_id']);
|
||||
$table->dropColumn('branch_id');
|
||||
$table->unsignedBigInteger('party_id')->nullable(false)->change();
|
||||
$table->unsignedBigInteger('user_id')->nullable(false)->change();
|
||||
$table->unsignedBigInteger('sale_id')->nullable(false)->change();
|
||||
$table->unsignedBigInteger('purchase_id')->nullable(false)->change();
|
||||
});
|
||||
Schema::table('due_collects', function (Blueprint $table) {
|
||||
$table->foreign('party_id')->references('id')->on('parties')->cascadeOnDelete();
|
||||
$table->foreign('user_id')->references('id')->on('users')->cascadeOnDelete();
|
||||
$table->foreign('sale_id')->references('id')->on('sales')->cascadeOnDelete();
|
||||
$table->foreign('purchase_id')->references('id')->on('purchases')->cascadeOnDelete();
|
||||
});
|
||||
|
||||
// Plans
|
||||
Schema::table('plans', function (Blueprint $table) {
|
||||
$table->dropColumn(['allow_multibranch', 'addon_domain_limit', 'subdomain_limit']);
|
||||
});
|
||||
|
||||
// Plans
|
||||
Schema::table('plan_subscribes', function (Blueprint $table) {
|
||||
$table->dropColumn(['allow_multibranch', 'addon_domain_limit', 'subdomain_limit']);
|
||||
});
|
||||
|
||||
// BUSINESS TABLE
|
||||
Schema::table('businesses', function (Blueprint $table) {
|
||||
$table->dropColumn(['email', 'status']);
|
||||
});
|
||||
|
||||
// TRANSFERS
|
||||
Schema::table('transfers', function (Blueprint $table) {
|
||||
$table->dropColumn(['from_branch_id', 'to_branch_id']);
|
||||
});
|
||||
|
||||
Schema::table('transfer_products', function (Blueprint $table) {
|
||||
$table->foreignId('warehouse_id')->nullable()->constrained()->cascadeOnDelete();
|
||||
$table->dropColumn('stock_id');
|
||||
});
|
||||
|
||||
// Products
|
||||
Schema::table('products', function (Blueprint $table) {
|
||||
$table->dropColumn(['rack_id', 'shelf_id']);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,45 @@
|
||||
<?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('transactions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('platform'); // sale, purchase, income, expense, due_pay / due_collect, bank, cash, cheque, sale_return, purchase_return, payroll
|
||||
$table->string('transaction_type'); // cash_payment, cheque_payment, wallet_payment, bank_payment, bank_to_bank, bank_to_cash, cash_to_bank, adjust_bank, adjust_cash, cheque_to_bank, cheque_to_cash
|
||||
$table->string('type')->nullable(); // debit, credit, transfer, pending, deposit, others
|
||||
$table->double('amount', 15, 3);
|
||||
$table->date('date')->nullable();
|
||||
$table->foreignId('business_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('branch_id')->nullable()->constrained()->nullOnDelete();
|
||||
$table->foreignId('payment_type_id')->nullable()->constrained()->nullOnDelete();
|
||||
$table->foreignId('user_id')->nullable()->constrained()->nullOnDelete();
|
||||
$table->foreignId('from_bank')->nullable()->constrained('payment_types')->nullOnDelete();
|
||||
$table->foreignId('to_bank')->nullable()->constrained('payment_types')->nullOnDelete();
|
||||
$table->unsignedBigInteger('reference_id')->nullable(); // sale_id, purchase_id, due_collect_id, income_id, expense_id, payroll_id
|
||||
$table->string('invoice_no')->nullable(); // related invoice no
|
||||
$table->string('image')->nullable();
|
||||
$table->text('note')->nullable(); // description/note
|
||||
$table->longText('meta')->nullable();
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('transactions');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
<?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::table('payment_types', function (Blueprint $table) {
|
||||
$table->foreignId('branch_id')->nullable()->after('business_id')->constrained()->nullOnDelete();
|
||||
$table->decimal('balance', 15, 3)->default(0)->after('name');
|
||||
$table->decimal('opening_balance', 15, 3)->default(0)->after('name');
|
||||
$table->date('opening_date')->nullable()->after('name');
|
||||
$table->boolean('show_in_invoice')->default(1)->after('name');
|
||||
$table->longText('meta')->nullable()->after('name');
|
||||
$table->softDeletes();
|
||||
});
|
||||
|
||||
Schema::table('stocks', function (Blueprint $table) {
|
||||
$table->string('variant_name')->nullable()->after('productDealerPrice');
|
||||
$table->longText('variation_data')->nullable()->after('productDealerPrice');
|
||||
$table->longText('serial_numbers')->nullable()->after('productDealerPrice');
|
||||
$table->softDeletes();
|
||||
});
|
||||
|
||||
Schema::table('products', function (Blueprint $table) {
|
||||
$table->text('variation_ids')->nullable()->after('productCode');
|
||||
$table->integer('has_serial')->default(0)->after('productCode');
|
||||
$table->longText('warranty_guarantee_info')->nullable()->after('productCode');
|
||||
});
|
||||
|
||||
Schema::table('sale_details', function (Blueprint $table) {
|
||||
$table->longText('warranty_guarantee_info')->nullable()->after('quantities');
|
||||
$table->double('discount')->default(0)->after('price');
|
||||
});
|
||||
|
||||
Schema::table('gateways', function (Blueprint $table) {
|
||||
$table->longText('platform')->nullable()->after('name');
|
||||
});
|
||||
|
||||
Schema::table('businesses', function (Blueprint $table) {
|
||||
$table->longText('meta')->nullable()->after('vat_name');
|
||||
});
|
||||
|
||||
Schema::table('parties', function (Blueprint $table) {
|
||||
$table->foreignId('branch_id')->nullable()->after('business_id')->constrained()->nullOnDelete();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('payment_types', function (Blueprint $table) {
|
||||
$table->dropColumn(['branch_id', 'opening_balance', 'opening_date', 'show_in_invoice', 'meta', 'balance','deleted_at']);
|
||||
});
|
||||
|
||||
Schema::table('stocks', function (Blueprint $table) {
|
||||
$table->dropColumn(['variant_name', 'variation_data', 'serial_numbers']);
|
||||
$table->dropSoftDeletes();
|
||||
});
|
||||
|
||||
Schema::table('products', function (Blueprint $table) {
|
||||
$table->dropColumn(['variation_ids', 'warranty_guarantee_info','has_serial']);
|
||||
});
|
||||
|
||||
Schema::table('sale_details', function (Blueprint $table) {
|
||||
$table->dropColumn(['warranty_guarantee_info', 'discount']);
|
||||
});
|
||||
|
||||
Schema::table('gateways', function (Blueprint $table) {
|
||||
$table->dropColumn('platform');
|
||||
});
|
||||
|
||||
Schema::table('businesses', function (Blueprint $table) {
|
||||
$table->dropColumn('meta');
|
||||
});
|
||||
|
||||
Schema::table('parties', function (Blueprint $table) {
|
||||
$table->dropColumn('branch_id');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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('combo_products', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('product_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('branch_id')->nullable()->constrained()->nullOnDelete();
|
||||
$table->foreignId('stock_id')->constrained()->cascadeOnDelete();
|
||||
$table->double('purchase_price', 15, 3)->default(0);
|
||||
$table->double('quantity', 15, 3)->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('combo_products');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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::table('products', function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('products', 'is_displayed_in_pos')) {
|
||||
$table->boolean('is_displayed_in_pos')->default(true)->after('product_type');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('products', function (Blueprint $table) {
|
||||
if (Schema::hasColumn('products', 'is_displayed_in_pos')) {
|
||||
$table->dropColumn('is_displayed_in_pos');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
20
database/seeders/AdvertiseSeeder.php
Normal file
20
database/seeders/AdvertiseSeeder.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Banner;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class AdvertiseSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$banners = array(
|
||||
array('imageUrl' => 'uploads/24/06/1718101787-963.png', 'status' => '1', 'created_at' => '2024-06-11 22:29:48', 'updated_at' => '2024-06-11 22:29:48'),
|
||||
array('imageUrl' => 'uploads/24/06/1718101799-395.png', 'status' => '1', 'created_at' => '2024-06-11 22:29:59', 'updated_at' => '2024-06-11 22:29:59'),
|
||||
array('imageUrl' => 'uploads/24/06/1718101807-972.png', 'status' => '1', 'created_at' => '2024-06-11 22:30:07', 'updated_at' => '2024-06-11 22:30:07')
|
||||
);
|
||||
|
||||
Banner::insert($banners);
|
||||
}
|
||||
}
|
||||
22
database/seeders/AffiliateSeeder.php
Normal file
22
database/seeders/AffiliateSeeder.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Modules\AffiliateAddon\App\Models\Affiliate;
|
||||
|
||||
class AffiliateSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$affiliates = array(
|
||||
array('id' => '1', 'user_id' => '5', 'ref_code' => 'user-123', 'balance' => '500.00', 'created_at' => '2025-05-28 10:58:20', 'updated_at' => '2025-05-28 10:58:20')
|
||||
);
|
||||
|
||||
Affiliate::insert($affiliates);
|
||||
}
|
||||
}
|
||||
27
database/seeders/BlogSeeder.php
Normal file
27
database/seeders/BlogSeeder.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Blog;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
|
||||
class BlogSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$blogs = array(
|
||||
array('user_id' => '1', 'title' => 'What is a Custom Point of Sale System? Pros & Cons', 'slug' => 'what-is-a-custom-point-of-sale-system-pros-cons', 'image' => 'uploads/24/06/1717396156-451.png', 'status' => '1', 'descriptions' => 'Blessing welcomed ladyship she met humo ured sir breeding her. Six curiosity day assurance bed necessary', 'tags' => '["Point of Sale","assurance bed necessary"]', 'meta' => '{"title":"What is a Custom Point of Sale System? Pros & Cons","description":"Blessing welcomed ladyship she met humo ured sir breeding her. Six curiosity day assurance bed necessary"}', 'created_at' => '2024-04-16 23:06:02', 'updated_at' => '2024-06-03 18:29:16'),
|
||||
array('user_id' => '1', 'title' => 'What is the Store of the Future? 8 Trends to Watch Out For', 'slug' => 'what-is-the-store-of-the-future-8-trends-to-watch-out-for', 'image' => 'uploads/24/06/1717396180-13.png', 'status' => '1', 'descriptions' => 'Blessing welcomed ladyship she met humo ured sir breeding her. Six curiosity day assurance bed necessary', 'tags' => '["Trends to Watch",null]', 'meta' => '{"title":"What is the Store of the Future? 8 Trends to Watch Out For","description":"Blessing welcomed ladyship she met humo ured sir breeding her. Six curiosity day assurance bed necessary"}', 'created_at' => '2024-04-16 23:07:13', 'updated_at' => '2024-06-03 18:29:40'),
|
||||
array('user_id' => '1', 'title' => 'How Much Are Point of Sale Transaction Fees?', 'slug' => 'how-much-are-point-of-sale-transaction-fees', 'image' => 'uploads/24/06/1717396207-62.png', 'status' => '1', 'descriptions' => 'Blessing welcomed ladyship she met humo ured sir breeding her. Six curiosity day assurance bed necessary', 'tags' => '["breeding","Point of Sale","Transaction"]', 'meta' => '{"title":"How Much Are Point of Sale Transaction Fees?","description":"Blessing welcomed ladyship she met humo ured sir breeding her. Six curiosity day assurance bed necessary"}', 'created_at' => '2024-04-16 23:08:34', 'updated_at' => '2024-06-03 18:30:07'),
|
||||
array('user_id' => '1', 'title' => 'Good Customer Service in Retail: 9 Characteristics', 'slug' => 'good-customer-service-in-retail-9-characteristics', 'image' => 'uploads/24/06/1717396233-816.png', 'status' => '1', 'descriptions' => 'Blessing welcomed ladyship she met humo ured sir breeding her. Six curiosity day assurance bed necessary', 'tags' => '["Six curiosity","Customer Service in Retail"]', 'meta' => '{"title":"Good Customer Service in Retail: 9 Characteristics","description":"Blessing welcomed ladyship she met humo ured sir breeding her. Six curiosity day assurance bed necessary"}', 'created_at' => '2024-04-16 23:11:24', 'updated_at' => '2024-06-03 18:30:33'),
|
||||
array('user_id' => '1', 'title' => 'What Are the 10 Risks of Inventory Transfer?', 'slug' => 'what-are-the-10-risks-of-inventory-transfer', 'image' => 'uploads/24/06/1717396254-420.png', 'status' => '1', 'descriptions' => 'Blessing welcomed ladyship she met humo ured sir breeding her. Six curiosity day assurance bed necessary', 'tags' => '["Risks of Inventory","assurance bed necessary"]', 'meta' => '{"title":"What Are the 10 Risks of Inventory Transfer?","description":"Blessing welcomed ladyship she met humo ured sir breeding her. Six curiosity day assurance bed necessary"}', 'created_at' => '2024-04-16 23:12:53', 'updated_at' => '2024-06-03 18:30:54'),
|
||||
array('user_id' => '1', 'title' => 'What is the Store of the Future? 12 Trends to Watch Out For', 'slug' => 'what-is-the-store-of-the-future-12-trends-to-watch-out-for', 'image' => 'uploads/24/06/1717396274-353.png', 'status' => '1', 'descriptions' => 'Blessing welcomed ladyship she met humo ured sir breeding her. Six curiosity day assurance bed necessary', 'tags' => '["Trends to Watch","ladyship she met"]', 'meta' => '{"title":"What is the Store of the Future? 8 Trends to Watch Out For","description":"Blessing welcomed ladyship she met humo ured sir breeding her. Six curiosity day assurance bed necessary"}', 'created_at' => '2024-04-16 23:15:42', 'updated_at' => '2024-06-03 18:31:15')
|
||||
);
|
||||
|
||||
Blog::insert($blogs);
|
||||
}
|
||||
}
|
||||
39
database/seeders/BrandSeeder.php
Normal file
39
database/seeders/BrandSeeder.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Brand;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class BrandSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$brands = array(
|
||||
array('business_id' => '1', 'brandName' => 'Tesla', 'description' => 'Innovative electric vehicles and clean energy solutions.', 'icon' => NULL, 'status' => '1', 'created_at' => '2024-11-05 15:38:10', 'updated_at' => '2024-11-05 15:38:10'),
|
||||
array('business_id' => '1', 'brandName' => 'Bugatti', 'description' => 'Luxury sports cars with unmatched speed and performance.', 'icon' => NULL, 'status' => '1', 'created_at' => '2024-11-05 18:58:00', 'updated_at' => '2024-11-05 18:58:00'),
|
||||
array('business_id' => '1', 'brandName' => 'Addidas', 'description' => 'Global sportswear brand delivering comfort and style.', 'icon' => NULL, 'status' => '1', 'created_at' => '2024-11-28 21:27:25', 'updated_at' => '2024-11-28 21:27:25'),
|
||||
array('business_id' => '1', 'brandName' => 'Puma', 'description' => 'Sport-inspired fashion and high-performance footwear.', 'icon' => 'uploads/24/11/1732786079-799.png', 'status' => '1', 'created_at' => '2024-11-28 21:27:59', 'updated_at' => '2024-11-28 21:27:59'),
|
||||
array('business_id' => '1', 'brandName' => 'Levi\'s', 'description' => 'Iconic denim and fashion brand trusted worldwide.', 'icon' => 'uploads/24/11/1732786106-281.png', 'status' => '1', 'created_at' => '2024-11-28 21:28:26', 'updated_at' => '2024-11-28 21:28:26'),
|
||||
array('business_id' => '1', 'brandName' => 'H&M', 'description' => 'Trendy clothing and accessories at affordable prices.', 'icon' => 'uploads/24/11/1732786127-117.png', 'status' => '1', 'created_at' => '2024-11-28 21:28:47', 'updated_at' => '2024-11-28 21:28:47'),
|
||||
array('business_id' => '1', 'brandName' => 'Rolex', 'description' => 'Prestigious Swiss watches symbolizing luxury and precision.', 'icon' => 'uploads/24/11/1732786146-95.png', 'status' => '1', 'created_at' => '2024-11-28 21:29:06', 'updated_at' => '2024-11-28 21:29:06'),
|
||||
array('business_id' => '1', 'brandName' => 'Apple', 'description' => 'Cutting-edge technology and innovative smart devices.', 'icon' => 'uploads/24/11/1732786166-518.png', 'status' => '1', 'created_at' => '2024-11-28 21:29:26', 'updated_at' => '2024-11-28 21:29:26'),
|
||||
array('business_id' => '1', 'brandName' => 'Schnell', 'description' => 'High-quality German-engineered household and lifestyle products.', 'icon' => 'uploads/24/11/1732786190-544.png', 'status' => '1', 'created_at' => '2024-11-28 21:29:50', 'updated_at' => '2024-11-28 21:29:50'),
|
||||
array('business_id' => '1', 'brandName' => 'Gucci', 'description' => 'Italian luxury fashion house known for bold designs.', 'icon' => 'uploads/24/11/1732786229-315.png', 'status' => '1', 'created_at' => '2024-11-28 21:30:05', 'updated_at' => '2024-11-28 21:30:29'),
|
||||
array('business_id' => '1', 'brandName' => 'Zara', 'description' => 'Fast-fashion retailer with modern, stylish collections.', 'icon' => 'uploads/24/11/1732786248-250.png', 'status' => '1', 'created_at' => '2024-11-28 21:30:48', 'updated_at' => '2024-11-28 21:30:48'),
|
||||
array('business_id' => '1', 'brandName' => 'Nike', 'description' => 'World-leading sportswear brand inspiring athletes globally.', 'icon' => 'uploads/24/11/1732786269-552.png', 'status' => '1', 'created_at' => '2024-11-28 21:31:10', 'updated_at' => '2024-11-28 21:31:10'),
|
||||
array('business_id' => '1', 'brandName' => 'Gillette', 'description' => 'Trusted grooming products for men’s shaving and care.', 'icon' => 'uploads/24/11/1732786288-65.png', 'status' => '1', 'created_at' => '2024-11-28 21:31:28', 'updated_at' => '2024-11-28 21:31:28'),
|
||||
array('business_id' => '1', 'brandName' => 'Accenture', 'description' => 'Global consulting and professional services company.', 'icon' => 'uploads/24/11/1732786307-528.png', 'status' => '1', 'created_at' => '2024-11-28 21:31:47', 'updated_at' => '2024-11-28 21:31:47'),
|
||||
array('business_id' => '1', 'brandName' => 'Nescafe', 'description' => 'World-famous coffee brand bringing rich taste and aroma.', 'icon' => 'uploads/24/11/1732786332-860.png', 'status' => '1', 'created_at' => '2024-11-28 21:32:12', 'updated_at' => '2024-11-28 21:32:12'),
|
||||
array('business_id' => '1', 'brandName' => 'Loreal', 'description' => 'Global leader in beauty, cosmetics, and skincare.', 'icon' => 'uploads/24/11/1732786349-739.png', 'status' => '1', 'created_at' => '2024-11-28 21:32:29', 'updated_at' => '2024-11-28 21:32:29'),
|
||||
array('business_id' => '1', 'brandName' => 'Samsung', 'description' => 'Innovative electronics and smart home technology.', 'icon' => 'uploads/25/08/1754890081-674.png', 'status' => '1', 'created_at' => '2025-08-11 17:28:01', 'updated_at' => '2025-08-11 17:28:01'),
|
||||
array('business_id' => '1', 'brandName' => 'Nike', 'description' => 'High-performance footwear and apparel for athletes.', 'icon' => 'uploads/25/08/1754890402-214.png', 'status' => '1', 'created_at' => '2025-08-11 17:28:31', 'updated_at' => '2025-08-11 17:33:22'),
|
||||
array('business_id' => '1', 'brandName' => 'Apple', 'description' => 'Premium electronics and innovative digital experiences.', 'icon' => 'uploads/25/08/1754890453-456.png', 'status' => '1', 'created_at' => '2025-08-11 17:28:44', 'updated_at' => '2025-08-11 17:34:13'),
|
||||
array('business_id' => '1', 'brandName' => 'Philips', 'description' => 'Reliable electronics, lighting, and healthcare technology.', 'icon' => 'uploads/25/08/1754890493-437.png', 'status' => '1', 'created_at' => '2025-08-11 17:28:59', 'updated_at' => '2025-08-11 17:34:53'),
|
||||
array('business_id' => '1', 'brandName' => 'Kellogg’s', 'description' => 'Trusted cereal and breakfast food brand loved worldwide.', 'icon' => 'uploads/25/08/1754890574-990.png', 'status' => '1', 'created_at' => '2025-08-11 17:29:36', 'updated_at' => '2025-08-11 17:36:14'),
|
||||
array('business_id' => '1', 'brandName' => 'McCain Foods', 'description' => 'Frozen food products delivering taste and convenience.', 'icon' => 'uploads/25/08/1754890617-678.png', 'status' => '1', 'created_at' => '2025-08-11 17:29:50', 'updated_at' => '2025-08-11 17:36:57')
|
||||
);
|
||||
|
||||
Brand::insert($brands);
|
||||
}
|
||||
}
|
||||
31
database/seeders/BusinessCategorySeeder.php
Normal file
31
database/seeders/BusinessCategorySeeder.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\BusinessCategory;
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
|
||||
class BusinessCategorySeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// $business_categories = array(
|
||||
// array('name' => 'Fashion Store','description' => NULL,'status' => 1,'created_at' => now(),'updated_at' => now()),
|
||||
// array('name' => 'Electronics Store','description' => NULL,'status' => 1,'created_at' => now(),'updated_at' => now()),
|
||||
// array('name' => 'Computer Store','description' => NULL,'status' => 1,'created_at' => now(),'updated_at' => now()),
|
||||
// array('name' => 'Vegetable Store','description' => NULL,'status' => 1,'created_at' => now(),'updated_at' => now()),
|
||||
// array('name' => 'Meat Store','description' => NULL,'status' => 1,'created_at' => now(),'updated_at' => now()),
|
||||
// array('name' => 'BR','description' => NULL,'status' => 1,'created_at' => now(),'updated_at' => now()),
|
||||
// array('name' => 'Restaurant','description' => NULL,'status' => 1,'created_at' => now(),'updated_at' => now()),
|
||||
// array('name' => 'CAR WASH','description' => NULL,'status' => 1,'created_at' => now(),'updated_at' => now()),
|
||||
// );
|
||||
|
||||
// BusinessCategory::insert($business_categories);
|
||||
|
||||
BusinessCategory::factory()->count(100)->create();
|
||||
}
|
||||
}
|
||||
18
database/seeders/BusinessSeeder.php
Normal file
18
database/seeders/BusinessSeeder.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Business;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class BusinessSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$businesses = array(
|
||||
array('plan_subscribe_id' => '1', 'business_category_id' => '1', 'companyName' => 'Trade G', 'will_expire' => '2035-12-15', 'address' => 'Dhaka, Bangladesh', 'email' => 'tradeground@gmail.com', 'phoneNumber' => '01712022529', 'pictureUrl' => NULL, 'subscriptionDate' => '2025-12-15 00:00:00', 'remainingShopBalance' => '0.00', 'shopOpeningBalance' => '100.00', 'vat_no' => '1234', 'vat_name' => 'GST11', 'meta' => '{"show_company_name":1,"show_phone_number":1,"show_address":1,"show_email":1,"show_vat":1}', 'status' => '1', 'created_at' => '2025-12-15 14:00:38', 'updated_at' => '2025-12-15 14:01:16')
|
||||
);
|
||||
|
||||
Business::insert($businesses);
|
||||
}
|
||||
}
|
||||
40
database/seeders/CategorySeeder.php
Normal file
40
database/seeders/CategorySeeder.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Category;
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class CategorySeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$categories = array(
|
||||
array('categoryName' => 'Fashion', 'business_id' => '1', 'icon' => NULL, 'variationCapacity' => '1', 'variationColor' => '1', 'variationSize' => '1', 'variationType' => '1', 'variationWeight' => '1', 'status' => '1', 'created_at' => '2024-11-28 18:03:34', 'updated_at' => '2024-11-28 18:03:34'),
|
||||
array('categoryName' => 'Woman Dress', 'business_id' => '1', 'icon' => 'uploads/24/11/1732785432-929.png', 'variationCapacity' => '0', 'variationColor' => '1', 'variationSize' => '1', 'variationType' => '0', 'variationWeight' => '0', 'status' => '1', 'created_at' => '2024-11-28 21:17:13', 'updated_at' => '2024-11-28 21:17:13'),
|
||||
array('categoryName' => 'Fruits', 'business_id' => '1', 'icon' => 'uploads/24/11/1732785466-928.png', 'variationCapacity' => '0', 'variationColor' => '1', 'variationSize' => '1', 'variationType' => '1', 'variationWeight' => '0', 'status' => '1', 'created_at' => '2024-11-28 21:17:46', 'updated_at' => '2024-11-28 21:17:46'),
|
||||
array('categoryName' => 'T-Shirts', 'business_id' => '1', 'icon' => 'uploads/24/11/1732785505-514.png', 'variationCapacity' => '0', 'variationColor' => '1', 'variationSize' => '1', 'variationType' => '1', 'variationWeight' => '0', 'status' => '1', 'created_at' => '2024-11-28 21:18:25', 'updated_at' => '2024-11-28 21:18:25'),
|
||||
array('categoryName' => 'Shoes', 'business_id' => '1', 'icon' => 'uploads/24/11/1732785670-352.png', 'variationCapacity' => '0', 'variationColor' => '1', 'variationSize' => '1', 'variationType' => '0', 'variationWeight' => '0', 'status' => '1', 'created_at' => '2024-11-28 21:21:10', 'updated_at' => '2024-11-28 21:21:10'),
|
||||
array('categoryName' => 'Sunglass', 'business_id' => '1', 'icon' => 'uploads/24/11/1732785700-802.png', 'variationCapacity' => '0', 'variationColor' => '1', 'variationSize' => '1', 'variationType' => '1', 'variationWeight' => '0', 'status' => '1', 'created_at' => '2024-11-28 21:21:40', 'updated_at' => '2024-11-28 21:21:40'),
|
||||
array('categoryName' => 'Woman Bag', 'business_id' => '1', 'icon' => 'uploads/24/11/1732785720-233.png', 'variationCapacity' => '0', 'variationColor' => '0', 'variationSize' => '1', 'variationType' => '1', 'variationWeight' => '1', 'status' => '1', 'created_at' => '2024-11-28 21:22:00', 'updated_at' => '2024-11-28 21:22:00'),
|
||||
array('categoryName' => 'Smart Watch', 'business_id' => '1', 'icon' => 'uploads/24/11/1732785742-51.png', 'variationCapacity' => '1', 'variationColor' => '0', 'variationSize' => '1', 'variationType' => '0', 'variationWeight' => '0', 'status' => '1', 'created_at' => '2024-11-28 21:22:22', 'updated_at' => '2024-11-28 21:22:22'),
|
||||
array('categoryName' => 'Short Dress', 'business_id' => '1', 'icon' => 'uploads/24/11/1732785766-251.png', 'variationCapacity' => '0', 'variationColor' => '1', 'variationSize' => '0', 'variationType' => '1', 'variationWeight' => '0', 'status' => '1', 'created_at' => '2024-11-28 21:22:46', 'updated_at' => '2024-11-28 21:22:46'),
|
||||
array('categoryName' => 'Shorts Pants', 'business_id' => '1', 'icon' => 'uploads/24/11/1732785791-229.png', 'variationCapacity' => '0', 'variationColor' => '1', 'variationSize' => '1', 'variationType' => '1', 'variationWeight' => '0', 'status' => '1', 'created_at' => '2024-11-28 21:23:11', 'updated_at' => '2024-11-28 21:23:11'),
|
||||
array('categoryName' => 'Long sleeve shirt', 'business_id' => '1', 'icon' => 'uploads/24/11/1732785840-919.png', 'variationCapacity' => '0', 'variationColor' => '1', 'variationSize' => '1', 'variationType' => '1', 'variationWeight' => '0', 'status' => '1', 'created_at' => '2024-11-28 21:24:00', 'updated_at' => '2024-11-28 21:24:00'),
|
||||
array('categoryName' => 'Smart Phone', 'business_id' => '1', 'icon' => 'uploads/24/11/1732785866-840.png', 'variationCapacity' => '0', 'variationColor' => '1', 'variationSize' => '1', 'variationType' => '1', 'variationWeight' => '0', 'status' => '1', 'created_at' => '2024-11-28 21:24:26', 'updated_at' => '2024-11-28 21:24:26'),
|
||||
array('categoryName' => 'Computer', 'business_id' => '1', 'icon' => 'uploads/24/11/1732785888-33.png', 'variationCapacity' => '0', 'variationColor' => '1', 'variationSize' => '1', 'variationType' => '1', 'variationWeight' => '0', 'status' => '1', 'created_at' => '2024-11-28 21:24:48', 'updated_at' => '2024-11-28 21:24:48'),
|
||||
array('categoryName' => 'Electronic', 'business_id' => '1', 'icon' => 'uploads/24/11/1732785909-396.png', 'variationCapacity' => '0', 'variationColor' => '1', 'variationSize' => '1', 'variationType' => '1', 'variationWeight' => '1', 'status' => '1', 'created_at' => '2024-11-28 21:25:09', 'updated_at' => '2024-11-28 21:25:09'),
|
||||
array('categoryName' => 'Electronics', 'business_id' => '1', 'icon' => 'uploads/25/08/1754889318-719.png', 'variationCapacity' => '0', 'variationColor' => '0', 'variationSize' => '0', 'variationType' => '0', 'variationWeight' => '0', 'status' => '1', 'created_at' => '2025-08-11 17:15:18', 'updated_at' => '2025-08-11 17:15:18'),
|
||||
array('categoryName' => 'Clothing & Apparel', 'business_id' => '1', 'icon' => 'uploads/25/08/1754889419-511.png', 'variationCapacity' => '0', 'variationColor' => '0', 'variationSize' => '0', 'variationType' => '0', 'variationWeight' => '0', 'status' => '1', 'created_at' => '2025-08-11 17:16:59', 'updated_at' => '2025-08-11 17:16:59'),
|
||||
array('categoryName' => 'Home Appliances', 'business_id' => '1', 'icon' => 'uploads/25/08/1754889461-802.png', 'variationCapacity' => '0', 'variationColor' => '0', 'variationSize' => '0', 'variationType' => '0', 'variationWeight' => '0', 'status' => '1', 'created_at' => '2025-08-11 17:17:41', 'updated_at' => '2025-08-11 17:17:41'),
|
||||
array('categoryName' => 'Beauty & Personal Care', 'business_id' => '1', 'icon' => 'uploads/25/08/1754889630-890.png', 'variationCapacity' => '0', 'variationColor' => '0', 'variationSize' => '0', 'variationType' => '0', 'variationWeight' => '0', 'status' => '1', 'created_at' => '2025-08-11 17:20:30', 'updated_at' => '2025-08-11 17:20:30'),
|
||||
array('categoryName' => 'Fashion', 'business_id' => '1', 'icon' => 'uploads/25/08/1754889946-992.png', 'variationCapacity' => '0', 'variationColor' => '0', 'variationSize' => '0', 'variationType' => '0', 'variationWeight' => '0', 'status' => '1', 'created_at' => '2025-08-11 17:25:46', 'updated_at' => '2025-08-11 17:25:46')
|
||||
);
|
||||
|
||||
Category::insert($categories);
|
||||
}
|
||||
}
|
||||
21
database/seeders/ComboProductSeeder.php
Normal file
21
database/seeders/ComboProductSeeder.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\ComboProduct;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class ComboProductSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$combo_products = array(
|
||||
array('product_id' => '9', 'stock_id' => '6', 'purchase_price' => '80.000', 'quantity' => '3.000'),
|
||||
array('product_id' => '9', 'stock_id' => '3', 'purchase_price' => '50.000', 'quantity' => '2.000'),
|
||||
array('product_id' => '10', 'stock_id' => '2', 'purchase_price' => '200.000', 'quantity' => '1.000'),
|
||||
array('product_id' => '10', 'stock_id' => '1', 'purchase_price' => '100.000', 'quantity' => '1.000')
|
||||
);
|
||||
|
||||
ComboProduct::insert($combo_products);
|
||||
}
|
||||
}
|
||||
172
database/seeders/CurrencySeeder.php
Normal file
172
database/seeders/CurrencySeeder.php
Normal file
@@ -0,0 +1,172 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Currency;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
|
||||
class CurrencySeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
$currencies = array(
|
||||
array('name' => 'Afghanistan Afghani', 'country_name' => 'Afghanistan', 'code' => 'AFN', 'rate' => '67.27', 'symbol' => '؋', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Albania Lek', 'country_name' => 'Albania', 'code' => 'ALL', 'rate' => '91.47', 'symbol' => 'L', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Algerian Dinar', 'country_name' => 'Algeria', 'code' => 'DZD', 'rate' => '133.08', 'symbol' => 'دج', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'US Dollar', 'country_name' => 'United States of America', 'code' => 'USD', 'rate' => '1.00', 'symbol' => '$', 'position' => 'left', 'status' => '1', 'is_default' => '1', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Angolan Kwanza', 'country_name' => 'Angola', 'code' => 'AOA', 'rate' => '910.98', 'symbol' => 'Kz', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Argentine Peso', 'country_name' => 'Argentina', 'code' => 'ARS', 'rate' => '1007.68', 'symbol' => '$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Armenian Dram', 'country_name' => 'Armenia', 'code' => 'AMD', 'rate' => '389.25', 'symbol' => '֏', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Aruban Guilder', 'country_name' => 'Aruba', 'code' => 'AWG', 'rate' => '1.79', 'symbol' => 'ƒ', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Australian Dollar', 'country_name' => 'Australia', 'code' => 'AUD', 'rate' => '1.54', 'symbol' => '$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Euro', 'country_name' => 'Austria', 'code' => 'EUR', 'rate' => '0.95', 'symbol' => '€', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Azerbaijan Manat', 'country_name' => 'Azerbaijan', 'code' => 'AZN', 'rate' => '1.70', 'symbol' => '₼', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Bahamian Dollar', 'country_name' => 'Bahamas', 'code' => 'BSD', 'rate' => '1.00', 'symbol' => '$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Bahraini Dinar', 'country_name' => 'Bahrain', 'code' => 'BHD', 'rate' => '0.38', 'symbol' => '.د.ب', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Bangladesh Taka', 'country_name' => 'Bangladesh', 'code' => 'BDT', 'rate' => '119.00', 'symbol' => '৳', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Barbados Dollar', 'country_name' => 'Barbados', 'code' => 'BBD', 'rate' => '2.00', 'symbol' => '$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Belarusian Ruble', 'country_name' => 'Belarus', 'code' => 'BYN', 'rate' => '3.43', 'symbol' => 'Br', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Belize Dollar', 'country_name' => 'Belize', 'code' => 'BZD', 'rate' => '2.00', 'symbol' => '$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Bermuda Dollar', 'country_name' => 'Bermuda', 'code' => 'BMD', 'rate' => '1.00', 'symbol' => '$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Bhutan Ngultrum', 'country_name' => 'Bhutan', 'code' => 'BTN', 'rate' => '84.45', 'symbol' => 'Nu.', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Bolivia Boliviano', 'country_name' => 'Bolivia', 'code' => 'BOB', 'rate' => '6.86', 'symbol' => 'Bs.', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Bosnia and Herzegovina Convertible Mark', 'country_name' => 'Bosnia and Herzegovina', 'code' => 'BAM', 'rate' => '1.85', 'symbol' => 'KM', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Botswana Pula', 'country_name' => 'Botswana', 'code' => 'BWP', 'rate' => '13.55', 'symbol' => 'P', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Brazilian Real', 'country_name' => 'Brazil', 'code' => 'BRL', 'rate' => '5.82', 'symbol' => 'R$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Brunei Dollar', 'country_name' => 'Brunei', 'code' => 'BND', 'rate' => '1.34', 'symbol' => '$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Bulgarian Lev', 'country_name' => 'Bulgaria', 'code' => 'BGN', 'rate' => '1.85', 'symbol' => 'лв', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Burundi Franc', 'country_name' => 'Burundi', 'code' => 'BIF', 'rate' => '2885.73', 'symbol' => 'FBu', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Cambodian Riel', 'country_name' => 'Cambodia', 'code' => 'KHR', 'rate' => '4017.00', 'symbol' => '៛', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Canadian Dollar', 'country_name' => 'Canada', 'code' => 'CAD', 'rate' => '1.40', 'symbol' => '$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Cape Verde Escudo', 'country_name' => 'Cape Verde', 'code' => 'CVE', 'rate' => '104.50', 'symbol' => '$', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Cayman Is. Dollar', 'country_name' => 'Cayman Islands', 'code' => 'KYD', 'rate' => '0.82', 'symbol' => '$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Chilean Peso', 'country_name' => 'Chile', 'code' => 'CLP', 'rate' => '973.00', 'symbol' => '$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Chinese Renminbi', 'country_name' => 'China', 'code' => 'CNY', 'rate' => '7.25', 'symbol' => '¥', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Colombian Peso', 'country_name' => 'Colombia', 'code' => 'COP', 'rate' => '4413.00', 'symbol' => '$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Comoros Franc', 'country_name' => 'Comoros', 'code' => 'KMF', 'rate' => '466.23', 'symbol' => 'CF', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Congo Franc, Dem. Rep.of', 'country_name' => 'Congo, Dem. Rep.', 'code' => 'CDF', 'rate' => '2843.07', 'symbol' => 'FC', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Costa Rica Colon', 'country_name' => 'Costa Rica', 'code' => 'CRC', 'rate' => '509.02', 'symbol' => '₡', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Cuban Peso', 'country_name' => 'Cuba', 'code' => 'CUP', 'rate' => '24.00', 'symbol' => '₱', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Czech Koruna', 'country_name' => 'Czech Republic', 'code' => 'CZK', 'rate' => '23.97', 'symbol' => 'Kč', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Danish Krone', 'country_name' => 'Denmark', 'code' => 'DKK', 'rate' => '7.07', 'symbol' => 'kr', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Djibouti Francs', 'country_name' => 'Djibouti', 'code' => 'DJF', 'rate' => '177.00', 'symbol' => 'Fdj', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'E.C. Dollar', 'country_name' => 'Anguilla', 'code' => 'XCD', 'rate' => '2.70', 'symbol' => '$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Dominican Peso', 'country_name' => 'Dominican Republic', 'code' => 'DOP', 'rate' => '60.17', 'symbol' => 'RD$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Egyptian Pound', 'country_name' => 'Egypt', 'code' => 'EGP', 'rate' => '49.61', 'symbol' => '£', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Eritrea Nakfa', 'country_name' => 'Eritrea', 'code' => 'ERN', 'rate' => '15.00', 'symbol' => 'Nfk', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Lilangeni', 'country_name' => 'Eswatini, Kingdom of', 'code' => 'SZL', 'rate' => '18.16', 'symbol' => 'E', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Ethiopian Birr', 'country_name' => 'Ethiopia', 'code' => 'ETB', 'rate' => '121.81', 'symbol' => 'Br', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Fiji Dollar', 'country_name' => 'Fiji', 'code' => 'FJD', 'rate' => '2.25', 'symbol' => '$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Gambian Dalasi', 'country_name' => 'Gambia', 'code' => 'GMD', 'rate' => '70.41', 'symbol' => 'D', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Georgian Lari', 'country_name' => 'Georgia', 'code' => 'GEL', 'rate' => '2.74', 'symbol' => '₾', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Ghana Cedi', 'country_name' => 'Ghana', 'code' => 'GHS', 'rate' => '15.50', 'symbol' => '₵', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Gibraltar Pound', 'country_name' => 'Gibraltar', 'code' => 'GIP', 'rate' => '0.79', 'symbol' => '£', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Guatemala Quetzal(es)', 'country_name' => 'Guatemala', 'code' => 'GTQ', 'rate' => '7.71', 'symbol' => 'Q', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Guinean Franc', 'country_name' => 'Guinea', 'code' => 'GNF', 'rate' => '8552.17', 'symbol' => 'FG', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Guyana Dollar', 'country_name' => 'Guyana', 'code' => 'GYD', 'rate' => '207.90', 'symbol' => '$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Haiti Gourde', 'country_name' => 'Haiti', 'code' => 'HTG', 'rate' => '130.93', 'symbol' => 'G', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Honduras Lempira', 'country_name' => 'Honduras', 'code' => 'HNL', 'rate' => '24.96', 'symbol' => 'L', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'HongKong Dollar', 'country_name' => 'Hong Kong', 'code' => 'HKD', 'rate' => '7.78', 'symbol' => 'HK$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Hungary Forint', 'country_name' => 'Hungary', 'code' => 'HUF', 'rate' => '391.50', 'symbol' => 'Ft', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Iceland Krona', 'country_name' => 'Iceland', 'code' => 'ISK', 'rate' => '137.04', 'symbol' => 'kr', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Indian Rupee', 'country_name' => 'India', 'code' => 'INR', 'rate' => '84.45', 'symbol' => '₹', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Indonesia Rupiah', 'country_name' => 'Indonesia', 'code' => 'IDR', 'rate' => '15930.00', 'symbol' => 'Rp', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Iranian Rial', 'country_name' => 'Iran', 'code' => 'IRR', 'rate' => '512897.00', 'symbol' => '﷼', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Iraqi Dinar', 'country_name' => 'Iraq', 'code' => 'IQD', 'rate' => '1310.00', 'symbol' => 'ع.د', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Israel Shekel', 'country_name' => 'Israel', 'code' => 'ILS', 'rate' => '3.65', 'symbol' => '₪', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Jamaican Dollar', 'country_name' => 'Jamaica', 'code' => 'JMD', 'rate' => '157.35', 'symbol' => 'J$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Japanese Yen', 'country_name' => 'Japan', 'code' => 'JPY', 'rate' => '151.42', 'symbol' => '¥', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Jordanian Dinar', 'country_name' => 'Jordan', 'code' => 'JOD', 'rate' => '0.71', 'symbol' => 'د.ا', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Kazakhstan Tenge', 'country_name' => 'Kazakhstan', 'code' => 'KZT', 'rate' => '502.23', 'symbol' => '₸', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Kenyan Shilling', 'country_name' => 'Kenya', 'code' => 'KES', 'rate' => '129.00', 'symbol' => 'KSh', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Korean Won, North Korea', 'country_name' => 'Korea, D.P.R. of', 'code' => 'KPW', 'rate' => '110.00', 'symbol' => '₩', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Korean Won, South Korea', 'country_name' => 'Korea, Republic of', 'code' => 'KRW', 'rate' => '1392.51', 'symbol' => '₩', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Kuwaiti Dinar', 'country_name' => 'Kuwait', 'code' => 'KWD', 'rate' => '0.31', 'symbol' => 'د.ك', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Kyrgyzstan Som', 'country_name' => 'Kyrgyzstan', 'code' => 'KGS', 'rate' => '86.25', 'symbol' => 'с', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Laos Kip', 'country_name' => 'Lao, People\'s Dem. Rep.', 'code' => 'LAK', 'rate' => '22020.00', 'symbol' => '₭', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Lebanese Pound', 'country_name' => 'Lebanon', 'code' => 'LBP', 'rate' => '89500.00', 'symbol' => 'ل.ل', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Lesotho Loti', 'country_name' => 'Lesotho', 'code' => 'LSL', 'rate' => '18.16', 'symbol' => 'M', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Liberian Dollar', 'country_name' => 'Liberia', 'code' => 'LRD', 'rate' => '179.39', 'symbol' => '$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Libyan Dinar', 'country_name' => 'Libyan Arab Jamahiriya', 'code' => 'LYD', 'rate' => '4.89', 'symbol' => 'د.ل', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Macao Pataca', 'country_name' => 'Macao', 'code' => 'MOP', 'rate' => '8.02', 'symbol' => 'P', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Malagasy Ariary', 'country_name' => 'Madagascar', 'code' => 'MGA', 'rate' => '4667.74', 'symbol' => 'Ar', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Malawi Kwacha', 'country_name' => 'Malawi', 'code' => 'MWK', 'rate' => '1751.00', 'symbol' => 'MK', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Malaysia Ringgit', 'country_name' => 'Malaysia', 'code' => 'MYR', 'rate' => '4.44', 'symbol' => 'RM', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Maldives Rufiyaa', 'country_name' => 'Maldives', 'code' => 'MVR', 'rate' => '15.00', 'symbol' => 'Rf', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Mauritania Ouguiya', 'country_name' => 'Mauritania', 'code' => 'MRU', 'rate' => '39.77', 'symbol' => 'UM', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Mauritius Rupee', 'country_name' => 'Mauritius', 'code' => 'MUR', 'rate' => '46.64', 'symbol' => '₨', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Mexican Peso', 'country_name' => 'Mexico', 'code' => 'MXN', 'rate' => '20.68', 'symbol' => '$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Moldovan Leu', 'country_name' => 'Moldova, Republic of', 'code' => 'MDL', 'rate' => '18.23', 'symbol' => 'L', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Mongolia Tugrik', 'country_name' => 'Mongolia', 'code' => 'MNT', 'rate' => '3406.00', 'symbol' => '₮', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Morocco Dirham', 'country_name' => 'Morocco', 'code' => 'MAD', 'rate' => '10.00', 'symbol' => 'د.م.', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Mozambique Metical', 'country_name' => 'Mozambique', 'code' => 'MZN', 'rate' => '63.25', 'symbol' => 'MT', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Myanmar Kyat', 'country_name' => 'Myanmar', 'code' => 'MMK', 'rate' => '4100.00', 'symbol' => 'K', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Namibia Dollar', 'country_name' => 'Namibia', 'code' => 'NAD', 'rate' => '18.16', 'symbol' => 'N$', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Nepalese Rupee', 'country_name' => 'Nepal', 'code' => 'NPR', 'rate' => '135.11', 'symbol' => '₨', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Netherlands Antilles Guilder', 'country_name' => 'Netherlands Antilles', 'code' => 'ANG', 'rate' => '1.79', 'symbol' => 'ƒ', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'CFP Franc', 'country_name' => 'New Caledonia', 'code' => 'XPF', 'rate' => '113.09', 'symbol' => '₣', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'New Zealand Dollar', 'country_name' => 'New Zealand', 'code' => 'NZD', 'rate' => '1.69', 'symbol' => '$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Nicaragua Cordoba Oro', 'country_name' => 'Nicaragua', 'code' => 'NIO', 'rate' => '36.55', 'symbol' => 'C$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Nigeria Naira', 'country_name' => 'Nigeria', 'code' => 'NGN', 'rate' => '1680.29', 'symbol' => '₦', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Denar', 'country_name' => 'North Macedonia, Rep. of', 'code' => 'MKD', 'rate' => '58.11', 'symbol' => 'ден', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Norwegian Krone', 'country_name' => 'Norway', 'code' => 'NOK', 'rate' => '11.07', 'symbol' => 'kr', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Oman Rial', 'country_name' => 'Oman', 'code' => 'OMR', 'rate' => '0.38', 'symbol' => 'ر.ع.', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Pakistani Rupee', 'country_name' => 'Pakistan', 'code' => 'PKR', 'rate' => '277.77', 'symbol' => '₨', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Panama Balboa', 'country_name' => 'Panama', 'code' => 'PAB', 'rate' => '1.00', 'symbol' => 'B/.', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Kina', 'country_name' => 'Papua New Guinea', 'code' => 'PGK', 'rate' => '3.95', 'symbol' => 'K', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Paraguay Guarani', 'country_name' => 'Paraguay', 'code' => 'PYG', 'rate' => '7804.00', 'symbol' => '₲', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Sol', 'country_name' => 'Peru', 'code' => 'PEN', 'rate' => '3.76', 'symbol' => 'S/', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Philippine Peso', 'country_name' => 'Philippines', 'code' => 'PHP', 'rate' => '58.70', 'symbol' => '₱', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Poland Zloty', 'country_name' => 'Poland', 'code' => 'PLN', 'rate' => '4.08', 'symbol' => 'zł', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Qatari Rial', 'country_name' => 'Qatar', 'code' => 'QAR', 'rate' => '3.65', 'symbol' => 'ر.ق.', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Romanian Leu', 'country_name' => 'Romania', 'code' => 'RON', 'rate' => '4.71', 'symbol' => 'lei', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Russian Rouble', 'country_name' => 'Russian Federation', 'code' => 'RUB', 'rate' => '111.60', 'symbol' => '₽', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Rwanda Franc', 'country_name' => 'Rwanda', 'code' => 'RWF', 'rate' => '1360.48', 'symbol' => 'FRw', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'St. Helena Pound', 'country_name' => 'Saint Helena', 'code' => 'SHP', 'rate' => '0.79', 'symbol' => '£', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Samoa Tala', 'country_name' => 'Samoa', 'code' => 'WST', 'rate' => '2.75', 'symbol' => 'T', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Sao Tome Principe Dobra', 'country_name' => 'Sao Tome and Principe', 'code' => 'STN', 'rate' => '23.28', 'symbol' => 'Db', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Saudi Riyal', 'country_name' => 'Saudi Arabia', 'code' => 'SAR', 'rate' => '3.76', 'symbol' => 'ر.س.', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'CFA Franc', 'country_name' => 'Senegal', 'code' => 'XOF', 'rate' => '621.64', 'symbol' => 'Fr', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Serbian Dinar', 'country_name' => 'Serbia', 'code' => 'RSD', 'rate' => '110.80', 'symbol' => 'дин.', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Seychelles Rupee', 'country_name' => 'Seychelles', 'code' => 'SCR', 'rate' => '13.65', 'symbol' => '₨', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Sierra Leone Leone', 'country_name' => 'Sierra Leone', 'code' => 'SLE', 'rate' => '23.39', 'symbol' => 'Le', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Singapore Dollar', 'country_name' => 'Singapore', 'code' => 'SGD', 'rate' => '1.34', 'symbol' => '$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Solomon Is. Dollar', 'country_name' => 'Solomon Islands', 'code' => 'SBD', 'rate' => '8.29', 'symbol' => '$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Somali Shilling', 'country_name' => 'Somalia', 'code' => 'SOS', 'rate' => '24300.00', 'symbol' => 'S', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'South Africa Rand', 'country_name' => 'South Africa', 'code' => 'ZAR', 'rate' => '18.16', 'symbol' => 'R', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'South Sudanese Pound', 'country_name' => 'South Sudan', 'code' => 'SSP', 'rate' => '3613.14', 'symbol' => 'SSP', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Sri Lanka Rupee', 'country_name' => 'Sri Lanka', 'code' => 'LKR', 'rate' => '290.57', 'symbol' => 'Rs', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Sudanese Pound', 'country_name' => 'Sudan', 'code' => 'SDG', 'rate' => '1987.00', 'symbol' => 'ج.س.', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Surinamese Dollar', 'country_name' => 'Suriname', 'code' => 'SRD', 'rate' => '35.52', 'symbol' => '$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Swedish Krona', 'country_name' => 'Sweden', 'code' => 'SEK', 'rate' => '10.92', 'symbol' => 'kr', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Swiss Franc', 'country_name' => 'Switzerland', 'code' => 'CHF', 'rate' => '0.88', 'symbol' => 'CHF', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Syrian Pound', 'country_name' => 'Syrian Arab Republic', 'code' => 'SYP', 'rate' => '13600.00', 'symbol' => '£S', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Tajikistan Somoni', 'country_name' => 'Tajikistan', 'code' => 'TJS', 'rate' => '10.67', 'symbol' => 'SM', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Tanzania Shilling', 'country_name' => 'Tanzania, United Rep. of', 'code' => 'TZS', 'rate' => '2640.00', 'symbol' => 'TSh', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Thai Baht', 'country_name' => 'Thailand', 'code' => 'THB', 'rate' => '34.43', 'symbol' => '฿', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Tonga Pa\'anga', 'country_name' => 'Tonga', 'code' => 'TOP', 'rate' => '2.35', 'symbol' => 'T$', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Trinidad and Tobago Dollar', 'country_name' => 'Trinidad and Tobago', 'code' => 'TTD', 'rate' => '6.75', 'symbol' => 'TT$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Tunisian Dinar', 'country_name' => 'Tunisia', 'code' => 'TND', 'rate' => '3.15', 'symbol' => 'د.ت', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Turkish Lira', 'country_name' => 'Turkey', 'code' => 'TRY', 'rate' => '34.66', 'symbol' => '₺', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Turkmenistan Manat', 'country_name' => 'Turkmenistan', 'code' => 'TMT', 'rate' => '3.50', 'symbol' => 'm', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Uganda Shilling', 'country_name' => 'Uganda', 'code' => 'UGX', 'rate' => '3682.00', 'symbol' => 'Sh', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Ukraine Hryvnia', 'country_name' => 'Ukraine', 'code' => 'UAH', 'rate' => '41.50', 'symbol' => '₴', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'United Arab Emirates Dirham', 'country_name' => 'United Arab Emirates', 'code' => 'AED', 'rate' => '3.67', 'symbol' => 'د.إ', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'U.K. Pound', 'country_name' => 'United Kingdom', 'code' => 'GBP', 'rate' => '0.79', 'symbol' => '£', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Uruguay Peso', 'country_name' => 'Uruguay', 'code' => 'UYU', 'rate' => '42.87', 'symbol' => '$', 'position' => 'left', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Uzbekistan Sum', 'country_name' => 'Uzbekistan', 'code' => 'UZS', 'rate' => '12830.00', 'symbol' => 'сўм', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Vanuatu Vatu', 'country_name' => 'Vanuatu', 'code' => 'VUV', 'rate' => '117.74', 'symbol' => 'Vt', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Bolivar Digital', 'country_name' => 'Venezuela', 'code' => 'VES', 'rate' => '46.33', 'symbol' => 'Bs.S', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Viet Nam Dong', 'country_name' => 'Viet Nam', 'code' => 'VND', 'rate' => '25384.00', 'symbol' => '₫', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Yemeni Rial', 'country_name' => 'Yemen, Republic of', 'code' => 'YER', 'rate' => '528.74', 'symbol' => '﷼', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Zambia Kwacha', 'country_name' => 'Zambia', 'code' => 'ZMW', 'rate' => '27.32', 'symbol' => 'ZK', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL),
|
||||
array('name' => 'Zimbabwe Gold', 'country_name' => 'Zimbabwe', 'code' => 'ZWG', 'rate' => '25.33', 'symbol' => 'ZWL', 'position' => 'right', 'status' => '1', 'is_default' => '0', 'created_at' => NULL, 'updated_at' => NULL)
|
||||
);
|
||||
|
||||
Currency::insert($currencies);
|
||||
}
|
||||
}
|
||||
55
database/seeders/DatabaseSeeder.php
Normal file
55
database/seeders/DatabaseSeeder.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Seed the application's database.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$this->call([
|
||||
PlanSeeder::class,
|
||||
BusinessCategorySeeder::class,
|
||||
BusinessSeeder::class,
|
||||
PermissionSeeder::class,
|
||||
OptionTableSeeder::class,
|
||||
BlogSeeder::class,
|
||||
UserSeeder::class,
|
||||
FeatureSeeder::class,
|
||||
InterfaceSeeder::class,
|
||||
LanguageSeeder::class,
|
||||
TestimonialSeeder::class,
|
||||
CurrencySeeder::class,
|
||||
GatewaySeeder::class,
|
||||
PlanSubscribeSeeder::class,
|
||||
AdvertiseSeeder::class,
|
||||
BrandSeeder::class,
|
||||
UnitSeeder::class,
|
||||
CategorySeeder::class,
|
||||
// WarehouseSeeder::class,
|
||||
ProductSeeder::class,
|
||||
PartySeeder::class,
|
||||
// PaymentTypeSeeder::class,
|
||||
// AffiliateSeeder::class,
|
||||
VariationSeeder::class,
|
||||
StockSeeder::class,
|
||||
ComboProductSeeder::class,
|
||||
VatSeeder::class,
|
||||
IncomeCategorySeeder::class,
|
||||
IncomeSeeder::class,
|
||||
ExpenseCategorySeeder::class,
|
||||
ExpenseSeeder::class,
|
||||
SaleSeeder::class,
|
||||
SaleReturnSeeder::class,
|
||||
PurchaseSeeder::class,
|
||||
PurchaseReturnSeeder::class,
|
||||
ShelfSeeder::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
144
database/seeders/DemoSeeder.php
Normal file
144
database/seeders/DemoSeeder.php
Normal file
@@ -0,0 +1,144 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Sale;
|
||||
use App\Models\Party;
|
||||
use App\Models\Income;
|
||||
use App\Models\Expense;
|
||||
use App\Models\Purchase;
|
||||
use App\Models\SaleReturn;
|
||||
use App\Models\SaleDetails;
|
||||
use App\Models\IncomeCategory;
|
||||
use App\Models\ExpenseCategory;
|
||||
use App\Models\PurchaseDetails;
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\SaleReturnDetails;
|
||||
|
||||
class DemoSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$current_date = now();
|
||||
$expire_date = now()->addDays(30);
|
||||
|
||||
$suppliers = array(
|
||||
array('name' => 'Chase Farmer', 'business_id' => '1', 'email' => 'chase@mailinator.com', 'type' => 'Supplier', 'phone' => '01798765432', 'due' => '400.00', 'address' => 'Road 4, Mohammadpur, Dhaka', 'image' => 'uploads/25/08/1755065778-932.jpg', 'status' => '1', 'created_at' => $current_date, 'updated_at' => $current_date),
|
||||
array('name' => 'Liam Carter', 'business_id' => '1', 'email' => 'liamc@mailinator.com', 'type' => 'Supplier', 'phone' => '01911223344', 'due' => '0.00', 'address' => 'House 5, Road 3, Gulshan, Dhaka', 'image' => 'uploads/25/08/1755065828-624.jpg', 'status' => '1', 'created_at' => $current_date, 'updated_at' => $current_date),
|
||||
array('name' => 'Olivia Smith', 'business_id' => '1', 'email' => 'olivias@mailinator.com', 'type' => 'Supplier', 'phone' => '01833445566', 'due' => '120.00', 'address' => 'Road 7, Banani, Dhaka', 'image' => 'uploads/25/08/1755065837-663.jpg', 'status' => '1', 'created_at' => $current_date, 'updated_at' => $current_date),
|
||||
);
|
||||
|
||||
$customers = array(
|
||||
array('name' => 'Amber Bush', 'business_id' => '1', 'email' => 'amber@mailinator.com', 'type' => 'Retailer', 'phone' => '01711234567', 'due' => '0.00', 'address' => 'House 12, Road 5, Dhanmondi, Dhaka', 'image' => 'uploads/25/08/1755065759-870.jpg', 'status' => '1', 'created_at' => $current_date, 'updated_at' => $current_date),
|
||||
array('name' => 'Zoe Kidd', 'business_id' => '1', 'email' => 'Zoeid@mailinator.com', 'type' => 'Dealer', 'phone' => '01876543210', 'due' => '0.00', 'address' => 'Apartment 7B, Banani, Dhaka', 'image' => 'uploads/25/08/1755065746-342.jpg', 'status' => '1', 'created_at' => $current_date, 'updated_at' => $current_date),
|
||||
array('name' => 'Porter Flynn', 'business_id' => '1', 'email' => 'porter@mailinator.com', 'type' => 'Wholesaler', 'phone' => '01912345678', 'due' => '670.00', 'address' => 'House 22, Road 9, Uttara, Dhaka', 'image' => 'uploads/25/08/1755065735-399.jpg', 'status' => '1', 'created_at' => $current_date, 'updated_at' => $current_date),
|
||||
);
|
||||
|
||||
$sales = array(
|
||||
array('business_id' => '1', 'user_id' => '4', 'type' => 'sale', 'discountAmount' => '6.67', 'shipping_charge' => '0', 'discount_percent' => '0', 'discount_type' => 'flat', 'dueAmount' => '0.00', 'isPaid' => '1', 'vat_amount' => '45.00', 'vat_percent' => '0.00', 'paidAmount' => '638.33', 'change_amount' => '0', 'totalAmount' => '638.33', 'actual_total_amount' => '638.33', 'rounding_amount' => '0.00', 'rounding_option' => 'none', 'lossProfit' => '193.33', 'paymentType' => NULL, 'payment_type_id' => '1', 'invoiceNumber' => 'S01', 'saleDate' => '2025-08-13 00:00:00', 'image' => NULL, 'meta' => ['customer_phone' => null, 'note' => 'paid done'], 'created_at' => $current_date, 'updated_at' => $current_date, 'vat_id' => '1'),
|
||||
array('business_id' => '1', 'user_id' => '4', 'type' => 'sale', 'discountAmount' => '36.30', 'shipping_charge' => '0', 'discount_percent' => '5', 'discount_type' => 'percent', 'dueAmount' => '755.70', 'isPaid' => '0', 'vat_amount' => '132.00', 'vat_percent' => '0.00', 'paidAmount' => '0.00', 'change_amount' => '0', 'totalAmount' => '755.70', 'actual_total_amount' => '755.70', 'rounding_amount' => '0.00', 'rounding_option' => 'none', 'lossProfit' => '23.70', 'paymentType' => NULL, 'payment_type_id' => '5', 'invoiceNumber' => 'S02', 'saleDate' => '2025-08-13 00:00:00', 'image' => NULL, 'meta' => ['customer_phone' => null, 'note' => 'kepp due payment'], 'created_at' => $current_date, 'updated_at' => $current_date, 'vat_id' => '2'),
|
||||
array('business_id' => '1', 'user_id' => '4', 'type' => 'sale', 'discountAmount' => '21.43', 'shipping_charge' => '40', 'discount_percent' => '0', 'discount_type' => 'flat', 'dueAmount' => '849.07', 'isPaid' => '0', 'vat_amount' => '80.50', 'vat_percent' => '0.00', 'paidAmount' => '0.00', 'change_amount' => '0', 'totalAmount' => '1249.07', 'actual_total_amount' => '1249.07', 'rounding_amount' => '0.00', 'rounding_option' => 'none', 'lossProfit' => '28.57', 'paymentType' => NULL, 'payment_type_id' => '1', 'invoiceNumber' => 'S03', 'saleDate' => '2025-08-13 00:00:00', 'image' => NULL, 'meta' => ['customer_phone' => null, 'note' => null], 'created_at' => $current_date, 'updated_at' => $current_date, 'vat_id' => '1'),
|
||||
);
|
||||
|
||||
$sale_details = array(
|
||||
array('product_id' => '2', 'price' => '300.00', 'lossProfit' => '193.33', 'quantities' => '2.00', 'productPurchasePrice' => '200', 'mfg_date' => NULL, 'expire_date' => $expire_date, 'stock_id' => '2'),
|
||||
array('product_id' => '2', 'price' => '220.00', 'lossProfit' => '23.70', 'quantities' => '3.00', 'productPurchasePrice' => '200', 'mfg_date' => NULL, 'expire_date' => $expire_date, 'stock_id' => '2'),
|
||||
array('product_id' => '4', 'price' => '230.00', 'lossProfit' => '28.57', 'quantities' => '5.00', 'productPurchasePrice' => '220', 'mfg_date' => NULL, 'expire_date' => $expire_date, 'stock_id' => '4'),
|
||||
);
|
||||
|
||||
$sale_returns = array(
|
||||
array('business_id' => '1', 'invoice_no' => 'SR01', 'return_date' => '2025-08-13 12:25:00', 'created_at' => $current_date, 'updated_at' => $current_date),
|
||||
array('business_id' => '1', 'invoice_no' => 'SR02', 'return_date' => '2025-08-13 12:25:18', 'created_at' => $current_date, 'updated_at' => $current_date),
|
||||
array('business_id' => '1', 'invoice_no' => 'SR03', 'return_date' => '2025-08-13 12:25:36', 'created_at' => $current_date, 'updated_at' => $current_date)
|
||||
);
|
||||
|
||||
$sale_return_details = array(
|
||||
array('business_id' => '1', 'return_amount' => '451.43', 'return_qty' => '2.00'),
|
||||
array('business_id' => '1', 'return_amount' => '623.70', 'return_qty' => '3.00'),
|
||||
array('business_id' => '1', 'return_amount' => '296.67', 'return_qty' => '1.00')
|
||||
);
|
||||
|
||||
$purchases = array(
|
||||
array('business_id' => '1', 'user_id' => '4', 'discountAmount' => '20.73', 'shipping_charge' => '21', 'discount_percent' => '0', 'discount_type' => 'flat', 'dueAmount' => '0.00', 'paidAmount' => '710.27', 'change_amount' => '0', 'totalAmount' => '710.27', 'invoiceNumber' => 'P01', 'isPaid' => '1', 'vat_percent' => '0.00', 'vat_amount' => '110.00', 'paymentType' => NULL, 'payment_type_id' => '1', 'purchaseDate' => '2025-08-13 00:00:00', 'created_at' => $current_date, 'updated_at' => $current_date, 'vat_id' => '2'),
|
||||
array('business_id' => '1', 'user_id' => '4', 'discountAmount' => '143.00', 'shipping_charge' => '200', 'discount_percent' => '5', 'discount_type' => 'percent', 'dueAmount' => '3097.00', 'paidAmount' => '0.00', 'change_amount' => '0', 'totalAmount' => '3097.00', 'invoiceNumber' => 'P02', 'isPaid' => '0', 'vat_percent' => '0.00', 'vat_amount' => '440.00', 'paymentType' => NULL, 'payment_type_id' => '5', 'purchaseDate' => '2025-08-13 00:00:00', 'created_at' => $current_date, 'updated_at' => $current_date, 'vat_id' => '2'),
|
||||
array('business_id' => '1', 'user_id' => '4', 'discountAmount' => '20.12', 'shipping_charge' => '45', 'discount_percent' => '0', 'discount_type' => 'flat', 'dueAmount' => '314.88', 'paidAmount' => '52.88', 'change_amount' => '0', 'totalAmount' => '414.88', 'invoiceNumber' => 'P03', 'isPaid' => '0', 'vat_percent' => '0.00', 'vat_amount' => '40.00', 'paymentType' => NULL, 'payment_type_id' => '2', 'purchaseDate' => '2025-08-13 00:00:00', 'created_at' => $current_date, 'updated_at' => $current_date, 'vat_id' => '2'),
|
||||
);
|
||||
|
||||
$purchase_details = array(
|
||||
array('product_id' => '1', 'productDealerPrice' => '150.00', 'productPurchasePrice' => '100.00', 'productSalePrice' => '200.00', 'productWholeSalePrice' => '180.00', 'quantities' => '6.00', 'mfg_date' => NULL, 'profit_percent' => NULL, 'expire_date' => $expire_date, 'stock_id' => '1'),
|
||||
array('product_id' => '2', 'productDealerPrice' => '220.00', 'productPurchasePrice' => '200.00', 'productSalePrice' => '300.00', 'productWholeSalePrice' => '250.00', 'quantities' => '13.00', 'mfg_date' => NULL, 'profit_percent' => NULL, 'expire_date' => $expire_date, 'stock_id' => '2'),
|
||||
array('product_id' => '3', 'productDealerPrice' => '70.00', 'productPurchasePrice' => '50.00', 'productSalePrice' => '100.00', 'productWholeSalePrice' => '90.00', 'quantities' => '7.00', 'mfg_date' => NULL, 'profit_percent' => NULL, 'expire_date' => $expire_date, 'stock_id' => '3'),
|
||||
);
|
||||
|
||||
foreach ($sales as $key => $sale) {
|
||||
|
||||
$customer = Party::create($customers[$key]);
|
||||
$supplier = Party::create($suppliers[$key]);
|
||||
|
||||
$sale_data = Sale::create($sale + [
|
||||
'party_id' => $customer->id
|
||||
]);
|
||||
|
||||
$sale_detail = SaleDetails::create($sale_details[$key] + [
|
||||
'sale_id' => $sale_data->id
|
||||
]);
|
||||
|
||||
$sale_return_data = SaleReturn::create($sale_returns[$key] + [
|
||||
'sale_id' => $sale_data->id
|
||||
]);
|
||||
|
||||
SaleReturnDetails::create($sale_return_details[$key] + [
|
||||
'sale_return_id' => $sale_return_data->id,
|
||||
'sale_detail_id' => $sale_detail->id
|
||||
]);
|
||||
|
||||
$purchase_data = Purchase::create($purchases[$key] + [
|
||||
'party_id' => $supplier->id
|
||||
]);
|
||||
PurchaseDetails::create($purchase_details[$key] + [
|
||||
'purchase_id' => $purchase_data->id
|
||||
]);
|
||||
}
|
||||
|
||||
$expense_categories = array(
|
||||
array('categoryName' => 'Purchase', 'business_id' => '1', 'categoryDescription' => 'Expenses on purchasing goods', 'status' => '1', 'created_at' => $current_date, 'updated_at' => $current_date),
|
||||
array('categoryName' => 'Utilities', 'business_id' => '1', 'categoryDescription' => 'Electricity, water, and gas bills', 'status' => '1', 'created_at' => $current_date, 'updated_at' => $current_date),
|
||||
array('categoryName' => 'Salary', 'business_id' => '1', 'categoryDescription' => 'Employee salary payments', 'status' => '1', 'created_at' => $current_date, 'updated_at' => $current_date),
|
||||
);
|
||||
|
||||
$expenses = array(
|
||||
array('amount' => '577.00', 'user_id' => '4', 'business_id' => '1', 'expanseFor' => 'Purchase Products', 'paymentType' => NULL, 'payment_type_id' => '2', 'referenceNo' => 'PPL7842', 'note' => 'Expense for purchases product', 'expenseDate' => '2025-08-13 00:00:00', 'created_at' => $current_date, 'updated_at' => $current_date),
|
||||
array('amount' => '1500.00', 'user_id' => '4', 'business_id' => '1', 'expanseFor' => 'Electricity Bill', 'paymentType' => NULL, 'payment_type_id' => '1', 'referenceNo' => 'UTL1122', 'note' => 'Monthly electricity expense', 'expenseDate' => '2025-08-12 00:00:00', 'created_at' => $current_date, 'updated_at' => $current_date),
|
||||
array('amount' => '2500.00', 'user_id' => '4', 'business_id' => '1', 'expanseFor' => 'Staff Salary', 'paymentType' => NULL, 'payment_type_id' => '3', 'referenceNo' => 'SAL5566', 'note' => 'Salary payment for staff', 'expenseDate' => '2025-08-11 00:00:00', 'created_at' => $current_date, 'updated_at' => $current_date),
|
||||
);
|
||||
|
||||
foreach ($expense_categories as $key => $expense_category) {
|
||||
$expenses_category = ExpenseCategory::create($expense_category);
|
||||
Expense::create($expenses[$key] + [
|
||||
'expense_category_id' => $expenses_category->id
|
||||
]);
|
||||
}
|
||||
|
||||
$income_categories = array(
|
||||
array('categoryName' => 'Sales', 'business_id' => '1', 'categoryDescription' => 'Product sales income', 'status' => '1', 'created_at' => $current_date, 'updated_at' => $current_date),
|
||||
array('categoryName' => 'Service', 'business_id' => '1', 'categoryDescription' => 'Income from services', 'status' => '1', 'created_at' => $current_date, 'updated_at' => $current_date),
|
||||
array('categoryName' => 'Rental', 'business_id' => '1', 'categoryDescription' => 'Rental income', 'status' => '1', 'created_at' => $current_date, 'updated_at' => $current_date),
|
||||
);
|
||||
|
||||
$incomes = array(
|
||||
array('amount' => '4700.00', 'user_id' => '4', 'business_id' => '1', 'incomeFor' => 'Sales Product', 'paymentType' => NULL, 'payment_type_id' => '1', 'referenceNo' => 'SPT8734', 'note' => 'Income for selling products', 'incomeDate' => '2025-08-13 00:00:00', 'created_at' => $current_date, 'updated_at' => $current_date),
|
||||
array('amount' => '3500.00', 'user_id' => '4', 'business_id' => '1', 'incomeFor' => 'Website Service', 'paymentType' => NULL, 'payment_type_id' => '2', 'referenceNo' => 'SRV1920', 'note' => 'Income from web services', 'incomeDate' => '2025-08-05 00:00:00', 'created_at' => $current_date, 'updated_at' => $current_date),
|
||||
array('amount' => '5000.00', 'user_id' => '4', 'business_id' => '1', 'incomeFor' => 'Office Rent', 'paymentType' => NULL, 'payment_type_id' => '1', 'referenceNo' => 'RNT3245', 'note' => 'Monthly office rent', 'incomeDate' => '2025-08-09 00:00:00', 'created_at' => $current_date, 'updated_at' => $current_date),
|
||||
);
|
||||
|
||||
foreach ($income_categories as $key => $income_category) {
|
||||
$incomes_category = IncomeCategory::create($income_category);
|
||||
Income::create($incomes[$key] + [
|
||||
'income_category_id' => $incomes_category->id
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
22
database/seeders/ExpenseCategorySeeder.php
Normal file
22
database/seeders/ExpenseCategorySeeder.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\ExpenseCategory;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class ExpenseCategorySeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$expense_categories = array(
|
||||
array('categoryName' => 'Others', 'business_id' => '1', 'categoryDescription' => 'Expenses on purchasing goods', 'status' => '1', 'created_at' => '2025-08-13 11:51:42', 'updated_at' => '2025-08-13 11:51:42'),
|
||||
array('categoryName' => 'Utilities', 'business_id' => '1', 'categoryDescription' => 'Electricity, water, and gas bills', 'status' => '1', 'created_at' => '2025-08-10 09:15:00', 'updated_at' => '2025-08-10 09:15:00'),
|
||||
array('categoryName' => 'Salary', 'business_id' => '1', 'categoryDescription' => 'Employee salary payments', 'status' => '1', 'created_at' => '2025-08-11 10:30:00', 'updated_at' => '2025-08-11 10:30:00'),
|
||||
array('categoryName' => 'Maintenance', 'business_id' => '1', 'categoryDescription' => 'Equipment and building maintenance', 'status' => '1', 'created_at' => '2025-08-12 14:45:00', 'updated_at' => '2025-08-12 14:45:00'),
|
||||
array('categoryName' => 'Office Supplies', 'business_id' => '1', 'categoryDescription' => 'Stationery and office materials', 'status' => '1', 'created_at' => '2025-08-13 08:20:00', 'updated_at' => '2025-08-13 08:20:00')
|
||||
);
|
||||
|
||||
ExpenseCategory::insert($expense_categories);
|
||||
}
|
||||
}
|
||||
24
database/seeders/ExpenseSeeder.php
Normal file
24
database/seeders/ExpenseSeeder.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Expense;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class ExpenseSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$expenses = array(
|
||||
array('amount' => '577.00', 'expense_category_id' => '1', 'user_id' => '4', 'business_id' => '1', 'expanseFor' => 'Purchase Products', 'paymentType' => NULL, 'payment_type_id' => '2', 'referenceNo' => 'PPL7842', 'note' => 'Expense for purchases product', 'expenseDate' => now(), 'created_at' => now(), 'updated_at' => now()),
|
||||
array('amount' => '1500.00', 'expense_category_id' => '2', 'user_id' => '4', 'business_id' => '1', 'expanseFor' => 'Electricity Bill', 'paymentType' => NULL, 'payment_type_id' => '1', 'referenceNo' => 'UTL1122', 'note' => 'Monthly electricity expense', 'expenseDate' => now(), 'created_at' => now(), 'updated_at' => now()),
|
||||
array('amount' => '2500.00', 'expense_category_id' => '3', 'user_id' => '4', 'business_id' => '1', 'expanseFor' => 'Staff Salary', 'paymentType' => NULL, 'payment_type_id' => '3', 'referenceNo' => 'SAL5566', 'note' => 'Salary payment for staff', 'expenseDate' => now(), 'created_at' => now(), 'updated_at' => now()),
|
||||
array('amount' => '700.00', 'expense_category_id' => '4', 'user_id' => '4', 'business_id' => '1', 'expanseFor' => 'Air Conditioner Repair', 'paymentType' => NULL, 'payment_type_id' => '2', 'referenceNo' => 'MTN7788', 'note' => 'Maintenance expense for AC', 'expenseDate' => now(), 'created_at' => now(), 'updated_at' => now()),
|
||||
array('amount' => '300.00', 'expense_category_id' => '2', 'user_id' => '4', 'business_id' => '1', 'expanseFor' => 'Stationery Purchase', 'paymentType' => NULL, 'payment_type_id' => '1', 'referenceNo' => 'OFF2244', 'note' => 'Office supplies purchase', 'expenseDate' => now(), 'created_at' => now(), 'updated_at' => now()),
|
||||
array('amount' => '450.00', 'expense_category_id' => '1', 'user_id' => '4', 'business_id' => '1', 'expanseFor' => 'Raw Materials', 'paymentType' => NULL, 'payment_type_id' => '2', 'referenceNo' => 'PPL9900', 'note' => 'Expense for raw materials purchase', 'expenseDate' => now(), 'created_at' => now(), 'updated_at' => now()),
|
||||
array('amount' => '900.00', 'expense_category_id' => '4', 'user_id' => '4', 'business_id' => '1', 'expanseFor' => 'Plumbing Repair', 'paymentType' => NULL, 'payment_type_id' => '3', 'referenceNo' => 'MTN3344', 'note' => 'Maintenance for plumbing', 'expenseDate' => now(), 'created_at' => now(), 'updated_at' => now())
|
||||
);
|
||||
|
||||
Expense::insert($expenses);
|
||||
}
|
||||
}
|
||||
37
database/seeders/FeatureSeeder.php
Normal file
37
database/seeders/FeatureSeeder.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Feature;
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class FeatureSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$features = array(
|
||||
array('title' => 'Inventory Sales', 'bg_color' => '#D3C6F5', 'image' => 'uploads/24/04/1713261432-447.png', 'status' => '1', 'created_at' => '2024-04-16 21:57:12', 'updated_at' => '2024-04-16 21:57:12'),
|
||||
array('title' => 'Pos Sales', 'bg_color' => '#BCEBD7', 'image' => 'uploads/24/04/1713261480-659.png', 'status' => '1', 'created_at' => '2024-04-16 21:58:00', 'updated_at' => '2024-04-16 21:58:00'),
|
||||
array('title' => 'Dashboard', 'bg_color' => '#FEE8C2', 'image' => 'uploads/24/04/1713261520-929.png', 'status' => '1', 'created_at' => '2024-04-16 21:58:40', 'updated_at' => '2024-04-16 21:58:40'),
|
||||
array('title' => 'Subscription', 'bg_color' => '#BED8FF', 'image' => 'uploads/24/04/1713261611-324.png', 'status' => '1', 'created_at' => '2024-04-16 22:00:11', 'updated_at' => '2024-04-16 22:00:11'),
|
||||
array('title' => 'Multi Currency', 'bg_color' => '#FFDCF4', 'image' => 'uploads/24/04/1713261675-63.png', 'status' => '1', 'created_at' => '2024-04-16 22:01:15', 'updated_at' => '2024-04-16 22:01:15'),
|
||||
array('title' => '47+ Languages', 'bg_color' => '#C3CAFF', 'image' => 'uploads/24/04/1713261718-4.png', 'status' => '1', 'created_at' => '2024-04-16 22:01:58', 'updated_at' => '2024-04-16 22:01:58'),
|
||||
array('title' => 'Report', 'bg_color' => '#FFDDCC', 'image' => 'uploads/24/04/1713261757-428.png', 'status' => '1', 'created_at' => '2024-04-16 22:02:37', 'updated_at' => '2024-04-16 22:02:37'),
|
||||
array('title' => 'Loss/Profit', 'bg_color' => '#BCEBD7', 'image' => 'uploads/24/04/1713261799-681.png', 'status' => '1', 'created_at' => '2024-04-16 22:03:19', 'updated_at' => '2024-04-16 22:03:25'),
|
||||
array('title' => 'Stock', 'bg_color' => '#BCE9FF', 'image' => 'uploads/24/04/1713261842-604.png', 'status' => '1', 'created_at' => '2024-04-16 22:04:02', 'updated_at' => '2024-04-16 22:04:02'),
|
||||
array('title' => 'Expense', 'bg_color' => '#FBBDD3', 'image' => 'uploads/24/04/1713261880-146.png', 'status' => '1', 'created_at' => '2024-04-16 22:04:40', 'updated_at' => '2024-04-16 22:04:40'),
|
||||
array('title' => 'Income', 'bg_color' => '#F7C5FF', 'image' => 'uploads/24/04/1713261919-222.png', 'status' => '1', 'created_at' => '2024-04-16 22:05:19', 'updated_at' => '2024-04-16 22:05:19'),
|
||||
array('title' => 'Due List', 'bg_color' => '#FFD4D5', 'image' => 'uploads/24/04/1713261960-909.png', 'status' => '1', 'created_at' => '2024-04-16 22:06:00', 'updated_at' => '2024-04-16 22:06:00'),
|
||||
array('title' => 'Products', 'bg_color' => '#D3C6F5', 'image' => 'uploads/24/04/1713261996-808.png', 'status' => '1', 'created_at' => '2024-04-16 22:06:36', 'updated_at' => '2024-04-16 22:06:36'),
|
||||
array('title' => 'Purchase', 'bg_color' => '#BCEBD7', 'image' => 'uploads/24/04/1713262034-101.png', 'status' => '1', 'created_at' => '2024-04-16 22:07:14', 'updated_at' => '2024-04-16 22:07:14'),
|
||||
array('title' => 'Parties', 'bg_color' => '#FEE8C2', 'image' => 'uploads/24/04/1713262078-927.png', 'status' => '1', 'created_at' => '2024-04-16 22:07:58', 'updated_at' => '2024-04-16 22:07:58'),
|
||||
array('title' => 'Sales', 'bg_color' => '#BED8FF', 'image' => 'uploads/24/04/1713262168-328.png', 'status' => '1', 'created_at' => '2024-04-16 22:09:28', 'updated_at' => '2024-04-16 22:09:48')
|
||||
);
|
||||
|
||||
Feature::insert($features);
|
||||
}
|
||||
}
|
||||
36
database/seeders/GatewaySeeder.php
Normal file
36
database/seeders/GatewaySeeder.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Gateway;
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class GatewaySeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$gateways = array(
|
||||
array('name' => 'Stripe', 'currency_id' => '4', 'mode' => 'Sandbox', 'status' => '1', 'charge' => '2', 'image' => NULL, 'data' => '{"stripe_key":"pk_test_6rhnZv1NmRtSp5DfziBO8YFb00X65CfFwq","stripe_secret":"sk_test_YKyuAoMHjXaUADW4SuKuXeIn0079Pu1OSD"}', 'manual_data' => NULL, 'is_manual' => '0', 'accept_img' => '0', 'namespace' => 'App\\Library\\StripeGateway', 'phone_required' => '0', 'instructions' => NULL, 'created_at' => '2024-02-18 23:45:52', 'updated_at' => '2024-02-18 23:54:44'),
|
||||
array('name' => 'mollie', 'currency_id' => '4', 'mode' => 'Sandbox', 'status' => '1', 'charge' => '2', 'image' => NULL, 'data' => '{"api_key":"test_WqUGsP9qywy3eRVvWMRayxmVB5dx2r"}', 'manual_data' => NULL, 'is_manual' => '0', 'accept_img' => '0', 'namespace' => 'App\\Library\\Mollie', 'phone_required' => '0', 'instructions' => NULL, 'created_at' => '2024-02-18 23:45:52', 'updated_at' => '2024-02-18 23:54:44'),
|
||||
array('name' => 'paypal', 'currency_id' => '4', 'mode' => 'Sandbox', 'status' => '1', 'charge' => '2', 'image' => NULL, 'data' => '{"client_id":"ARKsbdD1qRpl3WEV6XCLuTUsvE1_5NnQuazG2Rvw1NkMG3owPjCeAaia0SXSvoKPYNTrh55jZieVW7xv","client_secret":"EJed2cGACzB2SJFQwSannKAA1gyBjKkwlKh1o8G75zQHYzAgLQ3n7f9EfeNCZgtfPDMxyFzfp6oQWPia"}', 'manual_data' => NULL, 'is_manual' => '0', 'accept_img' => '0', 'namespace' => 'App\\Library\\Paypal', 'phone_required' => '0', 'instructions' => NULL, 'created_at' => '2024-02-18 23:45:52', 'updated_at' => '2024-02-18 23:54:44'),
|
||||
array('name' => 'paystack', 'currency_id' => '98', 'mode' => 'Sandbox', 'status' => '1', 'charge' => '2', 'image' => NULL, 'data' => '{"public_key":"pk_test_84d91b79433a648f2cd0cb69287527f1cb81b53d","secret_key":"sk_test_cf3a234b923f32194fb5163c9d0ab706b864cc3e"}', 'manual_data' => NULL, 'is_manual' => '0', 'accept_img' => '0', 'namespace' => 'App\\Library\\Paystack', 'phone_required' => '0', 'instructions' => NULL, 'created_at' => '2024-02-18 23:45:52', 'updated_at' => '2024-02-18 23:54:44'),
|
||||
array('name' => 'razorpay', 'currency_id' => '60', 'mode' => 'Sandbox', 'status' => '1', 'charge' => '2', 'image' => NULL, 'data' => '{"key_id":"rzp_test_siWkeZjPLsYGSi","key_secret":"jmIzYyrRVMLkC9BwqCJ0wbmt"}', 'manual_data' => NULL, 'is_manual' => '0', 'accept_img' => '0', 'namespace' => 'App\\Library\\Razorpay', 'phone_required' => '0', 'instructions' => NULL, 'created_at' => '2024-02-18 23:45:52', 'updated_at' => '2024-02-18 23:54:44'),
|
||||
array('name' => 'instamojo', 'currency_id' => '60', 'mode' => 'Sandbox', 'status' => '1', 'charge' => '2', 'image' => NULL, 'data' => '{"x_api_key":"test_0027bc9da0a955f6d33a33d4a5d","x_auth_token":"test_211beaba149075c9268a47f26c6"}', 'manual_data' => NULL, 'is_manual' => '0', 'accept_img' => '0', 'namespace' => 'App\\Library\\Instamojo', 'phone_required' => '1', 'instructions' => NULL, 'created_at' => '2024-02-18 23:45:52', 'updated_at' => '2024-02-18 23:54:44'),
|
||||
array('name' => 'toyyibpay', 'currency_id' => '82', 'mode' => 'Sandbox', 'status' => '1', 'charge' => '2', 'image' => NULL, 'data' => '{"user_secret_key":"v4nm8x50-bfb4-7f8y-evrs-85flcysx5b9p","cateogry_code":"5cc45t69"}', 'manual_data' => NULL, 'is_manual' => '0', 'accept_img' => '0', 'namespace' => 'App\\Library\\Toyyibpay', 'phone_required' => '1', 'instructions' => NULL, 'created_at' => '2024-02-18 23:45:52', 'updated_at' => '2024-02-18 23:54:44'),
|
||||
array('name' => 'flutterwave', 'currency_id' => '98', 'mode' => 'Sandbox', 'status' => '1', 'charge' => '2', 'image' => NULL, 'data' => '{"public_key":"FLWPUBK_TEST-f448f625c416f69a7c08fc6028ebebbf-X","secret_key":"FLWSECK_TEST-561fa94f45fc758339b1e54b393f3178-X","encryption_key":"FLWSECK_TEST498417c2cc01","payment_options":"card"}', 'manual_data' => NULL, 'is_manual' => '0', 'accept_img' => '0', 'namespace' => 'App\\Library\\Flutterwave', 'phone_required' => '0', 'instructions' => NULL, 'created_at' => '2024-02-18 23:45:52', 'updated_at' => '2024-02-18 23:54:44'),
|
||||
array('name' => 'thawani', 'currency_id' => '101', 'mode' => 'Sandbox', 'status' => '1', 'charge' => '2', 'image' => NULL, 'data' => '{"secret_key":"rRQ26GcsZzoEhbrP2HZvLYDbn9C9et","publishable_key":"HGvTMLDssJghr9tlN9gr4DVYt0qyBy"}', 'manual_data' => NULL, 'is_manual' => '0', 'accept_img' => '0', 'namespace' => 'App\\Library\\Thawani', 'phone_required' => '1', 'instructions' => NULL, 'created_at' => '2024-02-18 23:45:52', 'updated_at' => '2024-02-18 23:54:44'),
|
||||
array('name' => 'mercadopago', 'currency_id' => '4', 'mode' => 'Sandbox', 'status' => '1', 'charge' => '2', 'image' => NULL, 'data' => '{"secret_key":"TEST-1884511374835248-071019-698f8465954d5983722e8b4d7a05f1ca-370993848","public_key":"TEST-7d239fd1-3c41-4dc0-96eb-f759b7d2adab"}', 'manual_data' => NULL, 'is_manual' => '0', 'accept_img' => '0', 'namespace' => 'App\\Library\\Mercado', 'phone_required' => '0', 'instructions' => NULL, 'created_at' => '2024-02-18 23:45:52', 'updated_at' => '2024-02-18 23:54:44'),
|
||||
array('name' => 'phonepe', 'currency_id' => '60', 'mode' => 'Sandbox', 'status' => '1', 'charge' => '2', 'image' => NULL, 'data' => '{"key_id":"rzp_test_siWkeZjPLsYGSi","key_secret":"jmIzYyrRVMLkC9BwqCJ0wbmt"}', 'manual_data' => NULL, 'is_manual' => '0', 'accept_img' => '0', 'namespace' => 'App\\Library\\PhonePe', 'phone_required' => '0', 'instructions' => NULL, 'created_at' => '2024-02-18 23:45:52', 'updated_at' => '2024-02-18 23:54:44'),
|
||||
array('name' => 'paytm', 'currency_id' => '60', 'mode' => 'Sandbox', 'status' => '1', 'charge' => '2', 'image' => NULL, 'data' => '{"merchant_id":"MhjqFc42556626519745","merchant_key":"0dC_Dq!nif6e1Kie","channel":"WEB","industry_type":"Retail","website":"WEBSTAGING"}', 'manual_data' => NULL, 'is_manual' => '0', 'accept_img' => '0', 'namespace' => 'App\\Library\\Paytm', 'phone_required' => '0', 'instructions' => NULL, 'created_at' => '2024-02-18 23:45:52', 'updated_at' => '2024-02-18 23:54:44'),
|
||||
array('name' => 'Tap Payment', 'currency_id' => '116', 'mode' => 'Sandbox', 'status' => '1', 'charge' => '2', 'image' => NULL, 'data' => '{"secret_key":"sk_test_KbfoWyw7tzhDHQSF62ICavZx","currency":"SAR"}', 'manual_data' => NULL, 'is_manual' => '0', 'accept_img' => '0', 'namespace' => 'App\\Library\\TapPayment', 'phone_required' => '0', 'instructions' => NULL, 'created_at' => '2024-02-18 23:45:52', 'updated_at' => '2024-02-18 23:54:44'),
|
||||
array('name' => 'Sslcommerz', 'currency_id' => '14', 'mode' => 'Sandbox', 'status' => '1', 'charge' => '1', 'image' => NULL, 'data' => '{"store_id":"maant62a8633caf4a3","store_password":"maant62a8633caf4a3@ssl"}', 'manual_data' => NULL, 'is_manual' => '0', 'accept_img' => '0', 'namespace' => 'App\\Library\\SslCommerz', 'phone_required' => '0', 'instructions' => NULL, 'created_at' => '2024-02-18 23:45:52', 'updated_at' => '2024-02-18 23:45:52'),
|
||||
array('name' => 'Manual', 'currency_id' => '4', 'mode' => 'Live', 'status' => '1', 'charge' => '0', 'image' => NULL, 'data' => '', 'manual_data' => '{"label":["Bank Name","Transaction ID"],"is_required":["1","1"]}', 'is_manual' => '1', 'accept_img' => '1', 'namespace' => 'App\\Library\\StripeGateway', 'phone_required' => '0', 'instructions' => NULL, 'created_at' => '2024-02-18 23:45:52', 'updated_at' => '2024-02-19 00:24:39')
|
||||
);
|
||||
|
||||
Gateway::insert($gateways);
|
||||
}
|
||||
}
|
||||
24
database/seeders/IncomeCategorySeeder.php
Normal file
24
database/seeders/IncomeCategorySeeder.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\IncomeCategory;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class IncomeCategorySeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$income_categories = array(
|
||||
array('categoryName' => 'Sales', 'business_id' => '1', 'categoryDescription' => 'Product sales income', 'status' => '1', 'created_at' => '2025-08-01 10:00:00', 'updated_at' => '2025-08-10 12:00:00'),
|
||||
array('categoryName' => 'Service', 'business_id' => '1', 'categoryDescription' => 'Income from services', 'status' => '1', 'created_at' => '2025-08-02 11:15:00', 'updated_at' => '2025-08-11 13:20:00'),
|
||||
array('categoryName' => 'Rental', 'business_id' => '1', 'categoryDescription' => 'Rental income', 'status' => '1', 'created_at' => '2025-08-03 09:30:00', 'updated_at' => '2025-08-12 14:10:00'),
|
||||
array('categoryName' => 'Commission', 'business_id' => '1', 'categoryDescription' => 'Commission earned', 'status' => '1', 'created_at' => '2025-08-04 08:45:00', 'updated_at' => '2025-08-13 15:05:00'),
|
||||
array('categoryName' => 'Interest', 'business_id' => '1', 'categoryDescription' => 'Interest income', 'status' => '1', 'created_at' => '2025-08-05 10:20:00', 'updated_at' => '2025-08-14 16:25:00'),
|
||||
array('categoryName' => 'Refund', 'business_id' => '1', 'categoryDescription' => 'Refund from suppliers', 'status' => '1', 'created_at' => '2025-08-06 11:55:00', 'updated_at' => '2025-08-15 17:40:00'),
|
||||
array('categoryName' => 'Other', 'business_id' => '1', 'categoryDescription' => 'Other miscellaneous income', 'status' => '1', 'created_at' => '2025-08-07 12:10:00', 'updated_at' => '2025-08-16 18:00:00')
|
||||
);
|
||||
|
||||
IncomeCategory::insert($income_categories);
|
||||
}
|
||||
}
|
||||
24
database/seeders/IncomeSeeder.php
Normal file
24
database/seeders/IncomeSeeder.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Income;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class IncomeSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$incomes = array(
|
||||
array('amount' => '4700.00', 'income_category_id' => '1', 'user_id' => '4', 'business_id' => '1', 'incomeFor' => 'Sales Product', 'paymentType' => NULL, 'payment_type_id' => '1', 'referenceNo' => 'SPT8734', 'note' => 'Income for selling products', 'incomeDate' => now(), 'created_at' => now(), 'updated_at' => now()),
|
||||
array('amount' => '3500.00', 'income_category_id' => '2', 'user_id' => '4', 'business_id' => '1', 'incomeFor' => 'Website Service', 'paymentType' => NULL, 'payment_type_id' => '2', 'referenceNo' => 'SRV1920', 'note' => 'Income from web services', 'incomeDate' => now(), 'created_at' => now(), 'updated_at' => now()),
|
||||
array('amount' => '5000.00', 'income_category_id' => '3', 'user_id' => '4', 'business_id' => '1', 'incomeFor' => 'Office Rent', 'paymentType' => NULL, 'payment_type_id' => '1', 'referenceNo' => 'RNT3245', 'note' => 'Monthly office rent', 'incomeDate' => now(), 'created_at' => now(), 'updated_at' => now()),
|
||||
array('amount' => '1500.00', 'income_category_id' => '4', 'user_id' => '4', 'business_id' => '1', 'incomeFor' => 'Affiliate Commission', 'paymentType' => NULL, 'payment_type_id' => '3', 'referenceNo' => 'COM7788', 'note' => 'Commission for referrals', 'incomeDate' => now(), 'created_at' => now(), 'updated_at' => now()),
|
||||
array('amount' => '2100.00', 'income_category_id' => '5', 'user_id' => '4', 'business_id' => '1', 'incomeFor' => 'Bank Interest', 'paymentType' => NULL, 'payment_type_id' => '1', 'referenceNo' => 'INT5566', 'note' => 'Interest from bank deposit', 'incomeDate' => now(), 'created_at' => now(), 'updated_at' => now()),
|
||||
array('amount' => '1200.00', 'income_category_id' => '6', 'user_id' => '4', 'business_id' => '1', 'incomeFor' => 'Supplier Refund', 'paymentType' => NULL, 'payment_type_id' => '2', 'referenceNo' => 'RFD4411', 'note' => 'Refund from supplier', 'incomeDate' => now(), 'created_at' => now(), 'updated_at' => now()),
|
||||
array('amount' => '2300.00', 'income_category_id' => '7', 'user_id' => '4', 'business_id' => '1', 'incomeFor' => 'Miscellaneous Income', 'paymentType' => NULL, 'payment_type_id' => '1', 'referenceNo' => 'OTH3322', 'note' => 'Other miscellaneous income', 'incomeDate' => now(), 'created_at' => now(), 'updated_at' => now())
|
||||
);
|
||||
|
||||
Income::insert($incomes);
|
||||
}
|
||||
}
|
||||
25
database/seeders/InterfaceSeeder.php
Normal file
25
database/seeders/InterfaceSeeder.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\PosAppInterface;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class InterfaceSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$pos_app_interfaces = array(
|
||||
array('image' => 'uploads/24/06/1717395096-735.png', 'status' => '1', 'created_at' => '2024-04-16 22:18:51', 'updated_at' => '2024-06-03 18:11:36'),
|
||||
array('image' => 'uploads/24/06/1717395110-964.png', 'status' => '1', 'created_at' => '2024-04-16 22:19:43', 'updated_at' => '2024-06-03 18:11:50'),
|
||||
array('image' => 'uploads/24/06/1717395121-241.png', 'status' => '1', 'created_at' => '2024-04-18 20:56:07', 'updated_at' => '2024-06-03 18:12:01'),
|
||||
array('image' => 'uploads/24/06/1717395131-322.png', 'status' => '1', 'created_at' => '2024-04-18 20:56:17', 'updated_at' => '2024-06-03 18:12:11'),
|
||||
array('image' => 'uploads/24/06/1717396714-782.png', 'status' => '1', 'created_at' => '2024-06-03 18:38:34', 'updated_at' => '2024-06-03 18:38:34'),
|
||||
array('image' => 'uploads/24/06/1717396725-163.png', 'status' => '1', 'created_at' => '2024-06-03 18:38:45', 'updated_at' => '2024-06-03 18:38:45'),
|
||||
array('image' => 'uploads/24/06/1717396734-535.png', 'status' => '1', 'created_at' => '2024-06-03 18:38:54', 'updated_at' => '2024-06-03 18:38:54'),
|
||||
array('image' => 'uploads/24/06/1717396745-346.png', 'status' => '1', 'created_at' => '2024-06-03 18:39:05', 'updated_at' => '2024-06-03 18:39:05')
|
||||
);
|
||||
|
||||
PosAppInterface::insert($pos_app_interfaces);
|
||||
}
|
||||
}
|
||||
69
database/seeders/LanguageSeeder.php
Normal file
69
database/seeders/LanguageSeeder.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Language;
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class LanguageSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$languages = array(
|
||||
array('name' => 'Comming Soon','icon' => 'uploads/24/04/1713263132-74.png','status' => '1','created_at' => '2024-04-16 16:25:32','updated_at' => '2024-04-16 16:25:32'),
|
||||
array('name' => 'Portuguese (BR)','icon' => 'uploads/24/04/1713263352-609.png','status' => '1','created_at' => '2024-04-16 16:29:12','updated_at' => '2024-04-16 16:29:12'),
|
||||
array('name' => 'Chinese (TW)','icon' => 'uploads/24/04/1713263390-316.png','status' => '1','created_at' => '2024-04-16 16:29:50','updated_at' => '2024-04-16 16:29:50'),
|
||||
array('name' => 'Chinese (CN)','icon' => 'uploads/24/04/1713263431-511.png','status' => '1','created_at' => '2024-04-16 16:30:31','updated_at' => '2024-04-16 16:30:31'),
|
||||
array('name' => 'Azerbaijani','icon' => 'uploads/24/04/1713263469-306.png','status' => '1','created_at' => '2024-04-16 16:31:09','updated_at' => '2024-04-16 16:31:09'),
|
||||
array('name' => 'Kazakhastan','icon' => 'uploads/24/04/1713263502-600.png','status' => '1','created_at' => '2024-04-16 16:31:42','updated_at' => '2024-04-16 16:31:42'),
|
||||
array('name' => 'Tigrinya','icon' => 'uploads/24/04/1713263543-203.png','status' => '1','created_at' => '2024-04-16 16:32:23','updated_at' => '2024-04-16 16:32:23'),
|
||||
array('name' => 'Burmuse','icon' => 'uploads/24/04/1713263573-197.png','status' => '1','created_at' => '2024-04-16 16:32:53','updated_at' => '2024-04-16 16:32:53'),
|
||||
array('name' => 'Swahili','icon' => 'uploads/24/04/1713263661-746.png','status' => '1','created_at' => '2024-04-16 16:33:31','updated_at' => '2024-04-16 16:34:21'),
|
||||
array('name' => 'Slovak','icon' => 'uploads/24/04/1713263705-676.png','status' => '1','created_at' => '2024-04-16 16:35:05','updated_at' => '2024-04-16 16:35:05'),
|
||||
array('name' => 'Albanian','icon' => 'uploads/24/04/1713263748-483.png','status' => '1','created_at' => '2024-04-16 16:35:48','updated_at' => '2024-04-16 16:35:48'),
|
||||
array('name' => 'Urdu','icon' => 'uploads/24/04/1713263785-829.png','status' => '1','created_at' => '2024-04-16 16:36:25','updated_at' => '2024-04-16 16:36:25'),
|
||||
array('name' => 'Danish','icon' => 'uploads/24/04/1713263817-546.png','status' => '1','created_at' => '2024-04-16 16:36:57','updated_at' => '2024-04-16 16:36:57'),
|
||||
array('name' => 'Swedish','icon' => 'uploads/24/04/1713263851-61.png','status' => '1','created_at' => '2024-04-16 16:37:31','updated_at' => '2024-04-16 16:37:31'),
|
||||
array('name' => 'Marathi','icon' => 'uploads/24/04/1713263883-87.png','status' => '1','created_at' => '2024-04-16 16:38:03','updated_at' => '2024-04-16 16:38:03'),
|
||||
array('name' => 'Kannada','icon' => 'uploads/24/04/1713263922-810.png','status' => '1','created_at' => '2024-04-16 16:38:42','updated_at' => '2024-04-16 16:38:42'),
|
||||
array('name' => 'Czech','icon' => 'uploads/24/04/1713263954-737.png','status' => '1','created_at' => '2024-04-16 16:39:14','updated_at' => '2024-04-16 16:39:14'),
|
||||
array('name' => 'Русский','icon' => 'uploads/24/04/1713263985-750.png','status' => '1','created_at' => '2024-04-16 16:39:45','updated_at' => '2024-04-16 16:39:45'),
|
||||
array('name' => 'Lao','icon' => 'uploads/24/04/1713264024-299.png','status' => '1','created_at' => '2024-04-16 16:40:24','updated_at' => '2024-04-16 16:40:24'),
|
||||
array('name' => 'Ukrainian','icon' => 'uploads/24/04/1713264051-664.png','status' => '1','created_at' => '2024-04-16 16:40:51','updated_at' => '2024-04-16 16:40:51'),
|
||||
array('name' => 'Khmer','icon' => 'uploads/24/04/1713264076-901.png','status' => '1','created_at' => '2024-04-16 16:41:16','updated_at' => '2024-04-16 16:41:16'),
|
||||
array('name' => 'Serbian','icon' => 'uploads/24/04/1713264104-342.png','status' => '1','created_at' => '2024-04-16 16:41:44','updated_at' => '2024-04-16 16:41:44'),
|
||||
array('name' => 'Turkish','icon' => 'uploads/24/04/1713264131-167.png','status' => '1','created_at' => '2024-04-16 16:42:11','updated_at' => '2024-04-16 16:42:11'),
|
||||
array('name' => 'Persian','icon' => 'uploads/24/04/1713264160-560.png','status' => '1','created_at' => '2024-04-16 16:42:40','updated_at' => '2024-04-16 16:42:40'),
|
||||
array('name' => 'Indonesian','icon' => 'uploads/24/04/1713264189-370.png','status' => '1','created_at' => '2024-04-16 16:43:09','updated_at' => '2024-04-16 16:43:09'),
|
||||
array('name' => 'Malay','icon' => 'uploads/24/04/1713264218-608.png','status' => '1','created_at' => '2024-04-16 16:43:38','updated_at' => '2024-04-16 16:43:38'),
|
||||
array('name' => 'Korean','icon' => 'uploads/24/04/1713264250-943.png','status' => '1','created_at' => '2024-04-16 16:44:10','updated_at' => '2024-04-16 16:44:10'),
|
||||
array('name' => 'Greek','icon' => 'uploads/24/04/1713264276-755.png','status' => '1','created_at' => '2024-04-16 16:44:37','updated_at' => '2024-04-16 16:44:37'),
|
||||
array('name' => 'Finland','icon' => 'uploads/24/04/1713264306-829.png','status' => '1','created_at' => '2024-04-16 16:45:06','updated_at' => '2024-04-16 16:45:06'),
|
||||
array('name' => 'Hungarian','icon' => 'uploads/24/04/1713264331-326.png','status' => '1','created_at' => '2024-04-16 16:45:31','updated_at' => '2024-04-16 16:45:31'),
|
||||
array('name' => 'Polish','icon' => 'uploads/24/04/1713264358-886.png','status' => '1','created_at' => '2024-04-16 16:45:58','updated_at' => '2024-04-16 16:45:58'),
|
||||
array('name' => 'Bengali','icon' => 'uploads/24/04/1713264388-157.png','status' => '1','created_at' => '2024-04-16 16:46:28','updated_at' => '2024-04-16 16:46:28'),
|
||||
array('name' => 'Portuguese','icon' => 'uploads/24/04/1713264423-206.png','status' => '1','created_at' => '2024-04-16 16:47:03','updated_at' => '2024-04-16 16:47:03'),
|
||||
array('name' => 'Hebrew','icon' => 'uploads/24/04/1713264450-677.png','status' => '1','created_at' => '2024-04-16 16:47:30','updated_at' => '2024-04-16 16:47:30'),
|
||||
array('name' => 'Dutch','icon' => 'uploads/24/04/1713264476-832.png','status' => '1','created_at' => '2024-04-16 16:47:56','updated_at' => '2024-04-16 16:47:56'),
|
||||
array('name' => 'Bosnian','icon' => 'uploads/24/04/1713264505-83.png','status' => '1','created_at' => '2024-04-16 16:48:25','updated_at' => '2024-04-16 16:48:25'),
|
||||
array('name' => 'Thai','icon' => 'uploads/24/04/1713264534-163.png','status' => '1','created_at' => '2024-04-16 16:48:54','updated_at' => '2024-04-16 16:48:54'),
|
||||
array('name' => 'Italian','icon' => 'uploads/24/04/1713264559-834.png','status' => '1','created_at' => '2024-04-16 16:49:19','updated_at' => '2024-04-16 16:49:19'),
|
||||
array('name' => 'Vietnamese','icon' => 'uploads/24/04/1713264586-161.png','status' => '1','created_at' => '2024-04-16 16:49:46','updated_at' => '2024-04-16 16:49:46'),
|
||||
array('name' => 'German','icon' => 'uploads/24/04/1713264610-223.png','status' => '1','created_at' => '2024-04-16 16:50:10','updated_at' => '2024-04-16 16:50:10'),
|
||||
array('name' => 'Romanian','icon' => 'uploads/24/04/1713264637-599.png','status' => '1','created_at' => '2024-04-16 16:50:37','updated_at' => '2024-04-16 16:50:37'),
|
||||
array('name' => 'Arabic','icon' => 'uploads/24/04/1713264667-831.png','status' => '1','created_at' => '2024-04-16 16:51:07','updated_at' => '2024-04-16 16:51:07'),
|
||||
array('name' => 'Japanese','icon' => 'uploads/24/04/1713264693-992.png','status' => '1','created_at' => '2024-04-16 16:51:33','updated_at' => '2024-04-16 16:51:33'),
|
||||
array('name' => 'Spanish','icon' => 'uploads/24/04/1713264720-829.png','status' => '1','created_at' => '2024-04-16 16:52:00','updated_at' => '2024-04-16 16:52:00'),
|
||||
array('name' => 'French','icon' => 'uploads/24/04/1713264745-349.png','status' => '1','created_at' => '2024-04-16 16:52:25','updated_at' => '2024-04-16 16:52:25'),
|
||||
array('name' => 'Hindi','icon' => 'uploads/24/04/1713264770-181.png','status' => '1','created_at' => '2024-04-16 16:52:50','updated_at' => '2024-04-16 16:52:50'),
|
||||
array('name' => 'Chinese','icon' => 'uploads/24/04/1713264810-300.png','status' => '1','created_at' => '2024-04-16 16:53:30','updated_at' => '2024-04-16 16:53:30'),
|
||||
array('name' => 'English','icon' => 'uploads/24/04/1713264836-549.png','status' => '1','created_at' => '2024-04-16 16:53:56','updated_at' => '2024-04-16 16:53:56')
|
||||
);
|
||||
|
||||
Language::insert($languages);
|
||||
}
|
||||
}
|
||||
38
database/seeders/OptionTableSeeder.php
Normal file
38
database/seeders/OptionTableSeeder.php
Normal file
File diff suppressed because one or more lines are too long
32
database/seeders/PartySeeder.php
Normal file
32
database/seeders/PartySeeder.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Party;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class PartySeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$parties = array(
|
||||
array('name' => 'Amber Bush', 'business_id' => '1', 'email' => 'amber@mailinator.com', 'type' => 'Retailer', 'phone' => '01711234567', 'due' => '0.00', 'address' => 'House 12, Road 5, Dhanmondi, Dhaka', 'image' => 'uploads/25/08/1755065759-870.jpg', 'status' => '1', 'created_at' => '2024-11-05 10:52:09', 'updated_at' => '2025-08-13 12:15:59'),
|
||||
array('name' => 'Zoe Kidd', 'business_id' => '1', 'email' => 'Zoeid@mailinator.com', 'type' => 'Dealer', 'phone' => '01876543210', 'due' => '0.00', 'address' => 'Apartment 7B, Banani, Dhaka', 'image' => 'uploads/25/08/1755065746-342.jpg', 'status' => '1', 'created_at' => '2024-11-05 10:52:37', 'updated_at' => '2025-08-13 12:15:46'),
|
||||
array('name' => 'Porter Flynn', 'business_id' => '1', 'email' => 'porter@mailinator.com', 'type' => 'Wholesaler', 'phone' => '01912345678', 'due' => '670.00', 'address' => 'House 22, Road 9, Uttara, Dhaka', 'image' => 'uploads/25/08/1755065735-399.jpg', 'status' => '1', 'created_at' => '2024-11-05 10:52:51', 'updated_at' => '2025-08-13 12:15:35'),
|
||||
array('name' => 'Chase Farmer', 'business_id' => '1', 'email' => 'chase@mailinator.com', 'type' => 'Supplier', 'phone' => '01798765432', 'due' => '400.00', 'address' => 'Road 4, Mohammadpur, Dhaka', 'image' => 'uploads/25/08/1755065778-932.jpg', 'status' => '1', 'created_at' => '2024-11-05 10:53:13', 'updated_at' => '2025-08-13 12:16:57'),
|
||||
array('name' => 'Emery Mueller', 'business_id' => '1', 'email' => 'robys@mailinator.com', 'type' => 'Retailer', 'phone' => '01622334455', 'due' => '600.00', 'address' => 'House 18, Road 11, Mirpur, Dhaka', 'image' => 'uploads/25/08/1755065611-484.png', 'status' => '1', 'created_at' => '2025-08-13 12:05:11', 'updated_at' => '2025-08-13 12:13:32'),
|
||||
array('name' => 'Liam Carter', 'business_id' => '1', 'email' => 'liamc@mailinator.com', 'type' => 'Supplier', 'phone' => '01911223344', 'due' => '0.00', 'address' => 'House 5, Road 3, Gulshan, Dhaka', 'image' => 'uploads/25/08/1755065828-624.jpg', 'status' => '1', 'created_at' => '2025-08-10 09:30:00', 'updated_at' => '2025-08-13 12:17:08'),
|
||||
array('name' => 'Olivia Smith', 'business_id' => '1', 'email' => 'olivias@mailinator.com', 'type' => 'Supplier', 'phone' => '01833445566', 'due' => '120.00', 'address' => 'Road 7, Banani, Dhaka', 'image' => 'uploads/25/08/1755065837-663.jpg', 'status' => '1', 'created_at' => '2025-08-09 11:15:00', 'updated_at' => '2025-08-13 12:17:17'),
|
||||
array('name' => 'Noah Johnson', 'business_id' => '1', 'email' => 'noahj@mailinator.com', 'type' => 'Supplier', 'phone' => '01755667788', 'due' => '0.00', 'address' => 'House 10, Road 12, Dhanmondi, Dhaka', 'image' => 'uploads/25/08/1755065889-253.png', 'status' => '1', 'created_at' => '2025-08-08 10:50:00', 'updated_at' => '2025-08-13 12:18:09'),
|
||||
array('name' => 'Emma Brown', 'business_id' => '1', 'email' => 'emmab@mailinator.com', 'type' => 'Supplier', 'phone' => '01666778899', 'due' => '350.00', 'address' => 'Apartment 2A, Gulshan, Dhaka', 'image' => 'uploads/25/08/1755065802-431.png', 'status' => '1', 'created_at' => '2025-08-07 12:05:00', 'updated_at' => '2025-08-13 12:16:42'),
|
||||
array('name' => 'Mariya Davis', 'business_id' => '1', 'email' => 'mariya@mailinator.com', 'type' => 'Supplier', 'phone' => '01999887766', 'due' => '0.00', 'address' => 'House 3, Road 6, Uttara, Dhaka', 'image' => 'uploads/25/08/1755065867-823.png', 'status' => '1', 'created_at' => '2025-08-06 14:20:00', 'updated_at' => '2025-08-13 12:17:47'),
|
||||
array('name' => 'Sophia Wilson', 'business_id' => '1', 'email' => 'sophiaw@mailinator.com', 'type' => 'Retailer', 'phone' => '01888997766', 'due' => '0.00', 'address' => 'House 8, Road 9, Banani, Dhaka', 'image' => 'uploads/25/08/1755065621-290.png', 'status' => '1', 'created_at' => '2025-08-05 13:10:00', 'updated_at' => '2025-08-13 12:13:41'),
|
||||
array('name' => 'Jasmin Lee', 'business_id' => '1', 'email' => 'jasmin@mailinator.com', 'type' => 'Dealer', 'phone' => '01733445522', 'due' => '500.00', 'address' => 'Apartment 11B, Mirpur, Dhaka', 'image' => 'uploads/25/08/1755065649-950.png', 'status' => '1', 'created_at' => '2025-08-04 15:00:00', 'updated_at' => '2025-08-13 12:14:09'),
|
||||
array('name' => 'Ava Martinez', 'business_id' => '1', 'email' => 'avam@mailinator.com', 'type' => 'Wholesaler', 'phone' => '01644556677', 'due' => '0.00', 'address' => 'House 6, Road 4, Gulshan, Dhaka', 'image' => 'uploads/25/08/1755065659-826.png', 'status' => '1', 'created_at' => '2025-08-03 16:30:00', 'updated_at' => '2025-08-13 12:14:19'),
|
||||
array('name' => 'William Garcia', 'business_id' => '1', 'email' => 'williamg@mailinator.com', 'type' => 'Retailer', 'phone' => '01922334455', 'due' => '1000.00', 'address' => 'House 14, Road 2, Dhanmondi, Dhaka', 'image' => 'uploads/25/08/1755065667-145.png', 'status' => '1', 'created_at' => '2025-08-02 11:45:00', 'updated_at' => '2025-08-13 12:14:27'),
|
||||
array('name' => 'Isabella Martinez', 'business_id' => '1', 'email' => 'isabellam@mailinator.com', 'type' => 'Dealer', 'phone' => '01877665544', 'due' => '0.00', 'address' => 'Apartment 5C, Banani, Dhaka', 'image' => 'uploads/25/08/1755065724-633.png', 'status' => '1', 'created_at' => '2025-08-01 10:10:00', 'updated_at' => '2025-08-13 12:15:24')
|
||||
);
|
||||
|
||||
Party::insert($parties);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user