Compare commits

...

3 Commits

Author SHA1 Message Date
kelly
b9435f90a2 fix: Remove duplicate getAvailableQuantityAttribute method in Product model 2025-11-25 00:24:57 -07:00
kelly
2767f26810 docs: Add comprehensive README for database seeders 2025-11-25 00:24:57 -07:00
kelly
c0bfa59864 feat: Add PHP database seeders for production data sync
- Generated 21 table seeders using orangehill/iseed package
- Total 1.8MB of PHP seeder files with actual database data
- Created ProductionDataSeeder master seeder to orchestrate all seeders
- Handles foreign key constraints and PostgreSQL sequences
- Seeded tables: users, businesses, brands, products, batches, orders,
  invoices, roles, permissions, components, categories, strains, labs, etc.

Usage on remote:
  php artisan migrate:fresh
  php artisan db:seed --class=ProductionDataSeeder
2025-11-25 00:24:57 -07:00
26 changed files with 35873 additions and 13 deletions

View File

@@ -453,15 +453,4 @@ class Product extends Model implements Auditable
->exists();
}
/**
* Get total available quantity from all active, non-quarantined batches.
* Bridges old views with new batch-based inventory system.
*/
public function getAvailableQuantityAttribute(): int
{
return $this->batches()
->where('is_active', true)
->where('is_quarantined', false)
->sum('quantity_available');
}
}

View File

@@ -36,6 +36,7 @@
"laravel/sail": "^1.41",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.6",
"orangehill/iseed": "^3.1",
"pestphp/pest": "^4.0",
"pestphp/pest-plugin-laravel": "^4.0"
},

67
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "9799c1c9ac04b58df52c03bf08389021",
"content-hash": "7d1d30c0ccf914b8490dfe707ed3509c",
"packages": [
{
"name": "anourvalar/eloquent-serialize",
@@ -12190,6 +12190,69 @@
],
"time": "2025-06-25T02:12:12+00:00"
},
{
"name": "orangehill/iseed",
"version": "v3.1.1",
"source": {
"type": "git",
"url": "https://github.com/orangehill/iseed.git",
"reference": "bfe8f5882641f70b309cd01e30f02e8e9d09b492"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/orangehill/iseed/zipball/bfe8f5882641f70b309cd01e30f02e8e9d09b492",
"reference": "bfe8f5882641f70b309cd01e30f02e8e9d09b492",
"shasum": ""
},
"require": {
"illuminate/support": "~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
"php": "^7.2|^8.0.2"
},
"require-dev": {
"illuminate/filesystem": "~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
"laravel/framework": "~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0",
"mockery/mockery": "^1.0.0",
"phpunit/phpunit": "^8.0|^11.5.3"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Orangehill\\Iseed\\IseedServiceProvider"
]
}
},
"autoload": {
"psr-0": {
"Orangehill\\Iseed": "src/"
},
"classmap": [
"src/Orangehill/Iseed/Exceptions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-2-Clause"
],
"authors": [
{
"name": "Tihomir Opacic",
"email": "tihomir.opacic@orangehilldev.com"
}
],
"description": "Generate a new Laravel database seed file based on data from the existing database table.",
"keywords": [
"artisan",
"generators",
"laravel",
"seed"
],
"support": {
"issues": "https://github.com/orangehill/iseed/issues",
"source": "https://github.com/orangehill/iseed/tree/v3.1.1"
},
"time": "2025-03-04T07:56:48+00:00"
},
{
"name": "pestphp/pest",
"version": "v4.1.3",
@@ -14868,5 +14931,5 @@
"php": "^8.2"
},
"platform-dev": {},
"plugin-api-version": "2.9.0"
"plugin-api-version": "2.6.0"
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,716 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class BrandsTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('brands')->delete();
\DB::table('brands')->insert(array (
0 =>
array (
'id' => 3,
'business_id' => 4,
'name' => 'Hash Factory',
'slug' => 'hash-factory',
'description' => 'At Hash Factory, we are dedicated to delivering a hash experience that embodies the essence of euphoria. With our meticulously handcrafted hash, you unlock a world of flavors, effects, and craftsmanship that elevate your cannabis journey.',
'tagline' => 'Manufacturing Happiness',
'logo_path' => 'businesses/cannabrands/brands/hash-factory/branding/logo.png',
'website_url' => NULL,
'colors' => NULL,
'instagram_handle' => NULL,
'facebook_url' => NULL,
'twitter_handle' => NULL,
'is_active' => true,
'is_public' => true,
'is_featured' => true,
'sort_order' => 3,
'meta_title' => NULL,
'meta_description' => NULL,
'created_at' => '2025-11-23 19:42:23',
'updated_at' => '2025-11-24 00:03:41',
'deleted_at' => NULL,
'hashid' => '55ak4',
'sku_prefix' => 'HFAC',
'long_description' => 'At Hash Factory, we are dedicated to delivering a hash experience that embodies the essence of euphoria. With our meticulously handcrafted hash, you unlock a world of flavors, effects, and craftsmanship that elevate your cannabis journey. Embrace the artistry and excellence that define our premium hash, and embark on a sensory adventure that captivates the mind, body, and soul. Choose Hash Factory for an unforgettable hash experience and discover the true essence of euphoria today.',
'banner_path' => 'businesses/cannabrands/brands/hash-factory/branding/banner.png',
'address' => NULL,
'phone' => NULL,
'youtube_url' => NULL,
'unit_number' => NULL,
'city' => NULL,
'state' => NULL,
'zip_code' => NULL,
'brand_announcement' => NULL,
'seo_title' => NULL,
'seo_description' => NULL,
'brand_voice' => NULL,
'brand_voice_custom' => NULL,
'sales_email' => NULL,
'support_email' => NULL,
'wholesale_email' => NULL,
'pr_email' => NULL,
'inbound_email' => NULL,
'sms_number' => NULL,
),
1 =>
array (
'id' => 2,
'business_id' => 4,
'name' => 'Doobz',
'slug' => 'doobz',
'description' => 'Doobz Infused Prerolls are crafted for those who value quality, innovation, and community.',
'tagline' => NULL,
'logo_path' => 'businesses/cannabrands/brands/doobz/branding/logo.png',
'website_url' => NULL,
'colors' => NULL,
'instagram_handle' => NULL,
'facebook_url' => NULL,
'twitter_handle' => NULL,
'is_active' => true,
'is_public' => true,
'is_featured' => true,
'sort_order' => 2,
'meta_title' => NULL,
'meta_description' => NULL,
'created_at' => '2025-11-23 19:42:23',
'updated_at' => '2025-11-24 00:03:41',
'deleted_at' => NULL,
'hashid' => '93xm5',
'sku_prefix' => 'DOBZ',
'long_description' => 'Doobz Infused Prerolls are crafted for those who value quality, innovation, and community. Made with premium, locally-grown flower and infused with top-tier solventless concentrates, every preroll delivers bold potency and clean, rich flavor. Doobz leads with advanced infusion techniques and a commitment to sustainability offering more than just a smoke, but a movement rooted in integrity and elevated experiences.',
'banner_path' => 'businesses/cannabrands/brands/doobz/branding/banner.jpg',
'address' => NULL,
'phone' => NULL,
'youtube_url' => NULL,
'unit_number' => NULL,
'city' => NULL,
'state' => NULL,
'zip_code' => NULL,
'brand_announcement' => NULL,
'seo_title' => NULL,
'seo_description' => NULL,
'brand_voice' => NULL,
'brand_voice_custom' => NULL,
'sales_email' => NULL,
'support_email' => NULL,
'wholesale_email' => NULL,
'pr_email' => NULL,
'inbound_email' => NULL,
'sms_number' => NULL,
),
2 =>
array (
'id' => 4,
'business_id' => 4,
'name' => 'High Expectations',
'slug' => 'high-expectations',
'description' => 'Rolled to Perfection.',
'tagline' => 'Setting High Expectations',
'logo_path' => 'businesses/cannabrands/brands/high-expectations/branding/logo.png',
'website_url' => NULL,
'colors' => NULL,
'instagram_handle' => NULL,
'facebook_url' => NULL,
'twitter_handle' => NULL,
'is_active' => true,
'is_public' => true,
'is_featured' => false,
'sort_order' => 4,
'meta_title' => NULL,
'meta_description' => NULL,
'created_at' => '2025-11-23 19:42:23',
'updated_at' => '2025-11-24 00:03:41',
'deleted_at' => NULL,
'hashid' => '38sv8',
'sku_prefix' => 'HIEX',
'long_description' => 'Rolled to Perfection. Your taste buds\' new best friend.',
'banner_path' => 'businesses/cannabrands/brands/high-expectations/branding/banner.jpg',
'address' => NULL,
'phone' => NULL,
'youtube_url' => NULL,
'unit_number' => NULL,
'city' => NULL,
'state' => NULL,
'zip_code' => NULL,
'brand_announcement' => NULL,
'seo_title' => NULL,
'seo_description' => NULL,
'brand_voice' => NULL,
'brand_voice_custom' => NULL,
'sales_email' => NULL,
'support_email' => NULL,
'wholesale_email' => NULL,
'pr_email' => NULL,
'inbound_email' => NULL,
'sms_number' => NULL,
),
3 =>
array (
'id' => 5,
'business_id' => 4,
'name' => 'Just Vape',
'slug' => 'just-vape',
'description' => 'Just Vape is a commitment to clean, effective, and responsible vaping.',
'tagline' => 'Elevating Your Vaping Experience',
'logo_path' => 'businesses/cannabrands/brands/just-vape/branding/logo.png',
'website_url' => NULL,
'colors' => NULL,
'instagram_handle' => NULL,
'facebook_url' => NULL,
'twitter_handle' => NULL,
'is_active' => true,
'is_public' => true,
'is_featured' => false,
'sort_order' => 5,
'meta_title' => NULL,
'meta_description' => NULL,
'created_at' => '2025-11-23 19:42:23',
'updated_at' => '2025-11-24 00:04:00',
'deleted_at' => NULL,
'hashid' => '91wk2',
'sku_prefix' => 'JVAP',
'long_description' => 'Just Vape is a commitment to clean, effective, and responsible vaping. We use only high-quality ingredients and all-ceramic, heavy-metal-free hardware for a pure experience you can trust. Backed by innovation and transparency, our products are rigorously tested and crafted for those who care about what they inhale. Just Vape isn\'t just a brand it\'s a promise of integrity, quality, and progress.',
'banner_path' => 'businesses/cannabrands/brands/just-vape/branding/banner.jpg',
'address' => NULL,
'phone' => NULL,
'youtube_url' => NULL,
'unit_number' => NULL,
'city' => NULL,
'state' => NULL,
'zip_code' => NULL,
'brand_announcement' => NULL,
'seo_title' => NULL,
'seo_description' => NULL,
'brand_voice' => NULL,
'brand_voice_custom' => NULL,
'sales_email' => NULL,
'support_email' => NULL,
'wholesale_email' => NULL,
'pr_email' => NULL,
'inbound_email' => NULL,
'sms_number' => NULL,
),
4 =>
array (
'id' => 16,
'business_id' => 4,
'name' => 'Proper Cock',
'slug' => 'proper-cock',
'description' => 'Proper Cock delivers top-tier, solventless cannabis concentrates.',
'tagline' => NULL,
'logo_path' => 'businesses/cannabrands/brands/proper-cock/branding/logo.png',
'website_url' => NULL,
'colors' => NULL,
'instagram_handle' => NULL,
'facebook_url' => NULL,
'twitter_handle' => NULL,
'is_active' => true,
'is_public' => true,
'is_featured' => false,
'sort_order' => 0,
'meta_title' => NULL,
'meta_description' => NULL,
'created_at' => '2025-11-23 23:09:47',
'updated_at' => '2025-11-24 00:04:00',
'deleted_at' => NULL,
'hashid' => '5462e',
'sku_prefix' => NULL,
'long_description' => 'Proper Cock delivers top-tier, solventless cannabis concentrates like hash buttons, rosin jams, and diamonds crafted for purity, potency, and flavor. Their artisanal products are 100% plant-based and chemical-free, offering a balanced, high-quality experience for both creative daytime use and relaxed evenings.',
'banner_path' => 'businesses/cannabrands/brands/proper-cock/branding/banner.jpg',
'address' => NULL,
'phone' => NULL,
'youtube_url' => NULL,
'unit_number' => NULL,
'city' => NULL,
'state' => NULL,
'zip_code' => NULL,
'brand_announcement' => NULL,
'seo_title' => NULL,
'seo_description' => NULL,
'brand_voice' => NULL,
'brand_voice_custom' => NULL,
'sales_email' => NULL,
'support_email' => NULL,
'wholesale_email' => NULL,
'pr_email' => NULL,
'inbound_email' => NULL,
'sms_number' => NULL,
),
5 =>
array (
'id' => 6,
'business_id' => 4,
'name' => 'Thunder Bud',
'slug' => 'thunder-bud',
'description' => 'Unique strains for enhanced experience.',
'tagline' => 'Big Highs, Small Price',
'logo_path' => 'businesses/cannabrands/brands/thunder-bud/branding/logo.png',
'website_url' => NULL,
'colors' => NULL,
'instagram_handle' => NULL,
'facebook_url' => NULL,
'twitter_handle' => NULL,
'is_active' => true,
'is_public' => true,
'is_featured' => false,
'sort_order' => 6,
'meta_title' => NULL,
'meta_description' => NULL,
'created_at' => '2025-11-23 19:42:23',
'updated_at' => '2025-11-24 00:04:00',
'deleted_at' => NULL,
'hashid' => '14jb8',
'sku_prefix' => 'TBUD',
'long_description' => 'Unique strains for enhanced experience: Our trim plus flower prerolls offer a unique blend of premium flower and high-quality trim (we offer ice water hash infused options too!), providing a richer, more balanced smoking experience. Unlike other prerolls that use lower-grade materials, our blend ensures a smooth burn, consistent potency, and a fuller flavor profile. This combination not only maximizes the use of the entire plant but also delivers a superior and cost-effective option for discerning cannabis enthusiasts.',
'banner_path' => 'businesses/cannabrands/brands/thunder-bud/branding/banner.jpg',
'address' => NULL,
'phone' => NULL,
'youtube_url' => NULL,
'unit_number' => NULL,
'city' => NULL,
'state' => NULL,
'zip_code' => NULL,
'brand_announcement' => NULL,
'seo_title' => NULL,
'seo_description' => NULL,
'brand_voice' => NULL,
'brand_voice_custom' => NULL,
'sales_email' => NULL,
'support_email' => NULL,
'wholesale_email' => NULL,
'pr_email' => NULL,
'inbound_email' => NULL,
'sms_number' => NULL,
),
6 =>
array (
'id' => 9,
'business_id' => 4,
'name' => 'Twisites',
'slug' => 'twisites',
'description' => 'Twisties offers a premium cannabis pre-roll experience.',
'tagline' => 'Unwind with Twisties',
'logo_path' => 'businesses/cannabrands/brands/twisites/branding/logo.png',
'website_url' => NULL,
'colors' => NULL,
'instagram_handle' => NULL,
'facebook_url' => NULL,
'twitter_handle' => NULL,
'is_active' => true,
'is_public' => true,
'is_featured' => false,
'sort_order' => 9,
'meta_title' => NULL,
'meta_description' => NULL,
'created_at' => '2025-11-23 19:42:23',
'updated_at' => '2025-11-24 00:04:18',
'deleted_at' => NULL,
'hashid' => '31ns8',
'sku_prefix' => 'TWIS',
'long_description' => 'Twisties offers a premium cannabis pre-roll experience with our small-batch, hand-crafted products made from quality flower. With a focus on quality and attention to detail, Twisties sets a high standard for those seeking a top-notch pre-roll experience.',
'banner_path' => 'businesses/cannabrands/brands/twisites/branding/banner.jpg',
'address' => NULL,
'phone' => NULL,
'youtube_url' => NULL,
'unit_number' => NULL,
'city' => NULL,
'state' => NULL,
'zip_code' => NULL,
'brand_announcement' => NULL,
'seo_title' => NULL,
'seo_description' => NULL,
'brand_voice' => NULL,
'brand_voice_custom' => NULL,
'sales_email' => NULL,
'support_email' => NULL,
'wholesale_email' => NULL,
'pr_email' => NULL,
'inbound_email' => NULL,
'sms_number' => NULL,
),
7 =>
array (
'id' => 1,
'business_id' => 4,
'name' => 'Canna RSO',
'slug' => 'canna-rso',
'description' => 'Experience the breakthrough extract backed by nature!',
'tagline' => 'Pure by Design',
'logo_path' => 'businesses/cannabrands/brands/canna-rso/branding/logo.png',
'website_url' => NULL,
'colors' => NULL,
'instagram_handle' => NULL,
'facebook_url' => NULL,
'twitter_handle' => NULL,
'is_active' => true,
'is_public' => true,
'is_featured' => true,
'sort_order' => 1,
'meta_title' => NULL,
'meta_description' => NULL,
'created_at' => '2025-11-23 19:42:23',
'updated_at' => '2025-11-24 00:04:18',
'deleted_at' => NULL,
'hashid' => '24zv3',
'sku_prefix' => 'CRSO',
'long_description' => 'Experience the breakthrough extract backed by nature!',
'banner_path' => 'businesses/cannabrands/brands/canna-rso/branding/banner.jpg',
'address' => NULL,
'phone' => NULL,
'youtube_url' => NULL,
'unit_number' => NULL,
'city' => NULL,
'state' => NULL,
'zip_code' => NULL,
'brand_announcement' => NULL,
'seo_title' => NULL,
'seo_description' => NULL,
'brand_voice' => NULL,
'brand_voice_custom' => NULL,
'sales_email' => NULL,
'support_email' => NULL,
'wholesale_email' => NULL,
'pr_email' => NULL,
'inbound_email' => NULL,
'sms_number' => NULL,
),
8 =>
array (
'id' => 11,
'business_id' => 4,
'name' => 'Doinks',
'slug' => 'doinks',
'description' => 'Doinks isn\'t just a product, it\'s a statement.',
'tagline' => 'This Ain\'t a Joint. It\'s a DOINK.',
'logo_path' => 'businesses/cannabrands/brands/doinks/branding/logo.png',
'website_url' => NULL,
'colors' => NULL,
'instagram_handle' => NULL,
'facebook_url' => NULL,
'twitter_handle' => NULL,
'is_active' => true,
'is_public' => true,
'is_featured' => false,
'sort_order' => 11,
'meta_title' => NULL,
'meta_description' => NULL,
'created_at' => '2025-11-23 19:42:23',
'updated_at' => '2025-11-24 00:04:18',
'deleted_at' => NULL,
'hashid' => '41he7',
'sku_prefix' => 'DINK',
'long_description' => 'Doinks isn\'t just a product, it\'s a statement. We craft 2-gram hemp-wrapped blunts infused with premium ice water hash and packed with 100% top-shelf flower. No fillers. No shortcuts. Just potent, terp-rich smoke that delivers every time. Every Doink is rolled with intention: bold flavor profiles, smooth glass tips, and a heavy-hitting high designed for heads who know what quality really means. Doinks bring the fire; loud, clean, and always handcrafted in small batches. Because this ain\'t a joint. It\'s a DOINK.',
'banner_path' => 'businesses/cannabrands/brands/doinks/branding/banner.jpg',
'address' => NULL,
'phone' => NULL,
'youtube_url' => NULL,
'unit_number' => NULL,
'city' => NULL,
'state' => NULL,
'zip_code' => NULL,
'brand_announcement' => NULL,
'seo_title' => NULL,
'seo_description' => NULL,
'brand_voice' => NULL,
'brand_voice_custom' => NULL,
'sales_email' => NULL,
'support_email' => NULL,
'wholesale_email' => NULL,
'pr_email' => NULL,
'inbound_email' => NULL,
'sms_number' => NULL,
),
9 =>
array (
'id' => 8,
'business_id' => 4,
'name' => 'Outlaw',
'slug' => 'outlaw-cannabis',
'description' => 'Exclusive Drops. Legendary Quality. Limited Supply.',
'tagline' => 'Exclusive Drops. Legendary Quality.',
'logo_path' => 'businesses/cannabrands/brands/outlaw-cannabis/branding/logo.png',
'website_url' => NULL,
'colors' => NULL,
'instagram_handle' => NULL,
'facebook_url' => NULL,
'twitter_handle' => NULL,
'is_active' => true,
'is_public' => true,
'is_featured' => false,
'sort_order' => 8,
'meta_title' => NULL,
'meta_description' => NULL,
'created_at' => '2025-11-23 19:42:23',
'updated_at' => '2025-11-24 00:04:56',
'deleted_at' => NULL,
'hashid' => '83qe3',
'sku_prefix' => 'OUTL',
'long_description' => 'Exclusive Drops. Legendary Quality. Limited Supply.',
'banner_path' => 'businesses/cannabrands/brands/outlaw-cannabis/branding/banner.png',
'address' => NULL,
'phone' => NULL,
'youtube_url' => NULL,
'unit_number' => NULL,
'city' => NULL,
'state' => NULL,
'zip_code' => NULL,
'brand_announcement' => NULL,
'seo_title' => NULL,
'seo_description' => NULL,
'brand_voice' => NULL,
'brand_voice_custom' => NULL,
'sales_email' => NULL,
'support_email' => NULL,
'wholesale_email' => NULL,
'pr_email' => NULL,
'inbound_email' => NULL,
'sms_number' => NULL,
),
10 =>
array (
'id' => 14,
'business_id' => 4,
'name' => 'Dairy to Dank',
'slug' => 'dairy-to-dank',
'description' => 'Journey with us from Dairy to Dank, a brand that is as spirited, industrious, and triumphant as the dairymen, oilmen, golfers, and entrepreneurs of New Mexico, Texas, and Arizona.',
'tagline' => NULL,
'logo_path' => 'businesses/cannabrands/brands/dairy-to-dank/branding/logo.png',
'website_url' => NULL,
'colors' => NULL,
'instagram_handle' => NULL,
'facebook_url' => NULL,
'twitter_handle' => NULL,
'is_active' => true,
'is_public' => true,
'is_featured' => false,
'sort_order' => 0,
'meta_title' => NULL,
'meta_description' => NULL,
'created_at' => '2025-11-23 23:09:18',
'updated_at' => '2025-11-24 00:04:56',
'deleted_at' => NULL,
'hashid' => '88a2e',
'sku_prefix' => NULL,
'long_description' => 'Our products take root in the extraordinary transition of the Greathouse family from the dairy industry to the cannabis landscape, embodying our dedication to quality, innovation, and natural wellness. Embrace the legacy of growth and excellence with Dairy to Dank a proud testament to our past, a beacon for our future, and a commitment to our fellow cultivators of success.',
'banner_path' => 'businesses/cannabrands/brands/dairy-to-dank/branding/banner.jpg',
'address' => NULL,
'phone' => NULL,
'youtube_url' => NULL,
'unit_number' => NULL,
'city' => NULL,
'state' => NULL,
'zip_code' => NULL,
'brand_announcement' => NULL,
'seo_title' => NULL,
'seo_description' => NULL,
'brand_voice' => NULL,
'brand_voice_custom' => NULL,
'sales_email' => NULL,
'support_email' => NULL,
'wholesale_email' => NULL,
'pr_email' => NULL,
'inbound_email' => NULL,
'sms_number' => NULL,
),
11 =>
array (
'id' => 15,
'business_id' => 4,
'name' => 'Blitzd',
'slug' => 'blitzd',
'description' => 'Too much in too little. BLITZ\'D is not your chill smoke.',
'tagline' => 'Your New Favorite Bad Idea',
'logo_path' => 'businesses/cannabrands/brands/blitzd/branding/logo.png',
'website_url' => NULL,
'colors' => NULL,
'instagram_handle' => NULL,
'facebook_url' => NULL,
'twitter_handle' => NULL,
'is_active' => true,
'is_public' => true,
'is_featured' => false,
'sort_order' => 0,
'meta_title' => NULL,
'meta_description' => NULL,
'created_at' => '2025-11-23 23:09:35',
'updated_at' => '2025-11-24 00:04:38',
'deleted_at' => NULL,
'hashid' => '4f53f',
'sku_prefix' => NULL,
'long_description' => 'Too much in too little. BLITZ\'D is not your chill smoke. It\'s the joint you light when you shouldn\'t but do anyway. We\'re talking 0.5g of pure chaos: infused with flower, hash, and THC oil, packed so tight it practically dares you to finish it. High-THC. High-risk. High-reward. Each pre-roll is a tiny timebomb dressed up in a clear tube. No fluff. No filters. Just heavy hits in a compact format that goes way too hard. We don\'t do mids. We don\'t do moderation. BLITZ\'D is for the ones who know better and still spark it. This isn\'t for everyone. It\'s for you.',
'banner_path' => 'businesses/cannabrands/brands/blitzd/branding/banner.png',
'address' => NULL,
'phone' => NULL,
'youtube_url' => NULL,
'unit_number' => NULL,
'city' => NULL,
'state' => NULL,
'zip_code' => NULL,
'brand_announcement' => NULL,
'seo_title' => NULL,
'seo_description' => NULL,
'brand_voice' => NULL,
'brand_voice_custom' => NULL,
'sales_email' => NULL,
'support_email' => NULL,
'wholesale_email' => NULL,
'pr_email' => NULL,
'inbound_email' => NULL,
'sms_number' => NULL,
),
12 =>
array (
'id' => 17,
'business_id' => 4,
'name' => 'White Label Canna',
'slug' => 'white-label-canna',
'description' => 'White Label Canna empowers cannabis brands with turnkey, high-quality manufacturing.',
'tagline' => 'Your Partner for Cannabis Success',
'logo_path' => 'businesses/cannabrands/brands/white-label-canna/branding/logo.png',
'website_url' => NULL,
'colors' => NULL,
'instagram_handle' => NULL,
'facebook_url' => NULL,
'twitter_handle' => NULL,
'is_active' => true,
'is_public' => true,
'is_featured' => false,
'sort_order' => 0,
'meta_title' => NULL,
'meta_description' => NULL,
'created_at' => '2025-11-23 23:10:00',
'updated_at' => '2025-11-24 00:04:38',
'deleted_at' => NULL,
'hashid' => '92f87',
'sku_prefix' => NULL,
'long_description' => 'White Label Canna empowers cannabis brands with turnkey, high-quality manufacturing combining innovative solventless extraction, tailored product development, and polished packaging solutions to help you launch or scale quickly with confidence.',
'banner_path' => 'businesses/cannabrands/brands/white-label-canna/branding/banner.jpg',
'address' => NULL,
'phone' => NULL,
'youtube_url' => NULL,
'unit_number' => NULL,
'city' => NULL,
'state' => NULL,
'zip_code' => NULL,
'brand_announcement' => NULL,
'seo_title' => NULL,
'seo_description' => NULL,
'brand_voice' => NULL,
'brand_voice_custom' => NULL,
'sales_email' => NULL,
'support_email' => NULL,
'wholesale_email' => NULL,
'pr_email' => NULL,
'inbound_email' => NULL,
'sms_number' => NULL,
),
13 =>
array (
'id' => 10,
'business_id' => 4,
'name' => 'Nuvata',
'slug' => 'nuvata',
'description' => 'Whether you\'re looking for an aid to wellness and mindfulness or simply to add a little flavor to life, Nuvata\'s premium vaporizers go beyond expectation.',
'tagline' => NULL,
'logo_path' => 'businesses/cannabrands/brands/nuvata/branding/logo.png',
'website_url' => NULL,
'colors' => NULL,
'instagram_handle' => NULL,
'facebook_url' => NULL,
'twitter_handle' => NULL,
'is_active' => true,
'is_public' => true,
'is_featured' => false,
'sort_order' => 10,
'meta_title' => NULL,
'meta_description' => NULL,
'created_at' => '2025-11-23 19:42:23',
'updated_at' => '2025-11-24 00:04:56',
'deleted_at' => NULL,
'hashid' => '44gf9',
'sku_prefix' => 'NUVA',
'long_description' => 'Our process of combining cannabinoids and terpenoids, paired with our understanding of the "entourage effect", allows us to create enhanced states of mind, body, and everywhere in between. Terpenoid research is the frontier of cannabis innovation, and through it, we customize effects to provide a personalized experience. From there, our focus lies on crafting flavorful profiles to complement these effects as flavors represent how we celebrate, how we nurture, and how culture is passed down through taste buds worldwide.',
'banner_path' => 'businesses/cannabrands/brands/nuvata/branding/banner.jpg',
'address' => NULL,
'phone' => NULL,
'youtube_url' => NULL,
'unit_number' => NULL,
'city' => NULL,
'state' => NULL,
'zip_code' => NULL,
'brand_announcement' => NULL,
'seo_title' => NULL,
'seo_description' => NULL,
'brand_voice' => NULL,
'brand_voice_custom' => NULL,
'sales_email' => NULL,
'support_email' => NULL,
'wholesale_email' => NULL,
'pr_email' => NULL,
'inbound_email' => NULL,
'sms_number' => NULL,
),
14 =>
array (
'id' => 7,
'business_id' => 4,
'name' => 'Aloha TymeMachine',
'slug' => 'aloha-tymemachine',
'description' => 'Uncommon in every way! Infused cold brew, lemonades and teas.',
'tagline' => 'Uncommon In Every Way',
'logo_path' => 'businesses/cannabrands/brands/aloha-tymemachine/branding/logo.png',
'website_url' => NULL,
'colors' => NULL,
'instagram_handle' => NULL,
'facebook_url' => NULL,
'twitter_handle' => NULL,
'is_active' => true,
'is_public' => true,
'is_featured' => false,
'sort_order' => 7,
'meta_title' => NULL,
'meta_description' => NULL,
'created_at' => '2025-11-23 19:42:23',
'updated_at' => '2025-11-25 03:22:51',
'deleted_at' => NULL,
'hashid' => '22dt7',
'sku_prefix' => 'ALOH',
'long_description' => 'Uncommon in every way! Infused cold brew, lemonades and teas...organic, gluten-free, raw and unprocessed ingredients. 100mg/12.5 ounces active in under 10 minutes, lasting 4-6 hours.',
'banner_path' => 'businesses/cannabrands/brands/aloha-tymemachine/branding/banner.jpg',
'address' => NULL,
'phone' => NULL,
'youtube_url' => NULL,
'unit_number' => NULL,
'city' => NULL,
'state' => NULL,
'zip_code' => NULL,
'brand_announcement' => NULL,
'seo_title' => NULL,
'seo_description' => NULL,
'brand_voice' => NULL,
'brand_voice_custom' => NULL,
'sales_email' => NULL,
'support_email' => NULL,
'wholesale_email' => NULL,
'pr_email' => NULL,
'inbound_email' => NULL,
'sms_number' => NULL,
),
));
}
}

View File

@@ -0,0 +1,626 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class BusinessesTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('businesses')->delete();
\DB::table('businesses')->insert(array (
0 =>
array (
'id' => 1,
'name' => 'GreenLeaf Dispensary',
'industry_type' => 'retailer',
'referral_code' => NULL,
'is_active' => true,
'created_at' => '2025-11-23 19:42:22',
'updated_at' => '2025-11-23 19:42:22',
'deleted_at' => NULL,
'business_group' => NULL,
'onboarding_completed' => true,
'payment_method' => 'net_30',
'delivery_unit' => NULL,
'delivery_directions' => 'Use rear loading dock entrance',
'delivery_preferences' => 'Morning deliveries preferred (8am-12pm)',
'delivery_schedule' => NULL,
'buyer_name' => 'Buyer User',
'buyer_phone' => '(602) 555-1234',
'buyer_email' => 'buyer@example.com',
'preferred_contact_method' => 'email',
'ato_document_path' => NULL,
'tpt_document_path' => NULL,
'form_5000a_path' => NULL,
'setup_completed_at' => '2025-11-23 19:42:22',
'setup_progress' => NULL,
'cannabis_license_path' => 'businesses/911d7588-6ef7-41e2/compliance/cannabis-license.pdf',
'w9_form_path' => 'businesses/911d7588-6ef7-41e2/compliance/w9-form.pdf',
'insurance_certificate_path' => 'businesses/911d7588-6ef7-41e2/compliance/insurance.pdf',
'business_license_path' => 'businesses/911d7588-6ef7-41e2/compliance/business-license.pdf',
'compliance_documents_updated_at' => '2025-11-23 19:42:22',
'physical_city' => 'Phoenix',
'physical_state' => 'AZ',
'physical_zipcode' => '85001',
'business_phone' => '(602) 555-1234',
'business_email' => 'info@greenleafdispensary.com',
'ap_contact_phone' => '(602) 555-1235',
'ap_contact_email' => 'ap@greenleafdispensary.com',
'ap_contact_sms' => NULL,
'ap_preferred_contact_method' => NULL,
'delivery_contact_phone' => '(602) 555-1236',
'delivery_contact_email' => NULL,
'delivery_contact_sms' => NULL,
'physical_address' => '1234 Main Street',
'license_number' => 'AZ-R-12345678',
'billing_address' => '1234 Main Street',
'billing_city' => 'Phoenix',
'billing_state' => 'AZ',
'billing_zipcode' => '85001',
'shipping_address' => '1234 Main Street',
'shipping_city' => 'Phoenix',
'shipping_state' => 'AZ',
'shipping_zipcode' => '85001',
'type' => 'buyer',
'slug' => 'greenleaf-dispensary',
'tin_ein' => '85-1234567',
'dba_name' => 'GreenLeaf Cannabis Co.',
'business_type' => 'retailer',
'ap_contact_first_name' => 'Sarah',
'ap_contact_last_name' => 'Johnson',
'delivery_contact_first_name' => 'Mike',
'delivery_contact_last_name' => 'Davis',
'resale_certificate_path' => 'businesses/911d7588-6ef7-41e2/compliance/resale-cert.pdf',
'application_submitted_at' => '2025-11-22 19:42:22',
'owner_user_id' => 2,
'status' => 'approved',
'rejected_at' => NULL,
'rejection_reason' => NULL,
'description' => 'Premium cannabis dispensary serving the Phoenix metro area with quality products and exceptional service.',
'commission_rate' => NULL,
'credit_limit' => '50000.00',
'notes' => NULL,
'approved_at' => '2025-11-23 19:42:22',
'approved_by' => 4,
'primary_contact_first_name' => 'Buyer',
'primary_contact_last_name' => 'User',
'primary_contact_email' => 'buyer@example.com',
'primary_contact_phone' => '(602) 555-1234',
'uuid' => '911d7588-6ef7-41e2',
'license_type' => NULL,
'tax_rate' => '0.00',
'tax_exempt' => true,
'tax_exemption_reason' => NULL,
'has_analytics' => false,
'has_marketing' => false,
'has_manufacturing' => false,
'has_processing' => false,
'parent_id' => NULL,
'division_name' => NULL,
'has_inventory' => false,
'marketing_test_mode' => true,
'marketing_test_emails' => NULL,
'marketing_test_phones' => NULL,
'copilot_enabled' => false,
'has_accounting' => false,
'has_compliance' => false,
'has_assemblies' => false,
'marketing_enabled' => false,
'marketing_tier' => NULL,
),
1 =>
array (
'id' => 3,
'name' => 'Phoenix Cannabis Collective',
'industry_type' => 'retailer',
'referral_code' => NULL,
'is_active' => false,
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'deleted_at' => NULL,
'business_group' => NULL,
'onboarding_completed' => false,
'payment_method' => NULL,
'delivery_unit' => NULL,
'delivery_directions' => NULL,
'delivery_preferences' => NULL,
'delivery_schedule' => NULL,
'buyer_name' => NULL,
'buyer_phone' => NULL,
'buyer_email' => NULL,
'preferred_contact_method' => 'email',
'ato_document_path' => NULL,
'tpt_document_path' => NULL,
'form_5000a_path' => NULL,
'setup_completed_at' => NULL,
'setup_progress' => NULL,
'cannabis_license_path' => NULL,
'w9_form_path' => NULL,
'insurance_certificate_path' => NULL,
'business_license_path' => NULL,
'compliance_documents_updated_at' => NULL,
'physical_city' => 'Phoenix',
'physical_state' => 'AZ',
'physical_zipcode' => '85003',
'business_phone' => '(602) 555-9999',
'business_email' => 'info@phoenixcannabis.com',
'ap_contact_phone' => NULL,
'ap_contact_email' => NULL,
'ap_contact_sms' => NULL,
'ap_preferred_contact_method' => NULL,
'delivery_contact_phone' => NULL,
'delivery_contact_email' => NULL,
'delivery_contact_sms' => NULL,
'physical_address' => '789 Central Avenue',
'license_number' => 'AZ-R-87654321',
'billing_address' => '789 Central Avenue',
'billing_city' => 'Phoenix',
'billing_state' => 'AZ',
'billing_zipcode' => '85003',
'shipping_address' => NULL,
'shipping_city' => NULL,
'shipping_state' => NULL,
'shipping_zipcode' => NULL,
'type' => 'buyer',
'slug' => 'phoenix-cannabis-collective',
'tin_ein' => '85-9876543',
'dba_name' => 'Phoenix Cannabis Co.',
'business_type' => 'retailer',
'ap_contact_first_name' => NULL,
'ap_contact_last_name' => NULL,
'delivery_contact_first_name' => NULL,
'delivery_contact_last_name' => NULL,
'resale_certificate_path' => NULL,
'application_submitted_at' => '2025-11-22 19:42:24',
'owner_user_id' => 5,
'status' => 'pending',
'rejected_at' => NULL,
'rejection_reason' => NULL,
'description' => 'New dispensary opening in downtown Phoenix',
'commission_rate' => NULL,
'credit_limit' => NULL,
'notes' => NULL,
'approved_at' => NULL,
'approved_by' => NULL,
'primary_contact_first_name' => 'Pending',
'primary_contact_last_name' => 'Buyer',
'primary_contact_email' => 'pending-buyer@example.com',
'primary_contact_phone' => '(602) 555-9999',
'uuid' => '0bd71c35-b9b7-4688',
'license_type' => NULL,
'tax_rate' => '0.00',
'tax_exempt' => true,
'tax_exemption_reason' => NULL,
'has_analytics' => false,
'has_marketing' => false,
'has_manufacturing' => false,
'has_processing' => false,
'parent_id' => NULL,
'division_name' => NULL,
'has_inventory' => false,
'marketing_test_mode' => true,
'marketing_test_emails' => NULL,
'marketing_test_phones' => NULL,
'copilot_enabled' => false,
'has_accounting' => false,
'has_compliance' => false,
'has_assemblies' => false,
'marketing_enabled' => false,
'marketing_tier' => NULL,
),
2 =>
array (
'id' => 5,
'name' => 'Curagreen',
'industry_type' => NULL,
'referral_code' => NULL,
'is_active' => true,
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-24 03:22:34',
'deleted_at' => NULL,
'business_group' => NULL,
'onboarding_completed' => true,
'payment_method' => NULL,
'delivery_unit' => NULL,
'delivery_directions' => NULL,
'delivery_preferences' => NULL,
'delivery_schedule' => NULL,
'buyer_name' => NULL,
'buyer_phone' => NULL,
'buyer_email' => NULL,
'preferred_contact_method' => NULL,
'ato_document_path' => NULL,
'tpt_document_path' => NULL,
'form_5000a_path' => NULL,
'setup_completed_at' => NULL,
'setup_progress' => NULL,
'cannabis_license_path' => NULL,
'w9_form_path' => NULL,
'insurance_certificate_path' => NULL,
'business_license_path' => NULL,
'compliance_documents_updated_at' => NULL,
'physical_city' => 'Tempe',
'physical_state' => 'AZ',
'physical_zipcode' => '85281',
'business_phone' => '(480) 555-9876',
'business_email' => 'info@cannabrands.com',
'ap_contact_phone' => NULL,
'ap_contact_email' => NULL,
'ap_contact_sms' => NULL,
'ap_preferred_contact_method' => NULL,
'delivery_contact_phone' => NULL,
'delivery_contact_email' => NULL,
'delivery_contact_sms' => NULL,
'physical_address' => '5678 Industrial Parkway',
'license_number' => 'AZ-M-87654321',
'billing_address' => NULL,
'billing_city' => NULL,
'billing_state' => NULL,
'billing_zipcode' => NULL,
'shipping_address' => NULL,
'shipping_city' => NULL,
'shipping_state' => NULL,
'shipping_zipcode' => NULL,
'type' => 'seller',
'slug' => 'curagreen',
'tin_ein' => '85-7654321',
'dba_name' => NULL,
'business_type' => 'processor',
'ap_contact_first_name' => NULL,
'ap_contact_last_name' => NULL,
'delivery_contact_first_name' => NULL,
'delivery_contact_last_name' => NULL,
'resale_certificate_path' => NULL,
'application_submitted_at' => NULL,
'owner_user_id' => 8,
'status' => 'approved',
'rejected_at' => NULL,
'rejection_reason' => NULL,
'description' => 'Cultivation, BHO extraction, and solventless processing division',
'commission_rate' => NULL,
'credit_limit' => NULL,
'notes' => NULL,
'approved_at' => '2025-11-23 19:42:24',
'approved_by' => NULL,
'primary_contact_first_name' => NULL,
'primary_contact_last_name' => NULL,
'primary_contact_email' => NULL,
'primary_contact_phone' => NULL,
'uuid' => '9a6bbce1-dba1-4497',
'license_type' => NULL,
'tax_rate' => '0.00',
'tax_exempt' => true,
'tax_exemption_reason' => NULL,
'has_analytics' => false,
'has_marketing' => false,
'has_manufacturing' => false,
'has_processing' => false,
'parent_id' => 2,
'division_name' => 'Curagreen',
'has_inventory' => false,
'marketing_test_mode' => true,
'marketing_test_emails' => NULL,
'marketing_test_phones' => NULL,
'copilot_enabled' => false,
'has_accounting' => false,
'has_compliance' => false,
'has_assemblies' => false,
'marketing_enabled' => false,
'marketing_tier' => NULL,
),
3 =>
array (
'id' => 6,
'name' => 'Leopard AZ',
'industry_type' => NULL,
'referral_code' => NULL,
'is_active' => true,
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-24 03:22:34',
'deleted_at' => NULL,
'business_group' => NULL,
'onboarding_completed' => true,
'payment_method' => NULL,
'delivery_unit' => NULL,
'delivery_directions' => NULL,
'delivery_preferences' => NULL,
'delivery_schedule' => NULL,
'buyer_name' => NULL,
'buyer_phone' => NULL,
'buyer_email' => NULL,
'preferred_contact_method' => NULL,
'ato_document_path' => NULL,
'tpt_document_path' => NULL,
'form_5000a_path' => NULL,
'setup_completed_at' => NULL,
'setup_progress' => NULL,
'cannabis_license_path' => NULL,
'w9_form_path' => NULL,
'insurance_certificate_path' => NULL,
'business_license_path' => NULL,
'compliance_documents_updated_at' => NULL,
'physical_city' => 'Tempe',
'physical_state' => 'AZ',
'physical_zipcode' => '85281',
'business_phone' => '(480) 555-9876',
'business_email' => 'info@cannabrands.com',
'ap_contact_phone' => NULL,
'ap_contact_email' => NULL,
'ap_contact_sms' => NULL,
'ap_preferred_contact_method' => NULL,
'delivery_contact_phone' => NULL,
'delivery_contact_email' => NULL,
'delivery_contact_sms' => NULL,
'physical_address' => '5678 Industrial Parkway',
'license_number' => 'AZ-M-87654321',
'billing_address' => NULL,
'billing_city' => NULL,
'billing_state' => NULL,
'billing_zipcode' => NULL,
'shipping_address' => NULL,
'shipping_city' => NULL,
'shipping_state' => NULL,
'shipping_zipcode' => NULL,
'type' => 'seller',
'slug' => 'leopard-az',
'tin_ein' => '85-7654321',
'dba_name' => NULL,
'business_type' => 'processor',
'ap_contact_first_name' => NULL,
'ap_contact_last_name' => NULL,
'delivery_contact_first_name' => NULL,
'delivery_contact_last_name' => NULL,
'resale_certificate_path' => NULL,
'application_submitted_at' => NULL,
'owner_user_id' => 9,
'status' => 'approved',
'rejected_at' => NULL,
'rejection_reason' => NULL,
'description' => 'Packaging and manufacturing division',
'commission_rate' => NULL,
'credit_limit' => NULL,
'notes' => NULL,
'approved_at' => '2025-11-23 19:42:24',
'approved_by' => NULL,
'primary_contact_first_name' => NULL,
'primary_contact_last_name' => NULL,
'primary_contact_email' => NULL,
'primary_contact_phone' => NULL,
'uuid' => '3b4ba074-7aa9-4580',
'license_type' => NULL,
'tax_rate' => '0.00',
'tax_exempt' => true,
'tax_exemption_reason' => NULL,
'has_analytics' => false,
'has_marketing' => false,
'has_manufacturing' => false,
'has_processing' => false,
'parent_id' => 2,
'division_name' => 'Leopard AZ',
'has_inventory' => false,
'marketing_test_mode' => true,
'marketing_test_emails' => NULL,
'marketing_test_phones' => NULL,
'copilot_enabled' => false,
'has_accounting' => false,
'has_compliance' => false,
'has_assemblies' => false,
'marketing_enabled' => false,
'marketing_tier' => NULL,
),
4 =>
array (
'id' => 2,
'name' => 'Canopy AZ LLC',
'industry_type' => 'brand',
'referral_code' => NULL,
'is_active' => true,
'created_at' => '2025-11-23 19:42:23',
'updated_at' => '2025-11-24 03:21:38',
'deleted_at' => NULL,
'business_group' => NULL,
'onboarding_completed' => true,
'payment_method' => NULL,
'delivery_unit' => NULL,
'delivery_directions' => NULL,
'delivery_preferences' => NULL,
'delivery_schedule' => NULL,
'buyer_name' => NULL,
'buyer_phone' => NULL,
'buyer_email' => NULL,
'preferred_contact_method' => 'email',
'ato_document_path' => NULL,
'tpt_document_path' => NULL,
'form_5000a_path' => NULL,
'setup_completed_at' => '2025-11-23 19:42:23',
'setup_progress' => NULL,
'cannabis_license_path' => 'businesses/34b2a898-dbbe-4ec3/compliance/cannabis-license.pdf',
'w9_form_path' => 'businesses/34b2a898-dbbe-4ec3/compliance/w9-form.pdf',
'insurance_certificate_path' => 'businesses/34b2a898-dbbe-4ec3/compliance/insurance.pdf',
'business_license_path' => 'businesses/34b2a898-dbbe-4ec3/compliance/business-license.pdf',
'compliance_documents_updated_at' => '2025-11-23 19:42:23',
'physical_city' => 'Tempe',
'physical_state' => 'AZ',
'physical_zipcode' => '85281',
'business_phone' => NULL,
'business_email' => NULL,
'ap_contact_phone' => '(480) 555-9877',
'ap_contact_email' => 'ap@cannabrands.com',
'ap_contact_sms' => NULL,
'ap_preferred_contact_method' => NULL,
'delivery_contact_phone' => '(480) 555-9878',
'delivery_contact_email' => NULL,
'delivery_contact_sms' => NULL,
'physical_address' => '5678 Industrial Parkway',
'license_number' => 'AZ-M-87654321',
'billing_address' => '5678 Industrial Parkway',
'billing_city' => 'Tempe',
'billing_state' => 'AZ',
'billing_zipcode' => '85281',
'shipping_address' => '5678 Industrial Parkway',
'shipping_city' => 'Tempe',
'shipping_state' => 'AZ',
'shipping_zipcode' => '85281',
'type' => 'seller',
'slug' => 'canopy',
'tin_ein' => '85-7654321',
'dba_name' => NULL,
'business_type' => 'brand',
'ap_contact_first_name' => 'Jennifer',
'ap_contact_last_name' => 'Martinez',
'delivery_contact_first_name' => 'Robert',
'delivery_contact_last_name' => 'Chen',
'resale_certificate_path' => NULL,
'application_submitted_at' => '2025-11-22 19:42:23',
'owner_user_id' => 7,
'status' => 'approved',
'rejected_at' => NULL,
'rejection_reason' => NULL,
'description' => 'Multi-brand cannabis manufacturer offering premium flower, concentrates, edibles, vapes, and beverages.',
'commission_rate' => '15.00',
'credit_limit' => NULL,
'notes' => NULL,
'approved_at' => '2025-11-23 19:42:23',
'approved_by' => 4,
'primary_contact_first_name' => 'Seller',
'primary_contact_last_name' => 'User',
'primary_contact_email' => 'seller@example.com',
'primary_contact_phone' => '(480) 555-9876',
'uuid' => '34b2a898-dbbe-4ec3',
'license_type' => NULL,
'tax_rate' => '0.00',
'tax_exempt' => true,
'tax_exemption_reason' => NULL,
'has_analytics' => false,
'has_marketing' => false,
'has_manufacturing' => true,
'has_processing' => false,
'parent_id' => NULL,
'division_name' => NULL,
'has_inventory' => false,
'marketing_test_mode' => true,
'marketing_test_emails' => NULL,
'marketing_test_phones' => NULL,
'copilot_enabled' => false,
'has_accounting' => false,
'has_compliance' => false,
'has_assemblies' => false,
'marketing_enabled' => false,
'marketing_tier' => NULL,
),
5 =>
array (
'id' => 4,
'name' => 'Cannabrands',
'industry_type' => NULL,
'referral_code' => NULL,
'is_active' => true,
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-24 19:44:31',
'deleted_at' => NULL,
'business_group' => NULL,
'onboarding_completed' => true,
'payment_method' => NULL,
'delivery_unit' => NULL,
'delivery_directions' => NULL,
'delivery_preferences' => NULL,
'delivery_schedule' => NULL,
'buyer_name' => NULL,
'buyer_phone' => NULL,
'buyer_email' => NULL,
'preferred_contact_method' => NULL,
'ato_document_path' => NULL,
'tpt_document_path' => NULL,
'form_5000a_path' => NULL,
'setup_completed_at' => NULL,
'setup_progress' => NULL,
'cannabis_license_path' => NULL,
'w9_form_path' => NULL,
'insurance_certificate_path' => NULL,
'business_license_path' => NULL,
'compliance_documents_updated_at' => NULL,
'physical_city' => 'Tempe',
'physical_state' => 'AZ',
'physical_zipcode' => '85281',
'business_phone' => '(480) 555-9876',
'business_email' => 'info@cannabrands.com',
'ap_contact_phone' => NULL,
'ap_contact_email' => NULL,
'ap_contact_sms' => NULL,
'ap_preferred_contact_method' => NULL,
'delivery_contact_phone' => NULL,
'delivery_contact_email' => NULL,
'delivery_contact_sms' => NULL,
'physical_address' => '5678 Industrial Parkway',
'license_number' => 'AZ-M-87654321',
'billing_address' => NULL,
'billing_city' => NULL,
'billing_state' => NULL,
'billing_zipcode' => NULL,
'shipping_address' => NULL,
'shipping_city' => NULL,
'shipping_state' => NULL,
'shipping_zipcode' => NULL,
'type' => 'seller',
'slug' => 'cannabrands',
'tin_ein' => '85-7654321',
'dba_name' => NULL,
'business_type' => 'brand',
'ap_contact_first_name' => NULL,
'ap_contact_last_name' => NULL,
'delivery_contact_first_name' => NULL,
'delivery_contact_last_name' => NULL,
'resale_certificate_path' => NULL,
'application_submitted_at' => NULL,
'owner_user_id' => 6,
'status' => 'approved',
'rejected_at' => NULL,
'rejection_reason' => NULL,
'description' => 'Sales and marketing division',
'commission_rate' => NULL,
'credit_limit' => NULL,
'notes' => NULL,
'approved_at' => '2025-11-23 19:42:24',
'approved_by' => NULL,
'primary_contact_first_name' => NULL,
'primary_contact_last_name' => NULL,
'primary_contact_email' => NULL,
'primary_contact_phone' => NULL,
'uuid' => 'f7765ed3-8b0d-4591',
'license_type' => NULL,
'tax_rate' => '0.00',
'tax_exempt' => true,
'tax_exemption_reason' => NULL,
'has_analytics' => false,
'has_marketing' => true,
'has_manufacturing' => false,
'has_processing' => false,
'parent_id' => 2,
'division_name' => 'Cannabrands',
'has_inventory' => false,
'marketing_test_mode' => true,
'marketing_test_emails' => NULL,
'marketing_test_phones' => NULL,
'copilot_enabled' => false,
'has_accounting' => false,
'has_compliance' => false,
'has_assemblies' => false,
'marketing_enabled' => false,
'marketing_tier' => NULL,
),
));
}
}

View File

@@ -0,0 +1,130 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class ComponentsTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('components')->delete();
\DB::table('components')->insert(array (
0 =>
array (
'id' => 1,
'name' => 'Blue Dream Flower (Raw)',
'slug' => 'blue-dream-flower-raw',
'sku' => 'COMP-BD-FL',
'description' => 'Raw cannabis flower for pre-roll production',
'type' => 'flower',
'cost_per_unit' => '800.00',
'unit_of_measure' => 'oz',
'quantity_on_hand' => 0,
'reorder_point' => NULL,
'reorder_quantity' => 50,
'vendor_name' => NULL,
'vendor_sku' => NULL,
'lead_time_days' => NULL,
'is_active' => true,
'created_at' => '2025-11-23 19:42:23',
'updated_at' => '2025-11-23 19:42:23',
'deleted_at' => NULL,
'hashid' => '89kb5',
'business_id' => 2,
'is_sellable' => false,
'image_path' => NULL,
'component_category_id' => NULL,
),
1 =>
array (
'id' => 2,
'name' => 'King Size Pre-roll Cones',
'slug' => 'king-size-pre-roll-cones',
'sku' => 'COMP-CONE-KS',
'description' => 'Hemp paper pre-roll cones with filter',
'type' => 'packaging',
'cost_per_unit' => '0.15',
'unit_of_measure' => 'each',
'quantity_on_hand' => 0,
'reorder_point' => NULL,
'reorder_quantity' => 5000,
'vendor_name' => 'Paper Products Inc',
'vendor_sku' => NULL,
'lead_time_days' => NULL,
'is_active' => true,
'created_at' => '2025-11-23 19:42:23',
'updated_at' => '2025-11-23 19:42:23',
'deleted_at' => NULL,
'hashid' => '45ra2',
'business_id' => 2,
'is_sellable' => false,
'image_path' => NULL,
'component_category_id' => NULL,
),
2 =>
array (
'id' => 3,
'name' => 'Clear Pre-roll Tubes',
'slug' => 'clear-pre-roll-tubes',
'sku' => 'COMP-TUBE-CLR',
'description' => 'Child-resistant clear tubes for pre-roll packaging',
'type' => 'packaging',
'cost_per_unit' => '0.25',
'unit_of_measure' => 'each',
'quantity_on_hand' => 0,
'reorder_point' => NULL,
'reorder_quantity' => 2500,
'vendor_name' => 'Cannabis Packaging Co',
'vendor_sku' => NULL,
'lead_time_days' => NULL,
'is_active' => true,
'created_at' => '2025-11-23 19:42:23',
'updated_at' => '2025-11-23 19:42:23',
'deleted_at' => NULL,
'hashid' => '63qv7',
'business_id' => 2,
'is_sellable' => false,
'image_path' => NULL,
'component_category_id' => NULL,
),
3 =>
array (
'id' => 4,
'name' => 'THC Distillate Oil',
'slug' => 'thc-distillate-oil',
'sku' => 'COMP-OIL-THC',
'description' => 'Pure THC distillate for edible production',
'type' => 'concentrate',
'cost_per_unit' => '8.00',
'unit_of_measure' => 'gram',
'quantity_on_hand' => 0,
'reorder_point' => NULL,
'reorder_quantity' => 500,
'vendor_name' => NULL,
'vendor_sku' => NULL,
'lead_time_days' => NULL,
'is_active' => true,
'created_at' => '2025-11-23 19:42:23',
'updated_at' => '2025-11-23 19:42:23',
'deleted_at' => NULL,
'hashid' => '16fz7',
'business_id' => 2,
'is_sellable' => false,
'image_path' => NULL,
'component_category_id' => NULL,
),
));
}
}

View File

@@ -0,0 +1,261 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class ContactsTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('contacts')->delete();
\DB::table('contacts')->insert(array (
0 =>
array (
'id' => 1,
'business_id' => 1,
'location_id' => NULL,
'user_id' => 2,
'first_name' => 'Buyer',
'last_name' => 'User',
'title' => NULL,
'position' => 'Owner & Purchasing Manager',
'department' => NULL,
'email' => 'buyer@example.com',
'phone' => '(602) 555-1234',
'mobile' => '(602) 555-1299',
'fax' => NULL,
'extension' => NULL,
'contact_type' => 'owner',
'responsibilities' => NULL,
'permissions' => NULL,
'preferred_contact_method' => 'email',
'communication_preferences' => NULL,
'language_preference' => NULL,
'timezone' => NULL,
'work_hours' => NULL,
'availability_notes' => NULL,
'emergency_contact' => NULL,
'is_primary' => true,
'is_active' => true,
'is_emergency_contact' => false,
'can_approve_orders' => true,
'can_receive_invoices' => true,
'can_place_orders' => true,
'receive_notifications' => true,
'receive_marketing' => false,
'notes' => 'Primary business owner and main purchasing contact',
'last_contact_date' => NULL,
'next_followup_date' => NULL,
'relationship_notes' => NULL,
'archived_at' => NULL,
'archived_reason' => NULL,
'created_by' => 4,
'updated_by' => NULL,
'created_at' => '2025-11-23 19:42:22',
'updated_at' => '2025-11-23 19:42:22',
'deleted_at' => NULL,
'hashid' => '74ca5',
),
1 =>
array (
'id' => 2,
'business_id' => 1,
'location_id' => NULL,
'user_id' => NULL,
'first_name' => 'Sarah',
'last_name' => 'Johnson',
'title' => NULL,
'position' => 'Accounts Payable Manager',
'department' => NULL,
'email' => 'ap@greenleafdispensary.com',
'phone' => '(602) 555-1235',
'mobile' => '(602) 555-1298',
'fax' => NULL,
'extension' => NULL,
'contact_type' => 'accounts_payable',
'responsibilities' => NULL,
'permissions' => NULL,
'preferred_contact_method' => 'email',
'communication_preferences' => NULL,
'language_preference' => NULL,
'timezone' => NULL,
'work_hours' => NULL,
'availability_notes' => NULL,
'emergency_contact' => NULL,
'is_primary' => false,
'is_active' => true,
'is_emergency_contact' => false,
'can_approve_orders' => false,
'can_receive_invoices' => true,
'can_place_orders' => false,
'receive_notifications' => true,
'receive_marketing' => false,
'notes' => 'Handles all invoice payments and vendor inquiries',
'last_contact_date' => NULL,
'next_followup_date' => NULL,
'relationship_notes' => NULL,
'archived_at' => NULL,
'archived_reason' => NULL,
'created_by' => 4,
'updated_by' => NULL,
'created_at' => '2025-11-23 19:42:22',
'updated_at' => '2025-11-23 19:42:22',
'deleted_at' => NULL,
'hashid' => '25mc3',
),
2 =>
array (
'id' => 3,
'business_id' => 1,
'location_id' => NULL,
'user_id' => NULL,
'first_name' => 'Mike',
'last_name' => 'Davis',
'title' => NULL,
'position' => 'Receiving Manager',
'department' => NULL,
'email' => 'mike.davis@greenleafdispensary.com',
'phone' => '(602) 555-1236',
'mobile' => '(602) 555-1297',
'fax' => NULL,
'extension' => NULL,
'contact_type' => 'receiving',
'responsibilities' => NULL,
'permissions' => NULL,
'preferred_contact_method' => 'phone',
'communication_preferences' => NULL,
'language_preference' => NULL,
'timezone' => NULL,
'work_hours' => '{"monday":{"start":"07:00","end":"15:00"},"tuesday":{"start":"07:00","end":"15:00"},"wednesday":{"start":"07:00","end":"15:00"},"thursday":{"start":"07:00","end":"15:00"},"friday":{"start":"07:00","end":"15:00"}}',
'availability_notes' => NULL,
'emergency_contact' => NULL,
'is_primary' => false,
'is_active' => true,
'is_emergency_contact' => true,
'can_approve_orders' => false,
'can_receive_invoices' => false,
'can_place_orders' => false,
'receive_notifications' => true,
'receive_marketing' => false,
'notes' => 'Coordinates all deliveries. Available 7am-3pm weekdays at loading dock.',
'last_contact_date' => NULL,
'next_followup_date' => NULL,
'relationship_notes' => NULL,
'archived_at' => NULL,
'archived_reason' => NULL,
'created_by' => 4,
'updated_by' => NULL,
'created_at' => '2025-11-23 19:42:23',
'updated_at' => '2025-11-23 19:42:23',
'deleted_at' => NULL,
'hashid' => '66xb5',
),
3 =>
array (
'id' => 4,
'business_id' => 1,
'location_id' => NULL,
'user_id' => NULL,
'first_name' => 'Lisa',
'last_name' => 'Martinez',
'title' => NULL,
'position' => 'General Manager',
'department' => NULL,
'email' => 'lisa.martinez@greenleafdispensary.com',
'phone' => '(602) 555-1237',
'mobile' => '(602) 555-1296',
'fax' => NULL,
'extension' => NULL,
'contact_type' => 'manager',
'responsibilities' => NULL,
'permissions' => NULL,
'preferred_contact_method' => 'sms',
'communication_preferences' => NULL,
'language_preference' => NULL,
'timezone' => NULL,
'work_hours' => NULL,
'availability_notes' => NULL,
'emergency_contact' => NULL,
'is_primary' => false,
'is_active' => true,
'is_emergency_contact' => false,
'can_approve_orders' => true,
'can_receive_invoices' => false,
'can_place_orders' => false,
'receive_notifications' => true,
'receive_marketing' => false,
'notes' => 'Day-to-day operations manager. Secondary approval authority.',
'last_contact_date' => NULL,
'next_followup_date' => NULL,
'relationship_notes' => NULL,
'archived_at' => NULL,
'archived_reason' => NULL,
'created_by' => 4,
'updated_by' => NULL,
'created_at' => '2025-11-23 19:42:23',
'updated_at' => '2025-11-23 19:42:23',
'deleted_at' => NULL,
'hashid' => '66nu2',
),
4 =>
array (
'id' => 5,
'business_id' => 1,
'location_id' => NULL,
'user_id' => NULL,
'first_name' => 'James',
'last_name' => 'Wong',
'title' => NULL,
'position' => 'Compliance Officer',
'department' => NULL,
'email' => 'james.wong@greenleafdispensary.com',
'phone' => '(602) 555-1238',
'mobile' => NULL,
'fax' => NULL,
'extension' => NULL,
'contact_type' => 'compliance',
'responsibilities' => NULL,
'permissions' => NULL,
'preferred_contact_method' => 'email',
'communication_preferences' => NULL,
'language_preference' => NULL,
'timezone' => NULL,
'work_hours' => NULL,
'availability_notes' => NULL,
'emergency_contact' => NULL,
'is_primary' => false,
'is_active' => true,
'is_emergency_contact' => false,
'can_approve_orders' => false,
'can_receive_invoices' => false,
'can_place_orders' => false,
'receive_notifications' => false,
'receive_marketing' => false,
'notes' => 'Manages all regulatory compliance and licensing matters',
'last_contact_date' => NULL,
'next_followup_date' => NULL,
'relationship_notes' => NULL,
'archived_at' => NULL,
'archived_reason' => NULL,
'created_by' => 4,
'updated_by' => NULL,
'created_at' => '2025-11-23 19:42:23',
'updated_at' => '2025-11-23 19:42:23',
'deleted_at' => NULL,
'hashid' => '73vk4',
),
));
}
}

View File

@@ -0,0 +1,156 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class DepartmentsTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('departments')->delete();
\DB::table('departments')->insert(array (
0 =>
array (
'id' => 1,
'business_id' => 2,
'name' => 'General',
'description' => 'Default department for products',
'is_active' => true,
'sort_order' => 0,
'created_at' => '2025-11-23 19:42:23',
'updated_at' => '2025-11-23 19:42:23',
'code' => NULL,
'capabilities' => NULL,
),
1 =>
array (
'id' => 2,
'business_id' => 2,
'name' => 'Flower',
'description' => 'Dried cannabis flower products',
'is_active' => true,
'sort_order' => 1,
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'code' => NULL,
'capabilities' => NULL,
),
2 =>
array (
'id' => 3,
'business_id' => 2,
'name' => 'Pre-Rolls',
'description' => 'Pre-rolled cannabis joints and blunts',
'is_active' => true,
'sort_order' => 2,
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'code' => NULL,
'capabilities' => NULL,
),
3 =>
array (
'id' => 4,
'business_id' => 2,
'name' => 'Concentrates',
'description' => 'Cannabis extracts and concentrates',
'is_active' => true,
'sort_order' => 3,
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'code' => NULL,
'capabilities' => NULL,
),
4 =>
array (
'id' => 5,
'business_id' => 2,
'name' => 'Edibles',
'description' => 'Cannabis-infused food products',
'is_active' => true,
'sort_order' => 4,
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'code' => NULL,
'capabilities' => NULL,
),
5 =>
array (
'id' => 6,
'business_id' => 2,
'name' => 'Vapes',
'description' => 'Vape cartridges and disposables',
'is_active' => true,
'sort_order' => 5,
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'code' => NULL,
'capabilities' => NULL,
),
6 =>
array (
'id' => 7,
'business_id' => 2,
'name' => 'Topicals',
'description' => 'Topical cannabis products',
'is_active' => true,
'sort_order' => 6,
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'code' => NULL,
'capabilities' => NULL,
),
7 =>
array (
'id' => 8,
'business_id' => 2,
'name' => 'Tinctures',
'description' => 'Cannabis tinctures and oils',
'is_active' => true,
'sort_order' => 7,
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'code' => NULL,
'capabilities' => NULL,
),
8 =>
array (
'id' => 9,
'business_id' => 2,
'name' => 'Accessories',
'description' => 'Smoking accessories and merchandise',
'is_active' => true,
'sort_order' => 8,
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'code' => NULL,
'capabilities' => NULL,
),
9 =>
array (
'id' => 10,
'business_id' => 4,
'name' => 'General',
'description' => 'Default department for products',
'is_active' => true,
'sort_order' => 0,
'created_at' => '2025-11-24 17:27:26',
'updated_at' => '2025-11-24 17:27:26',
'code' => NULL,
'capabilities' => NULL,
),
));
}
}

View File

@@ -0,0 +1,86 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class InvoicesTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('invoices')->delete();
\DB::table('invoices')->insert(array (
0 =>
array (
'id' => 1,
'invoice_number' => 'INV-692363A0244CA',
'order_id' => 5,
'business_id' => 1,
'subtotal' => '1650.00',
'tax' => '148.50',
'total' => '1798.50',
'payment_status' => 'unpaid',
'amount_paid' => '0.00',
'amount_due' => '1798.50',
'invoice_date' => '2025-11-20',
'due_date' => '2025-12-20',
'pdf_path' => NULL,
'notes' => NULL,
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'deleted_at' => NULL,
),
1 =>
array (
'id' => 2,
'invoice_number' => 'INV-692363A029160',
'order_id' => 6,
'business_id' => 1,
'subtotal' => '2640.00',
'tax' => '237.60',
'total' => '2877.60',
'payment_status' => 'unpaid',
'amount_paid' => '0.00',
'amount_due' => '2877.60',
'invoice_date' => '2025-10-19',
'due_date' => '2025-11-18',
'pdf_path' => NULL,
'notes' => NULL,
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'deleted_at' => NULL,
),
2 =>
array (
'id' => 3,
'invoice_number' => 'INV-692363A02D4B0',
'order_id' => 7,
'business_id' => 1,
'subtotal' => '440.00',
'tax' => '39.60',
'total' => '479.60',
'payment_status' => 'paid',
'amount_paid' => '479.60',
'amount_due' => '0.00',
'invoice_date' => '2025-11-08',
'due_date' => '2025-12-08',
'pdf_path' => NULL,
'notes' => NULL,
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'deleted_at' => NULL,
),
));
}
}

View File

@@ -0,0 +1,24 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class LabsTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('labs')->delete();
}
}

View File

@@ -0,0 +1,112 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class LocationsTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('locations')->delete();
\DB::table('locations')->insert(array (
0 =>
array (
'id' => 1,
'business_id' => 1,
'name' => 'GreenLeaf Dispensary - Main Location',
'slug' => 'greenleaf-dispensary-main-location',
'location_type' => 'dispensary',
'description' => NULL,
'address' => '1234 Main Street',
'unit' => NULL,
'city' => 'Phoenix',
'state' => 'AZ',
'zipcode' => '85001',
'country' => 'USA',
'phone' => '(602) 555-1234',
'email' => 'info@greenleafdispensary.com',
'fax' => NULL,
'website' => NULL,
'hours_of_operation' => NULL,
'timezone' => NULL,
'capacity' => NULL,
'square_footage' => NULL,
'license_number' => 'AZ-R-12345678',
'license_type' => NULL,
'license_status' => NULL,
'license_expiration' => NULL,
'accepts_deliveries' => true,
'delivery_instructions' => 'Use rear loading dock entrance',
'delivery_hours' => NULL,
'loading_dock_available' => false,
'parking_instructions' => NULL,
'is_primary' => true,
'is_active' => true,
'is_public' => true,
'archived_at' => NULL,
'archived_reason' => NULL,
'transferred_to_business_id' => NULL,
'settings' => NULL,
'notes' => NULL,
'created_at' => '2025-11-23 19:42:22',
'updated_at' => '2025-11-23 19:42:22',
'deleted_at' => NULL,
),
1 =>
array (
'id' => 2,
'business_id' => 2,
'name' => 'Desert Bloom Brands - Production Facility',
'slug' => 'desert-bloom-brands-production-facility',
'location_type' => 'manufacturing',
'description' => NULL,
'address' => '5678 Industrial Parkway',
'unit' => NULL,
'city' => 'Tempe',
'state' => 'AZ',
'zipcode' => '85281',
'country' => 'USA',
'phone' => '(480) 555-9876',
'email' => 'info@cannabrands.com',
'fax' => NULL,
'website' => NULL,
'hours_of_operation' => NULL,
'timezone' => NULL,
'capacity' => NULL,
'square_footage' => NULL,
'license_number' => 'AZ-M-87654321',
'license_type' => NULL,
'license_status' => NULL,
'license_expiration' => NULL,
'accepts_deliveries' => true,
'delivery_instructions' => NULL,
'delivery_hours' => NULL,
'loading_dock_available' => false,
'parking_instructions' => NULL,
'is_primary' => true,
'is_active' => true,
'is_public' => false,
'archived_at' => NULL,
'archived_reason' => NULL,
'transferred_to_business_id' => NULL,
'settings' => NULL,
'notes' => NULL,
'created_at' => '2025-11-23 19:42:23',
'updated_at' => '2025-11-23 19:42:23',
'deleted_at' => NULL,
),
));
}
}

View File

@@ -0,0 +1,24 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class ModelHasPermissionsTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('model_has_permissions')->delete();
}
}

View File

@@ -0,0 +1,56 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class ModelHasRolesTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('model_has_roles')->delete();
\DB::table('model_has_roles')->insert(array (
0 =>
array (
'role_id' => 1,
'model_type' => 'App\\Models\\User',
'model_id' => 1,
),
1 =>
array (
'role_id' => 7,
'model_type' => 'App\\Models\\User',
'model_id' => 2,
),
2 =>
array (
'role_id' => 4,
'model_type' => 'App\\Models\\User',
'model_id' => 3,
),
3 =>
array (
'role_id' => 1,
'model_type' => 'App\\Models\\User',
'model_id' => 4,
),
4 =>
array (
'role_id' => 7,
'model_type' => 'App\\Models\\User',
'model_id' => 5,
),
));
}
}

View File

@@ -0,0 +1,194 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class OrderItemsTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('order_items')->delete();
\DB::table('order_items')->insert(array (
0 =>
array (
'id' => 1,
'order_id' => 1,
'product_id' => 1,
'quantity' => 3,
'unit_price' => '1200.00',
'line_total' => '3600.00',
'product_name' => 'Pineapple Express',
'product_sku' => 'CRSO-001',
'brand_name' => 'Canna RSO',
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'picked_qty' => 0,
'accepted_qty' => 0,
'rejected_qty' => 0,
'rejection_reason' => NULL,
'batch_id' => NULL,
'batch_number' => NULL,
'delivered_qty' => NULL,
'pre_delivery_status' => NULL,
'pre_delivery_rejection_status' => NULL,
'pre_delivery_rejection_reason' => NULL,
),
1 =>
array (
'id' => 2,
'order_id' => 2,
'product_id' => 2,
'quantity' => 2,
'unit_price' => '1400.00',
'line_total' => '2800.00',
'product_name' => 'Black Tuna',
'product_sku' => 'CRSO-002',
'brand_name' => 'Canna RSO',
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'picked_qty' => 0,
'accepted_qty' => 0,
'rejected_qty' => 0,
'rejection_reason' => NULL,
'batch_id' => NULL,
'batch_number' => NULL,
'delivered_qty' => NULL,
'pre_delivery_status' => NULL,
'pre_delivery_rejection_status' => NULL,
'pre_delivery_rejection_reason' => NULL,
),
2 =>
array (
'id' => 3,
'order_id' => 3,
'product_id' => 4,
'quantity' => 10,
'unit_price' => '25.00',
'line_total' => '250.00',
'product_name' => 'Gelato',
'product_sku' => 'CRSO-004',
'brand_name' => 'Hash Factory',
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'picked_qty' => 6,
'accepted_qty' => 0,
'rejected_qty' => 0,
'rejection_reason' => NULL,
'batch_id' => NULL,
'batch_number' => NULL,
'delivered_qty' => NULL,
'pre_delivery_status' => NULL,
'pre_delivery_rejection_status' => NULL,
'pre_delivery_rejection_reason' => NULL,
),
3 =>
array (
'id' => 4,
'order_id' => 4,
'product_id' => 6,
'quantity' => 20,
'unit_price' => '8.00',
'line_total' => '160.00',
'product_name' => 'Blue Dream',
'product_sku' => 'DOBZ-001',
'brand_name' => 'Doobz',
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'picked_qty' => 0,
'accepted_qty' => 0,
'rejected_qty' => 0,
'rejection_reason' => NULL,
'batch_id' => 7,
'batch_number' => NULL,
'delivered_qty' => NULL,
'pre_delivery_status' => NULL,
'pre_delivery_rejection_status' => NULL,
'pre_delivery_rejection_reason' => NULL,
),
4 =>
array (
'id' => 5,
'order_id' => 5,
'product_id' => 3,
'quantity' => 1,
'unit_price' => '1500.00',
'line_total' => '1500.00',
'product_name' => 'Blue Dream',
'product_sku' => 'CRSO-003',
'brand_name' => 'Canna RSO',
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'picked_qty' => 1,
'accepted_qty' => 0,
'rejected_qty' => 0,
'rejection_reason' => NULL,
'batch_id' => NULL,
'batch_number' => NULL,
'delivered_qty' => NULL,
'pre_delivery_status' => NULL,
'pre_delivery_rejection_status' => NULL,
'pre_delivery_rejection_reason' => NULL,
),
5 =>
array (
'id' => 6,
'order_id' => 6,
'product_id' => 1,
'quantity' => 2,
'unit_price' => '1200.00',
'line_total' => '2400.00',
'product_name' => 'Pineapple Express',
'product_sku' => 'CRSO-001',
'brand_name' => 'Canna RSO',
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'picked_qty' => 2,
'accepted_qty' => 0,
'rejected_qty' => 0,
'rejection_reason' => NULL,
'batch_id' => NULL,
'batch_number' => NULL,
'delivered_qty' => NULL,
'pre_delivery_status' => NULL,
'pre_delivery_rejection_status' => NULL,
'pre_delivery_rejection_reason' => NULL,
),
6 =>
array (
'id' => 7,
'order_id' => 7,
'product_id' => 5,
'quantity' => 20,
'unit_price' => '20.00',
'line_total' => '400.00',
'product_name' => 'GG#4',
'product_sku' => 'CRSO-005',
'brand_name' => 'Hash Factory',
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'picked_qty' => 20,
'accepted_qty' => 0,
'rejected_qty' => 0,
'rejection_reason' => NULL,
'batch_id' => NULL,
'batch_number' => NULL,
'delivered_qty' => NULL,
'pre_delivery_status' => NULL,
'pre_delivery_rejection_status' => NULL,
'pre_delivery_rejection_reason' => NULL,
),
));
}
}

View File

@@ -0,0 +1,453 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class OrdersTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('orders')->delete();
\DB::table('orders')->insert(array (
0 =>
array (
'id' => 1,
'order_number' => 'ORD-DEV-001',
'business_id' => 1,
'user_id' => 2,
'location_id' => NULL,
'subtotal' => '3600.00',
'tax' => '356.40',
'total' => '4316.40',
'status' => 'new',
'payment_terms' => 'net_30',
'due_date' => '2025-12-23',
'notes' => 'Please deliver to rear loading dock',
'accepted_at' => NULL,
'delivered_at' => NULL,
'cancelled_at' => NULL,
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'deleted_at' => NULL,
'invoiced_at' => NULL,
'manifest_created_at' => NULL,
'ready_for_delivery_at' => NULL,
'in_progress_at' => NULL,
'ready_for_invoice_at' => NULL,
'workorder_status' => '0.00',
'created_by' => 'buyer',
'picking_ticket_number' => NULL,
'cancelled_by' => NULL,
'cancellation_reason' => NULL,
'rejected_at' => NULL,
'rejected_reason' => NULL,
'amendment_in_progress_at' => NULL,
'amendment_completed_at' => NULL,
'amendment_completed_by' => NULL,
'delivery_method' => 'delivery',
'pickup_driver_first_name' => NULL,
'pickup_driver_last_name' => NULL,
'pickup_driver_license' => NULL,
'pickup_driver_phone' => NULL,
'pickup_vehicle_plate' => NULL,
'contact_id' => NULL,
'surcharge' => '360.00',
'awaiting_buyer_approval_at' => NULL,
'buyer_approved_at' => NULL,
'buyer_approved_by' => NULL,
'buyer_approval_notes' => NULL,
'delivery_date' => NULL,
'delivery_instructions' => NULL,
'order_group_id' => NULL,
'seller_business_id' => 2,
'delivery_window_id' => NULL,
'delivery_window_date' => NULL,
'invoice_created_at' => NULL,
'pickup_date' => NULL,
'delivery_notes' => NULL,
'finalized_at' => NULL,
'finalized_by_user_id' => NULL,
'approved_for_delivery_at' => NULL,
'remote_organisation_id' => NULL,
),
1 =>
array (
'id' => 2,
'order_number' => 'ORD-DEV-002',
'business_id' => 1,
'user_id' => 2,
'location_id' => NULL,
'subtotal' => '2800.00',
'tax' => '277.20',
'total' => '3357.20',
'status' => 'accepted',
'payment_terms' => 'net_30',
'due_date' => '2025-12-23',
'notes' => NULL,
'accepted_at' => '2025-11-23 17:42:24',
'delivered_at' => NULL,
'cancelled_at' => NULL,
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'deleted_at' => NULL,
'invoiced_at' => NULL,
'manifest_created_at' => NULL,
'ready_for_delivery_at' => NULL,
'in_progress_at' => NULL,
'ready_for_invoice_at' => NULL,
'workorder_status' => '0.00',
'created_by' => 'buyer',
'picking_ticket_number' => 'PT-A1B2C',
'cancelled_by' => NULL,
'cancellation_reason' => NULL,
'rejected_at' => NULL,
'rejected_reason' => NULL,
'amendment_in_progress_at' => NULL,
'amendment_completed_at' => NULL,
'amendment_completed_by' => NULL,
'delivery_method' => 'delivery',
'pickup_driver_first_name' => NULL,
'pickup_driver_last_name' => NULL,
'pickup_driver_license' => NULL,
'pickup_driver_phone' => NULL,
'pickup_vehicle_plate' => NULL,
'contact_id' => NULL,
'surcharge' => '280.00',
'awaiting_buyer_approval_at' => NULL,
'buyer_approved_at' => NULL,
'buyer_approved_by' => NULL,
'buyer_approval_notes' => NULL,
'delivery_date' => NULL,
'delivery_instructions' => NULL,
'order_group_id' => NULL,
'seller_business_id' => 2,
'delivery_window_id' => NULL,
'delivery_window_date' => NULL,
'invoice_created_at' => NULL,
'pickup_date' => NULL,
'delivery_notes' => NULL,
'finalized_at' => NULL,
'finalized_by_user_id' => NULL,
'approved_for_delivery_at' => NULL,
'remote_organisation_id' => NULL,
),
2 =>
array (
'id' => 3,
'order_number' => 'ORD-DEV-003',
'business_id' => 1,
'user_id' => 2,
'location_id' => NULL,
'subtotal' => '250.00',
'tax' => '24.75',
'total' => '299.75',
'status' => 'in_progress',
'payment_terms' => 'net_30',
'due_date' => '2025-12-23',
'notes' => NULL,
'accepted_at' => '2025-11-22 19:42:24',
'delivered_at' => NULL,
'cancelled_at' => NULL,
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'deleted_at' => NULL,
'invoiced_at' => NULL,
'manifest_created_at' => NULL,
'ready_for_delivery_at' => NULL,
'in_progress_at' => '2025-11-23 18:42:24',
'ready_for_invoice_at' => NULL,
'workorder_status' => '60.00',
'created_by' => 'buyer',
'picking_ticket_number' => 'PT-D3E4F',
'cancelled_by' => NULL,
'cancellation_reason' => NULL,
'rejected_at' => NULL,
'rejected_reason' => NULL,
'amendment_in_progress_at' => NULL,
'amendment_completed_at' => NULL,
'amendment_completed_by' => NULL,
'delivery_method' => 'delivery',
'pickup_driver_first_name' => NULL,
'pickup_driver_last_name' => NULL,
'pickup_driver_license' => NULL,
'pickup_driver_phone' => NULL,
'pickup_vehicle_plate' => NULL,
'contact_id' => NULL,
'surcharge' => '25.00',
'awaiting_buyer_approval_at' => NULL,
'buyer_approved_at' => NULL,
'buyer_approved_by' => NULL,
'buyer_approval_notes' => NULL,
'delivery_date' => NULL,
'delivery_instructions' => NULL,
'order_group_id' => NULL,
'seller_business_id' => 2,
'delivery_window_id' => NULL,
'delivery_window_date' => NULL,
'invoice_created_at' => NULL,
'pickup_date' => NULL,
'delivery_notes' => NULL,
'finalized_at' => NULL,
'finalized_by_user_id' => NULL,
'approved_for_delivery_at' => NULL,
'remote_organisation_id' => NULL,
),
3 =>
array (
'id' => 4,
'order_number' => 'ORD-DEV-004',
'business_id' => 1,
'user_id' => 2,
'location_id' => NULL,
'subtotal' => '160.00',
'tax' => '15.84',
'total' => '191.84',
'status' => 'in_progress',
'payment_terms' => 'net_30',
'due_date' => '2025-12-23',
'notes' => NULL,
'accepted_at' => '2025-11-21 19:42:24',
'delivered_at' => NULL,
'cancelled_at' => NULL,
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'deleted_at' => NULL,
'invoiced_at' => NULL,
'manifest_created_at' => NULL,
'ready_for_delivery_at' => NULL,
'in_progress_at' => '2025-11-22 17:42:24',
'ready_for_invoice_at' => NULL,
'workorder_status' => '0.00',
'created_by' => 'buyer',
'picking_ticket_number' => 'PT-G5H6J',
'cancelled_by' => NULL,
'cancellation_reason' => NULL,
'rejected_at' => NULL,
'rejected_reason' => NULL,
'amendment_in_progress_at' => NULL,
'amendment_completed_at' => NULL,
'amendment_completed_by' => NULL,
'delivery_method' => NULL,
'pickup_driver_first_name' => NULL,
'pickup_driver_last_name' => NULL,
'pickup_driver_license' => NULL,
'pickup_driver_phone' => NULL,
'pickup_vehicle_plate' => NULL,
'contact_id' => NULL,
'surcharge' => '16.00',
'awaiting_buyer_approval_at' => NULL,
'buyer_approved_at' => NULL,
'buyer_approved_by' => NULL,
'buyer_approval_notes' => NULL,
'delivery_date' => NULL,
'delivery_instructions' => NULL,
'order_group_id' => NULL,
'seller_business_id' => 2,
'delivery_window_id' => NULL,
'delivery_window_date' => NULL,
'invoice_created_at' => NULL,
'pickup_date' => NULL,
'delivery_notes' => NULL,
'finalized_at' => NULL,
'finalized_by_user_id' => NULL,
'approved_for_delivery_at' => NULL,
'remote_organisation_id' => NULL,
),
4 =>
array (
'id' => 5,
'order_number' => 'ORD-DEV-005',
'business_id' => 1,
'user_id' => 2,
'location_id' => NULL,
'subtotal' => '1500.00',
'tax' => '148.50',
'total' => '1798.50',
'status' => 'completed',
'payment_terms' => 'net_30',
'due_date' => '2025-12-16',
'notes' => NULL,
'accepted_at' => '2025-11-16 19:42:24',
'delivered_at' => '2025-11-20 19:42:24',
'cancelled_at' => NULL,
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'deleted_at' => NULL,
'invoiced_at' => NULL,
'manifest_created_at' => NULL,
'ready_for_delivery_at' => '2025-11-19 19:42:24',
'in_progress_at' => '2025-11-17 19:42:24',
'ready_for_invoice_at' => NULL,
'workorder_status' => '100.00',
'created_by' => 'buyer',
'picking_ticket_number' => 'PT-K7L8M',
'cancelled_by' => NULL,
'cancellation_reason' => NULL,
'rejected_at' => NULL,
'rejected_reason' => NULL,
'amendment_in_progress_at' => NULL,
'amendment_completed_at' => NULL,
'amendment_completed_by' => NULL,
'delivery_method' => 'delivery',
'pickup_driver_first_name' => NULL,
'pickup_driver_last_name' => NULL,
'pickup_driver_license' => NULL,
'pickup_driver_phone' => NULL,
'pickup_vehicle_plate' => NULL,
'contact_id' => NULL,
'surcharge' => '150.00',
'awaiting_buyer_approval_at' => NULL,
'buyer_approved_at' => NULL,
'buyer_approved_by' => NULL,
'buyer_approval_notes' => NULL,
'delivery_date' => NULL,
'delivery_instructions' => NULL,
'order_group_id' => NULL,
'seller_business_id' => 2,
'delivery_window_id' => NULL,
'delivery_window_date' => NULL,
'invoice_created_at' => NULL,
'pickup_date' => NULL,
'delivery_notes' => NULL,
'finalized_at' => '2025-11-20 19:42:24',
'finalized_by_user_id' => NULL,
'approved_for_delivery_at' => NULL,
'remote_organisation_id' => NULL,
),
5 =>
array (
'id' => 6,
'order_number' => 'ORD-DEV-006',
'business_id' => 1,
'user_id' => 2,
'location_id' => NULL,
'subtotal' => '2400.00',
'tax' => '237.60',
'total' => '2877.60',
'status' => 'delivered',
'payment_terms' => 'net_30',
'due_date' => '2025-11-13',
'notes' => NULL,
'accepted_at' => '2025-10-14 19:42:24',
'delivered_at' => '2025-10-19 19:42:24',
'cancelled_at' => NULL,
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'deleted_at' => NULL,
'invoiced_at' => NULL,
'manifest_created_at' => NULL,
'ready_for_delivery_at' => NULL,
'in_progress_at' => NULL,
'ready_for_invoice_at' => NULL,
'workorder_status' => '0.00',
'created_by' => 'buyer',
'picking_ticket_number' => 'PT-N9P0Q',
'cancelled_by' => NULL,
'cancellation_reason' => NULL,
'rejected_at' => NULL,
'rejected_reason' => NULL,
'amendment_in_progress_at' => NULL,
'amendment_completed_at' => NULL,
'amendment_completed_by' => NULL,
'delivery_method' => 'delivery',
'pickup_driver_first_name' => NULL,
'pickup_driver_last_name' => NULL,
'pickup_driver_license' => NULL,
'pickup_driver_phone' => NULL,
'pickup_vehicle_plate' => NULL,
'contact_id' => NULL,
'surcharge' => '240.00',
'awaiting_buyer_approval_at' => NULL,
'buyer_approved_at' => NULL,
'buyer_approved_by' => NULL,
'buyer_approval_notes' => NULL,
'delivery_date' => NULL,
'delivery_instructions' => NULL,
'order_group_id' => NULL,
'seller_business_id' => 2,
'delivery_window_id' => NULL,
'delivery_window_date' => NULL,
'invoice_created_at' => NULL,
'pickup_date' => NULL,
'delivery_notes' => NULL,
'finalized_at' => NULL,
'finalized_by_user_id' => NULL,
'approved_for_delivery_at' => NULL,
'remote_organisation_id' => NULL,
),
6 =>
array (
'id' => 7,
'order_number' => 'ORD-DEV-007',
'business_id' => 1,
'user_id' => 2,
'location_id' => NULL,
'subtotal' => '400.00',
'tax' => '39.60',
'total' => '479.60',
'status' => 'delivered',
'payment_terms' => 'net_30',
'due_date' => '2025-12-03',
'notes' => NULL,
'accepted_at' => '2025-11-03 19:42:24',
'delivered_at' => '2025-11-08 19:42:24',
'cancelled_at' => NULL,
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'deleted_at' => NULL,
'invoiced_at' => NULL,
'manifest_created_at' => NULL,
'ready_for_delivery_at' => NULL,
'in_progress_at' => NULL,
'ready_for_invoice_at' => NULL,
'workorder_status' => '0.00',
'created_by' => 'buyer',
'picking_ticket_number' => 'PT-R1S2T',
'cancelled_by' => NULL,
'cancellation_reason' => NULL,
'rejected_at' => NULL,
'rejected_reason' => NULL,
'amendment_in_progress_at' => NULL,
'amendment_completed_at' => NULL,
'amendment_completed_by' => NULL,
'delivery_method' => 'pickup',
'pickup_driver_first_name' => NULL,
'pickup_driver_last_name' => NULL,
'pickup_driver_license' => NULL,
'pickup_driver_phone' => NULL,
'pickup_vehicle_plate' => NULL,
'contact_id' => NULL,
'surcharge' => '40.00',
'awaiting_buyer_approval_at' => NULL,
'buyer_approved_at' => NULL,
'buyer_approved_by' => NULL,
'buyer_approval_notes' => NULL,
'delivery_date' => NULL,
'delivery_instructions' => NULL,
'order_group_id' => NULL,
'seller_business_id' => 2,
'delivery_window_id' => NULL,
'delivery_window_date' => NULL,
'invoice_created_at' => NULL,
'pickup_date' => NULL,
'delivery_notes' => NULL,
'finalized_at' => NULL,
'finalized_by_user_id' => NULL,
'approved_for_delivery_at' => NULL,
'remote_organisation_id' => NULL,
),
));
}
}

View File

@@ -0,0 +1,24 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class PermissionsTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('permissions')->delete();
}
}

View File

@@ -0,0 +1,24 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class ProductCategoriesTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('product_categories')->delete();
}
}

View File

@@ -0,0 +1,24 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class ProductLinesTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('product_lines')->delete();
}
}

View File

@@ -0,0 +1,128 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class ProductionDataSeeder extends Seeder
{
/**
* Seed the production database with data from local environment.
*
* This seeder imports all data from your local database using PHP seeders
* generated by the iseed package.
*
* Usage:
* 1. Run migrations first: php artisan migrate:fresh
* 2. Run this seeder: php artisan db:seed --class=ProductionDataSeeder
*
* Generated from local database on: 2025-11-24
*/
public function run(): void
{
$this->command->info('Seeding production data from local database...');
$this->command->newLine();
// Disable foreign key checks for PostgreSQL
DB::statement('SET session_replication_role = replica;');
try {
// 1. Users & Authentication (must be first)
$this->seedTable(RolesTableSeeder::class, 'Roles');
$this->seedTable(PermissionsTableSeeder::class, 'Permissions');
$this->seedTable(RoleHasPermissionsTableSeeder::class, 'Role permissions');
$this->seedTable(UsersTableSeeder::class, 'Users');
$this->seedTable(ModelHasRolesTableSeeder::class, 'User roles');
$this->seedTable(ModelHasPermissionsTableSeeder::class, 'User permissions');
// 2. Businesses & Locations
$this->seedTable(BusinessesTableSeeder::class, 'Businesses');
$this->seedTable(LocationsTableSeeder::class, 'Locations');
$this->seedTable(ContactsTableSeeder::class, 'Contacts');
$this->seedTable(DepartmentsTableSeeder::class, 'Departments');
// 3. Product Foundation Data
$this->seedTable(ProductCategoriesTableSeeder::class, 'Product categories');
$this->seedTable(ProductLinesTableSeeder::class, 'Product lines');
$this->seedTable(StrainsTableSeeder::class, 'Strains');
$this->seedTable(LabsTableSeeder::class, 'Labs');
$this->seedTable(ComponentsTableSeeder::class, 'Components');
// 4. Brands & Products
$this->seedTable(BrandsTableSeeder::class, 'Brands');
$this->seedTable(ProductsTableSeeder::class, 'Products');
$this->seedTable(BatchesTableSeeder::class, 'Batches');
// 5. Orders & Invoices
$this->seedTable(OrdersTableSeeder::class, 'Orders');
$this->seedTable(OrderItemsTableSeeder::class, 'Order items');
$this->seedTable(InvoicesTableSeeder::class, 'Invoices');
$this->command->newLine();
$this->command->info('✓ Production data seeded successfully!');
$this->command->info(' Total tables seeded: 21');
} finally {
// Re-enable foreign key checks
DB::statement('SET session_replication_role = DEFAULT;');
// Update sequences
$this->updateSequences();
}
}
protected function seedTable(string $seederClass, string $label): void
{
$this->command->info(" Seeding {$label}...");
$this->call($seederClass);
}
/**
* Update all PostgreSQL sequences to max(id) + 1
*/
protected function updateSequences(): void
{
$this->command->info('Updating PostgreSQL sequences...');
// Get all tables with id columns
$tables = DB::select("
SELECT tablename
FROM pg_tables
WHERE schemaname = 'public'
AND tablename NOT IN ('migrations', 'telescope_entries', 'telescope_entries_tags')
");
foreach ($tables as $table) {
$tableName = $table->tablename;
// Check if table has an id column
$hasId = DB::selectOne("
SELECT column_name
FROM information_schema.columns
WHERE table_schema = 'public'
AND table_name = ?
AND column_name = 'id'
", [$tableName]);
if ($hasId) {
// Get the sequence name
$sequence = DB::selectOne("
SELECT pg_get_serial_sequence('public.{$tableName}', 'id') as sequence_name
");
if ($sequence && $sequence->sequence_name) {
// Update sequence to max(id) + 1
DB::statement("
SELECT setval('{$sequence->sequence_name}',
COALESCE((SELECT MAX(id) FROM {$tableName}), 1),
true
)
");
}
}
}
$this->command->info('✓ Sequences updated');
}
}

File diff suppressed because it is too large Load Diff

173
database/seeders/README.md Normal file
View File

@@ -0,0 +1,173 @@
# Database Seeders
This directory contains PHP database seeders for syncing data between environments.
## Overview
The seeder system uses [orangehill/iseed](https://github.com/orangehill/iseed) to generate PHP seeders from your local database, which can then be run on remote servers to replicate your data.
## Generated Seeders (1.8MB total)
### Core Data (21 tables seeded)
**Users & Authentication:**
- RolesTableSeeder
- PermissionsTableSeeder
- RoleHasPermissionsTableSeeder
- UsersTableSeeder
- ModelHasRolesTableSeeder
- ModelHasPermissionsTableSeeder
**Business & Organization:**
- BusinessesTableSeeder
- LocationsTableSeeder
- ContactsTableSeeder
- DepartmentsTableSeeder
**Product Foundation:**
- ProductCategoriesTableSeeder
- ProductLinesTableSeeder
- StrainsTableSeeder
- LabsTableSeeder
- ComponentsTableSeeder
**Products & Inventory:**
- BrandsTableSeeder
- ProductsTableSeeder (largest: 1.2MB)
- BatchesTableSeeder
**Orders & Sales:**
- OrdersTableSeeder
- OrderItemsTableSeeder
- InvoicesTableSeeder
## Usage
### On Remote Server
**1. First time setup:**
```bash
# Pull latest code
git pull origin feature/product-and-inventory-management
# Run migrations (CAUTION: This will wipe existing data!)
php artisan migrate:fresh
# Seed all production data
php artisan db:seed --class=ProductionDataSeeder
```
**2. Update existing data:**
```bash
# Run specific table seeder to update just that table
php artisan db:seed --class=ProductsTableSeeder
```
## Re-generating Seeders (Local Development)
If you need to regenerate seeders from your updated local database:
```bash
# Generate seeders for specific tables
./vendor/bin/sail artisan iseed users,businesses,brands,products --force --clean
# Generate all core tables at once
./vendor/bin/sail artisan iseed users,businesses,brands,products,batches,orders,order_items,invoices,contacts,locations,roles,permissions,model_has_roles,model_has_permissions,role_has_permissions,components,product_categories,product_lines,strains,labs,departments --force --clean
```
The `--force` flag overwrites existing seeders, and `--clean` truncates tables before seeding.
## Features
**Pure PHP** - No SQL files, fully version controlled
**Dependency Order** - ProductionDataSeeder runs seeders in correct order
**Foreign Keys** - Automatically handles FK constraints
**Sequences** - Auto-updates PostgreSQL sequences after seeding
**Idempotent** - Safe to run multiple times (with `--clean` flag)
## Important Notes
**⚠️ Data Loss Warning:**
- `migrate:fresh` will **destroy all existing data**
- Always backup production database before seeding
- Consider using specific table seeders for updates instead of full reseed
**📏 File Sizes:**
- ProductsTableSeeder is **1.2MB** (largest file)
- Total seeders: **1.8MB** across 21 files
- Includes **35,700 lines** of generated PHP code
**🔒 Excluded Tables:**
These tables are NOT seeded (they're environment-specific or auto-generated):
- migrations
- telescope_entries, telescope_entries_tags
- sessions, cache, cache_locks
- jobs, failed_jobs, job_batches
- password_reset_tokens
- audits (too large, environment-specific)
## Troubleshooting
### Foreign Key Constraint Errors
The seeder disables FK checks during seeding, but if you still have issues:
```sql
-- Manually disable FK checks
SET session_replication_role = replica;
-- Run your seeder
-- Re-enable FK checks
SET session_replication_role = DEFAULT;
```
### Sequence Out of Sync
If you get duplicate key errors after seeding:
```bash
# The ProductionDataSeeder automatically fixes sequences, but if needed:
php artisan tinker
>>> DB::statement("SELECT setval('users_id_seq', (SELECT MAX(id) FROM users));");
```
### Running Out of Memory
If seeding fails due to memory limits (ProductsTableSeeder is 1.2MB):
```bash
# Increase PHP memory limit temporarily
php -d memory_limit=512M artisan db:seed --class=ProductionDataSeeder
```
## Development Workflow
**When you add new data locally:**
1. Re-generate seeders:
```bash
./vendor/bin/sail artisan iseed table_name --force
```
2. Commit the updated seeder:
```bash
git add database/seeders/TableNameTableSeeder.php
git commit -m "Update table_name seeder data"
git push
```
3. On remote, pull and reseed:
```bash
git pull
php artisan db:seed --class=TableNameTableSeeder
```
## Package Information
This system uses [orangehill/iseed v3.1.1](https://github.com/orangehill/iseed).
**Installation** (already done):
```bash
composer require --dev orangehill/iseed
```

View File

@@ -0,0 +1,24 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class RoleHasPermissionsTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('role_has_permissions')->delete();
}
}

View File

@@ -0,0 +1,98 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class RolesTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('roles')->delete();
\DB::table('roles')->insert(array (
0 =>
array (
'id' => 1,
'name' => 'Super Admin',
'guard_name' => 'web',
'created_at' => '2025-11-23 19:42:22',
'updated_at' => '2025-11-23 19:42:22',
),
1 =>
array (
'id' => 2,
'name' => 'buyer',
'guard_name' => 'web',
'created_at' => '2025-11-23 19:42:22',
'updated_at' => '2025-11-23 19:42:22',
),
2 =>
array (
'id' => 3,
'name' => 'seller',
'guard_name' => 'web',
'created_at' => '2025-11-23 19:42:22',
'updated_at' => '2025-11-23 19:42:22',
),
3 =>
array (
'id' => 4,
'name' => 'company-owner',
'guard_name' => 'web',
'created_at' => '2025-11-23 19:42:22',
'updated_at' => '2025-11-23 19:42:22',
),
4 =>
array (
'id' => 5,
'name' => 'company-manager',
'guard_name' => 'web',
'created_at' => '2025-11-23 19:42:22',
'updated_at' => '2025-11-23 19:42:22',
),
5 =>
array (
'id' => 6,
'name' => 'company-user',
'guard_name' => 'web',
'created_at' => '2025-11-23 19:42:22',
'updated_at' => '2025-11-23 19:42:22',
),
6 =>
array (
'id' => 7,
'name' => 'buyer-owner',
'guard_name' => 'web',
'created_at' => '2025-11-23 19:42:22',
'updated_at' => '2025-11-23 19:42:22',
),
7 =>
array (
'id' => 8,
'name' => 'buyer-manager',
'guard_name' => 'web',
'created_at' => '2025-11-23 19:42:22',
'updated_at' => '2025-11-23 19:42:22',
),
8 =>
array (
'id' => 9,
'name' => 'buyer-user',
'guard_name' => 'web',
'created_at' => '2025-11-23 19:42:22',
'updated_at' => '2025-11-23 19:42:22',
),
));
}
}

View File

@@ -0,0 +1,24 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class StrainsTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('strains')->delete();
}
}

View File

@@ -0,0 +1,233 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
class UsersTableSeeder extends Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('users')->delete();
\DB::table('users')->insert(array (
0 =>
array (
'id' => 1,
'email' => 'admin@cannabrands.com',
'email_verified_at' => '2025-11-23 19:42:22',
'password' => '$2y$12$gA5zm7ggQfthkqKim53J6OUxnShT4e8HTuzsVhFf8/BQVgMEBfA7S',
'remember_token' => NULL,
'created_at' => '2025-11-23 19:42:22',
'updated_at' => '2025-11-23 19:42:22',
'uuid' => NULL,
'company_id' => NULL,
'user_type' => 'admin',
'business_onboarding_completed' => false,
'temp_business_name' => NULL,
'temp_market' => NULL,
'first_name' => 'Super',
'last_name' => 'Admin',
'position' => NULL,
'temp_contact_type' => NULL,
'phone' => NULL,
'status' => 'active',
'role' => 'admin',
),
1 =>
array (
'id' => 2,
'email' => 'buyer@example.com',
'email_verified_at' => '2025-11-23 19:42:22',
'password' => '$2y$12$q55kCskWCA1yWIdAowl7PucRIiBlFVRGphPD9D7dinZpR5TRhNiRS',
'remember_token' => 'ehyy6jyvA9',
'created_at' => '2025-11-23 19:42:22',
'updated_at' => '2025-11-23 19:42:22',
'uuid' => NULL,
'company_id' => NULL,
'user_type' => 'buyer',
'business_onboarding_completed' => true,
'temp_business_name' => NULL,
'temp_market' => NULL,
'first_name' => 'Buyer',
'last_name' => 'User',
'position' => 'Purchasing Manager',
'temp_contact_type' => NULL,
'phone' => NULL,
'status' => 'active',
'role' => 'admin',
),
2 =>
array (
'id' => 4,
'email' => 'admin@example.com',
'email_verified_at' => '2025-11-23 19:42:22',
'password' => '$2y$12$.NYnZGpQ00vwCXqsUUKNluYW/8MM7eIhUayN1Hwqefbn2oJrO2Sj6',
'remember_token' => 'jfR5GBEx2D',
'created_at' => '2025-11-23 19:42:22',
'updated_at' => '2025-11-23 19:42:22',
'uuid' => NULL,
'company_id' => NULL,
'user_type' => 'admin',
'business_onboarding_completed' => false,
'temp_business_name' => NULL,
'temp_market' => NULL,
'first_name' => 'Admin',
'last_name' => 'User',
'position' => NULL,
'temp_contact_type' => NULL,
'phone' => NULL,
'status' => 'active',
'role' => 'admin',
),
3 =>
array (
'id' => 5,
'email' => 'pending-buyer@example.com',
'email_verified_at' => '2025-11-23 19:42:24',
'password' => '$2y$12$J.jIO5SeH0lzEkgBahTekeE0Acn7GP9tMzsv7eUH/Yy2ho4L7QKq6',
'remember_token' => 'zMXjHhoYae',
'created_at' => '2025-11-23 19:42:24',
'updated_at' => '2025-11-23 19:42:24',
'uuid' => NULL,
'company_id' => NULL,
'user_type' => 'buyer',
'business_onboarding_completed' => false,
'temp_business_name' => NULL,
'temp_market' => NULL,
'first_name' => 'Pending',
'last_name' => 'Buyer',
'position' => 'Owner',
'temp_contact_type' => NULL,
'phone' => NULL,
'status' => 'active',
'role' => 'admin',
),
4 =>
array (
'id' => 6,
'email' => 'cannabrands-owner@example.com',
'email_verified_at' => NULL,
'password' => '$2y$12$L2n2fNZsugBLONMAOaIu4e/AjiTOnVmt0SgvbEsHidE9yq0.vu/FW',
'remember_token' => NULL,
'created_at' => '2025-11-23 20:53:30',
'updated_at' => '2025-11-23 20:53:30',
'uuid' => NULL,
'company_id' => NULL,
'user_type' => 'seller',
'business_onboarding_completed' => false,
'temp_business_name' => NULL,
'temp_market' => NULL,
'first_name' => 'Cannabrands',
'last_name' => 'Owner',
'position' => NULL,
'temp_contact_type' => NULL,
'phone' => NULL,
'status' => 'active',
'role' => 'admin',
),
5 =>
array (
'id' => 7,
'email' => 'canopyaz-owner@example.com',
'email_verified_at' => NULL,
'password' => '$2y$12$SqEynqozRS22BvSD0mc.9Or/cu/bZEoHsEEgBm2KeFP.LEo10Q04.',
'remember_token' => NULL,
'created_at' => '2025-11-24 03:18:36',
'updated_at' => '2025-11-24 03:18:36',
'uuid' => '019ab3de-d488-732c',
'company_id' => NULL,
'user_type' => 'seller',
'business_onboarding_completed' => false,
'temp_business_name' => NULL,
'temp_market' => NULL,
'first_name' => 'Canopy',
'last_name' => 'Owner',
'position' => NULL,
'temp_contact_type' => NULL,
'phone' => NULL,
'status' => 'active',
'role' => 'admin',
),
6 =>
array (
'id' => 8,
'email' => 'curagreen-owner@example.com',
'email_verified_at' => NULL,
'password' => '$2y$12$ivccPV72JcojtReT4MqCm.SBPBOH8N6wZjqtx1HbinGNdGFU3WrxW',
'remember_token' => NULL,
'created_at' => '2025-11-24 03:18:37',
'updated_at' => '2025-11-24 03:18:37',
'uuid' => '019ab3de-d6cf-73d1',
'company_id' => NULL,
'user_type' => 'seller',
'business_onboarding_completed' => false,
'temp_business_name' => NULL,
'temp_market' => NULL,
'first_name' => 'Curagreen',
'last_name' => 'Owner',
'position' => NULL,
'temp_contact_type' => NULL,
'phone' => NULL,
'status' => 'active',
'role' => 'admin',
),
7 =>
array (
'id' => 9,
'email' => 'leopardaz-owner@example.com',
'email_verified_at' => NULL,
'password' => '$2y$12$u6sSmz2/sRwpqU9PASHeRe/.prkhICRWb6SSWxuwp.JcoprPlEuFu',
'remember_token' => NULL,
'created_at' => '2025-11-24 03:18:37',
'updated_at' => '2025-11-24 03:18:37',
'uuid' => '019ab3de-d82d-728f',
'company_id' => NULL,
'user_type' => 'seller',
'business_onboarding_completed' => false,
'temp_business_name' => NULL,
'temp_market' => NULL,
'first_name' => 'Leopard AZ',
'last_name' => 'Owner',
'position' => NULL,
'temp_contact_type' => NULL,
'phone' => NULL,
'status' => 'active',
'role' => 'admin',
),
8 =>
array (
'id' => 3,
'email' => 'seller@example.com',
'email_verified_at' => '2025-11-23 19:42:22',
'password' => '$2y$12$L2n2fNZsugBLONMAOaIu4e/AjiTOnVmt0SgvbEsHidE9yq0.vu/FW',
'remember_token' => 'C2I4E2dQ3ezkHhFFLSTpxbaxrA3mz2Xn5q5TZnntnkyARuDLDJKsrCCJtPJT',
'created_at' => '2025-11-23 19:42:22',
'updated_at' => '2025-11-23 19:42:22',
'uuid' => NULL,
'company_id' => NULL,
'user_type' => 'seller',
'business_onboarding_completed' => true,
'temp_business_name' => NULL,
'temp_market' => NULL,
'first_name' => 'Seller',
'last_name' => 'User',
'position' => 'Sales Manager',
'temp_contact_type' => NULL,
'phone' => NULL,
'status' => 'active',
'role' => 'admin',
),
));
}
}