migrate to gtea from bistbucket

This commit is contained in:
2026-03-15 17:08:23 +07:00
commit 129ca2260c
3716 changed files with 566316 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
<?php
namespace Modules\Frontend\Database\Seeders;
use Illuminate\Database\Seeder;
use Modules\Frontend\Models\Coupon;
class CouponSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
// Percentage coupon
Coupon::create([
'restaurant_id' => 1,
'name' => '10% OFF',
'discount_type' => 'percentage',
'coupon_type' => 'restaurant',
'amount' => 10, // 10%
'valid_from' => now(),
'valid_to' => now()->addMonth(),
'usage_limit' => 100,
'max_uses_per_customer' => 1,
'min_order_amount' => 500,
'status' => 1,
'source' => 'local',
]);
// Fixed coupon
Coupon::create([
'restaurant_id' => 1,
'name' => '50 BDT OFF',
'discount_type' => 'fixed',
'coupon_type' => 'restaurant',
'amount' => 50, // Fixed amount
'valid_from' => now(),
'valid_to' => now()->addMonth(),
'usage_limit' => 100,
'max_uses_per_customer' => 1,
'min_order_amount' => 200,
'status' => 1,
'source' => 'local',
]);
// Both type coupon
Coupon::create([
'restaurant_id' => 1,
'name' => 'Special Both Coupon',
'discount_type' => 'fixed',
'coupon_type' => 'both', // usable for restaurant & hotel
'amount' => 100, // Fixed amount
'valid_from' => now(),
'valid_to' => now()->addMonth(),
'usage_limit' => 50,
'max_uses_per_customer' => 1,
'min_order_amount' => 500,
'status' => 1,
'source' => 'local',
]);
}
}