From 01f6897d088b23096cd9711b721bf330310fcea6 Mon Sep 17 00:00:00 2001 From: Scott Pouliot Date: Wed, 10 Jun 2026 21:56:32 -0400 Subject: [PATCH] Scale demo seed data down for tutorial recordings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Customers: 100 → 27 (15 commercial across auto/industrial/architectural/ fitness/marine/energy, including 2 tax-exempt govts; 12 individuals) Quotes: 75 → 20; date range extended to 4-6 months (was 90 days); status distribution adjusted proportionally (2 draft, 3 sent, 10 approved, 3 rejected, 2 expired) Jobs: fixed 50-loop → per-customer 0-5 jobs (~32 total); jobIdx cycles all 16 statuses globally so every status is visible; creation dates spread across 1-5 months for in-progress/early jobs, 2-6 months for completed jobs SeededCustomerEmails updated to match new 27-customer set (added gnelson@email.com and carol.evans@email.com) Co-Authored-By: Claude Sonnet 4.6 --- .../Services/SeedDataService.Customers.cs | 147 +++-------- .../Services/SeedDataService.Jobs.cs | 235 +++++++++--------- .../Services/SeedDataService.Quotes.cs | 18 +- .../Services/SeedDataService.Remove.cs | 12 +- 4 files changed, 165 insertions(+), 247 deletions(-) diff --git a/src/PowderCoating.Infrastructure/Services/SeedDataService.Customers.cs b/src/PowderCoating.Infrastructure/Services/SeedDataService.Customers.cs index bb1deff..844b17b 100644 --- a/src/PowderCoating.Infrastructure/Services/SeedDataService.Customers.cs +++ b/src/PowderCoating.Infrastructure/Services/SeedDataService.Customers.cs @@ -104,126 +104,47 @@ public partial class SeedDataService var customers = new List { - // ─── Commercial Customers (60) ──────────────────────────────────── + // ─── Commercial Customers (15) ──────────────────────────────────── - // Auto & Motorsports (12) - Comm("Acme Manufacturing Corp", "John", "Smith", "john.smith@acmemfg.com", "(555) 234-5678", "Chicago", "IL", "60601", "Net 30", 50000m, 12500m, "12-3456789", platinumTier, "Large volume customer, weekly shipments", 18), - Comm("Precision Auto Parts LLC", "Sarah", "Johnson", "sjohnson@precisionauto.com", "(555) 345-6789", "Detroit", "MI", "48201", "Net 30", 35000m, 8750m, "23-4567890", goldTier, "Automotive parts manufacturer", 15), - Comm("Classic Wheel Restoration", "Robert", "Taylor", "rtaylor@classicwheels.com", "(555) 789-0123", "Phoenix", "AZ", "85001", "Net 15", 15000m, 3200m, "67-8901234", silverTier, "Classic car wheel specialist", 10), - Comm("MotorSports Custom Shop", "Chris", "Brown", "cbrown@motorsportscustom.com", "(555) 901-2345", "Indianapolis", "IN", "46201", "Net 15", 20000m, 9500m, "89-0123456", silverTier, "Performance parts and custom fabrication", 8), - Comm("Metro Automotive Group", "Frank", "DeNucci", "frank.dnucci@metroauto.com", "(555) 210-3311", "Detroit", "MI", "48202", "Net 30", 28000m, 6400m, "14-2233445", goldTier, "Multi-brand dealership network", 11), - Comm("Coastal Customs & Fabrication", "Danny", "Morales", "dmorales@coastalcustoms.com", "(555) 887-6543", "San Diego", "CA", "92103", "Net 15", 18000m, 4100m, "22-3344556", silverTier, "Custom truck and SUV builds", 6), - Comm("Desert Speed Shop", "Kyle", "Rennick", "kyle@desertspeedshop.com", "(555) 766-5544", "Scottsdale", "AZ", "85251", "Net 15", 12000m, 2800m, "33-4455667", standardTier, "Performance tuning and fabrication", 4), - Comm("Midwest Motorsports", "Troy", "Edelmann", "troy@midwestmotorsports.com", "(555) 342-1122", "Columbus", "OH", "43201", "Net 30", 22000m, 5300m, "44-5566778", goldTier, "Racing team equipment and parts", 9), - Comm("Track Day Performance", "Megan", "Schultz", "megan@trackdayperformance.com", "(555) 456-9988", "Charlotte", "NC", "28201", "Net 15", 16000m, 3700m, "55-6677889", silverTier, "Track prep and safety equipment", 5), - Comm("Vintage Velocity Restorations", "Harold", "Pearce", "harold@vintagevelocity.com", "(555) 321-7654", "Nashville", "TN", "37201", "Net 30", 25000m, 6100m, "66-7788990", goldTier, "High-end vintage and classic car restoration", 13), - Comm("American Iron Custom Cycles", "Bret", "Conner", "bret@americanironcycles.com", "(555) 654-3210", "Milwaukee", "WI", "53201", "Net 15", 14000m, 3100m, "77-8899001", silverTier, "Custom motorcycle builds and parts", 7), - Comm("All-American Auto Body", "Steve", "Kozlowski", "steve@allamericanautobody.com", "(555) 213-4567", "Cleveland", "OH", "44101", "Net 30", 20000m, 4800m, "88-9900112", goldTier, "Collision repair and custom coating", 10), + // Auto & Motorsports + Comm("Acme Manufacturing Corp", "John", "Smith", "john.smith@acmemfg.com", "(555) 234-5678", "Chicago", "IL", "60601", "Net 30", 50000m, 12500m, "12-3456789", platinumTier, "Large volume customer, weekly shipments", 18), + Comm("Precision Auto Parts LLC", "Sarah", "Johnson", "sjohnson@precisionauto.com", "(555) 345-6789", "Detroit", "MI", "48201", "Net 30", 35000m, 8750m, "23-4567890", goldTier, "Automotive parts manufacturer", 15), + Comm("Classic Wheel Restoration", "Robert", "Taylor", "rtaylor@classicwheels.com", "(555) 789-0123", "Phoenix", "AZ", "85001", "Net 15", 15000m, 3200m, "67-8901234", silverTier, "Classic car wheel specialist", 10), + Comm("MotorSports Custom Shop", "Chris", "Brown", "cbrown@motorsportscustom.com","(555) 901-2345", "Indianapolis", "IN", "46201", "Net 15", 20000m, 9500m, "89-0123456", silverTier, "Performance parts and custom fabrication", 8), - // Industrial & Manufacturing (10) - Comm("Industrial Furniture Co", "Jennifer","Anderson", "janderson@indfurniture.com", "(555) 890-1234", "Seattle", "WA", "98101", "Net 30", 30000m, 7800m, "78-9012345", goldTier, "Office and outdoor furniture manufacturer", 16), - Comm("Commercial HVAC Systems", "Kevin", "Garcia", "kgarcia@commercialhvac.com", "(555) 345-6780", "Atlanta", "GA", "30301", "Net 30", 32000m, 8900m, "23-4567891", goldTier, "HVAC ductwork and equipment casings", 17), - Comm("Agricultural Equipment Inc", "Sandra", "White", "swhite@agequipment.com", "(555) 678-9013", "Des Moines", "IA", "50301", "Net 30", 42000m, 16800m, "56-7890124", goldTier, "Farm equipment parts and implements", 19), - Comm("Steel City Fabricators", "Tony", "Marchetti", "tony@steelcityfab.com", "(555) 412-3344", "Pittsburgh", "PA", "15201", "Net 30", 38000m, 10200m, "99-0011223", platinumTier, "Heavy structural steel fabrication", 14), - Comm("Precision Metal Works", "Diane", "Tran", "diane@precisionmetalworks.com", "(555) 503-2211", "Portland", "OR", "97205", "Net 30", 26000m, 5900m, "10-1122334", goldTier, "CNC machined parts and assemblies", 12), - Comm("Continental Manufacturing", "Phil", "Stavros", "pstavros@continentalmfg.com", "(555) 216-8877", "Cleveland", "OH", "44115", "Net 45", 55000m, 18400m, "21-2233445", platinumTier, "Industrial component manufacturing", 20), - Comm("Eagle Industrial Coatings", "Deb", "Hensley", "deb@eagleindustrialcoatings.com", "(555) 317-5566", "Indianapolis", "IN", "46204", "Net 30", 19000m, 4300m, "32-3344556", silverTier, "Subcontract coating for industrial parts", 7), - Comm("Summit Metal Fabricators", "Russ", "Fontaine", "russ@summitmetalfab.com", "(555) 720-4433", "Denver", "CO", "80202", "Net 30", 31000m, 7700m, "43-4455667", goldTier, "Custom metal fabrication and welding", 11), - Comm("Iron Horse Manufacturing", "Craig", "Bukowski", "craig@ironhorsemfg.com", "(555) 414-7788", "Milwaukee", "WI", "53202", "Net 30", 24000m, 5600m, "54-5566778", goldTier, "Heavy equipment components and frames", 9), - Comm("Pacific Metal Works", "Yuki", "Tanaka", "ytanaka@pacificmetalworks.com", "(555) 206-3322", "Seattle", "WA", "98104", "Net 15", 17000m, 3800m, "65-6677889", silverTier, "Sheet metal fabrication and finishing", 6), + // Industrial & Manufacturing + Comm("Industrial Furniture Co", "Jennifer", "Anderson", "janderson@indfurniture.com", "(555) 890-1234", "Seattle", "WA", "98101", "Net 30", 30000m, 7800m, "78-9012345", goldTier, "Office and outdoor furniture manufacturer", 16), + Comm("Commercial HVAC Systems", "Kevin", "Garcia", "kgarcia@commercialhvac.com", "(555) 345-6780", "Atlanta", "GA", "30301", "Net 30", 32000m, 8900m, "23-4567891", goldTier, "HVAC ductwork and equipment casings", 17), + Comm("Agricultural Equipment Inc", "Sandra", "White", "swhite@agequipment.com", "(555) 678-9013", "Des Moines", "IA", "50301", "Net 30", 42000m, 16800m, "56-7890124", goldTier, "Farm equipment parts and implements", 19), - // Architectural & Construction (8) - Comm("Urban Railings & Gates", "Michael", "Chen", "mchen@urbanrailings.com", "(555) 456-7890", "San Francisco", "CA", "94102", "Net 15", 25000m, 5200m, "34-5678901", silverTier, "Ornamental iron railings and gates", 12), - Comm("Heritage Architectural Metalworks","Thomas","Miller", "tmiller@heritagemetal.com", "(555) 123-4567", "Charleston", "SC", "29401", "Net 30", 28000m, 6700m, "01-2345678", goldTier, "Historic restoration and custom architectural pieces",13), - Comm("Skyline Structural Steel", "Marcus", "Webb", "mwebb@skylinsteel.com", "(555) 312-9876", "Chicago", "IL", "60607", "Net 45", 65000m, 22000m, "76-7788990", platinumTier, "Commercial and industrial structural steel", 22), - Comm("Premier Fence & Gate Co", "Lori", "Hale", "lori@premierfenceandgate.com", "(555) 602-1199", "Phoenix", "AZ", "85004", "Net 30", 23000m, 5400m, "87-8899001", goldTier, "Residential and commercial fencing", 8), - Comm("Modern Railing Systems", "Evan", "Choi", "echoi@modernrailingsystems.com", "(555) 415-8844", "San Jose", "CA", "95110", "Net 30", 27000m, 6200m, "98-9900112", goldTier, "Interior and exterior railing design", 10), - Comm("Coastal Aluminum Products", "Patty", "Larson", "plarson@coastalaluminum.com", "(555) 904-3366", "Tampa", "FL", "33601", "Net 30", 21000m, 4700m, "09-0011223", goldTier, "Aluminum windows, doors, and structures", 7), - Comm("Metro Door & Window", "Sam", "Petrov", "spetrov@metrodoorwindow.com", "(555) 718-4455", "Brooklyn", "NY", "11201", "Net 30", 29000m, 7100m, "20-1122334", goldTier, "Commercial door and window systems", 11), - Comm("Rocky Mountain Ironworks", "Buck", "Ramsey", "buck@rockymtnironworks.com", "(555) 303-6677", "Denver", "CO", "80203", "Net 15", 18500m, 4100m, "31-2233445", silverTier, "Custom wrought iron and steel artisan work", 5), + // Architectural & Construction + Comm("Urban Railings & Gates", "Michael", "Chen", "mchen@urbanrailings.com", "(555) 456-7890", "San Francisco", "CA", "94102", "Net 15", 25000m, 5200m, "34-5678901", silverTier, "Ornamental iron railings and gates", 12), + Comm("Heritage Architectural Metalworks","Thomas", "Miller", "tmiller@heritagemetal.com", "(555) 123-4567", "Charleston", "SC", "29401", "Net 30", 28000m, 6700m, "01-2345678", goldTier, "Historic restoration and custom architectural pieces",13), - // Fitness & Recreation (5) - Comm("Fitness Equipment Solutions", "Lisa", "Martinez", "lmartinez@fitequip.com", "(555) 567-8901", "Austin", "TX", "78701", "Net 30", 40000m, 15600m, "45-6789012", goldTier, "Gym equipment frames and accessories", 14), - Comm("Playground Equipment USA", "Nancy", "Martinez", "nmartinez@playgroundusa.com", "(555) 456-7891", "Portland", "OR", "97201", "Net 30", 38000m, 14500m, "34-5678902", platinumTier, "Commercial playground equipment manufacturer", 22), - Comm("Diamond Fitness Equipment", "Lamar", "Okafor", "lamar@diamondfitness.com", "(555) 713-2288", "Houston", "TX", "77002", "Net 30", 33000m, 8100m, "42-3344556", goldTier, "Commercial gym and fitness center equipment", 9), - Comm("Peak Performance Products", "Stacy", "Owens", "stacy@peakperformanceproducts.com", "(555) 503-7711", "Eugene", "OR", "97401", "Net 15", 16000m, 3500m, "53-4455667", silverTier, "Outdoor fitness and sports equipment", 6), - Comm("All-Star Sports Equipment", "Jerome", "Watkins", "jwatkins@allstarsports.com", "(555) 314-5533", "St. Louis", "MO", "63101", "Net 30", 22000m, 5100m, "64-5566778", goldTier, "Team sports equipment and facilities", 8), + // Fitness & Marine + Comm("Fitness Equipment Solutions", "Lisa", "Martinez", "lmartinez@fitequip.com", "(555) 567-8901", "Austin", "TX", "78701", "Net 30", 40000m, 15600m, "45-6789012", goldTier, "Gym equipment frames and accessories", 14), + Comm("Playground Equipment USA", "Nancy", "Martinez", "nmartinez@playgroundusa.com", "(555) 456-7891", "Portland", "OR", "97201", "Net 30", 38000m, 14500m, "34-5678902", platinumTier, "Commercial playground equipment manufacturer", 22), + Comm("Marine Equipment Corp", "Patricia", "Wilson", "pwilson@marineequip.com", "(555) 234-5679", "Miami", "FL", "33101", "Net 30", 35000m, 11400m, "12-3456780", silverTier, "Boat hardware and marine fittings", 11), - // Marine (4) - Comm("Marine Equipment Corp", "Patricia","Wilson", "pwilson@marineequip.com", "(555) 234-5679", "Miami", "FL", "33101", "Net 30", 35000m, 11400m, "12-3456780", silverTier, "Boat hardware and marine fittings", 11), - Comm("Gulf Coast Marine Supply", "Hector", "Vega", "hvega@gulfcoastmarine.com", "(555) 985-6644", "New Orleans", "LA", "70112", "Net 30", 28000m, 6800m, "75-6677889", goldTier, "Commercial and recreational marine hardware", 9), - Comm("Pacific Yacht Hardware", "Erin", "Nakamura", "enakamura@pacificyacht.com", "(555) 310-8822", "Long Beach", "CA", "90802", "Net 15", 20000m, 4500m, "86-7788990", silverTier, "High-end yacht fittings and hardware", 6), - Comm("Lakeside Boat Works", "Walt", "Bauer", "walt@lakesideboatworks.com", "(555) 616-3311", "Grand Rapids", "MI", "49501", "Net 30", 15000m, 3200m, "97-8899001", silverTier, "Freshwater boat repair and custom builds", 4), + // Commercial & Energy/Government + Comm("Office Systems International", "Brian", "Lee", "blee@officesystems.com", "(555) 567-8902", "Dallas", "TX", "75201", "Net 15", 27000m, 5600m, "45-6789013", silverTier, "Office furniture components and accessories", 9), + Comm("Metro Transit Authority", "David", "Williams", "dwilliams@metrota.gov", "(555) 678-9012", "Boston", "MA", "02101", "Net 60", 75000m, 22000m, "56-7890123", platinumTier, "Government transit contract — tax exempt", 24, true), + Comm("Green Energy Solutions", "Amanda", "Davis", "adavis@greenenergy.com", "(555) 012-3456", "Denver", "CO", "80201", "Net 30", 45000m, 18200m, "90-1234567", platinumTier, "Solar panel frames and mounting hardware", 20), - // Furniture & Commercial (5) - Comm("Office Systems International", "Brian", "Lee", "blee@officesystems.com", "(555) 567-8902", "Dallas", "TX", "75201", "Net 15", 27000m, 5600m, "45-6789013", silverTier, "Office furniture components and accessories", 9), - Comm("Retail Display Solutions", "Gina", "Russo", "gruso@retaildisplay.com", "(555) 312-6644", "Chicago", "IL", "60608", "Net 30", 19000m, 4300m, "08-9900112", goldTier, "Retail shelving, fixtures, and displays", 7), - Comm("Restaurant Equipment Co", "Marco", "Benetti", "mbenetti@restaurantequipment.com", "(555) 305-1122", "Miami", "FL", "33102", "Net 30", 24000m, 5800m, "19-0011223", goldTier, "Commercial kitchen and restaurant equipment", 10), - Comm("Outdoor Living Products", "Cheryl", "Dobbs", "cdobbs@outdoorlivingproducts.com", "(555) 480-7799", "Tempe", "AZ", "85281", "Net 30", 21000m, 4600m, "30-1122334", goldTier, "Patio and outdoor furniture manufacturer", 8), - Comm("Commercial Shelving Systems", "Ray", "Obasi", "robasi@commercialshelving.com", "(555) 832-5544", "Houston", "TX", "77003", "Net 30", 16000m, 3400m, "41-2233445", silverTier, "Warehouse and retail shelving solutions", 5), + // ─── Individual / Non-Commercial Customers (12) ─────────────────── - // Energy, Transit & Government (7) - Comm("Metro Transit Authority", "David", "Williams", "dwilliams@metrota.gov", "(555) 678-9012", "Boston", "MA", "02101", "Net 60", 75000m, 22000m, "56-7890123", platinumTier, "Government transit contract — tax exempt", 24, true), - Comm("Green Energy Solutions", "Amanda", "Davis", "adavis@greenenergy.com", "(555) 012-3456", "Denver", "CO", "80201", "Net 30", 45000m, 18200m, "90-1234567", platinumTier, "Solar panel frames and mounting hardware", 20), - Comm("Solar Power Systems Inc", "Neil", "Ostrowski", "nostrowski@solarpowersys.com", "(555) 408-4411", "San Jose", "CA", "95112", "Net 30", 36000m, 9200m, "52-3344556", goldTier, "Solar racking and structural components", 11), - Comm("Wind Energy Components", "Tara", "Haas", "thaas@windenergy.com", "(555) 605-8833", "Austin", "TX", "78702", "Net 45", 48000m, 15600m, "63-4455667", platinumTier, "Wind turbine hardware and mounting systems", 16), - Comm("Municipal Services Group", "Roy", "Nkosi", "rnkosi@municipalservices.gov", "(555) 608-2233", "Sacramento", "CA", "95814", "Net 60", 60000m, 19800m, "74-5566778", platinumTier, "City infrastructure and public works — tax exempt", 28, true), - Comm("Regional Airport Authority", "Lisa", "Crane", "lcrane@regionairport.gov", "(555) 904-5511", "Tampa", "FL", "33602", "Net 60", 55000m, 17200m, "85-6677889", platinumTier, "Airport infrastructure — tax exempt", 21, true), - Comm("County School District", "Terry", "Vance", "tvance@countyschools.edu", "(555) 317-8866", "Indianapolis", "IN", "46205", "Net 60", 40000m, 12500m, "96-7788990", goldTier, "School facility equipment — tax exempt", 15, true), - - // Specialty (9) - Comm("Medical Equipment Corp", "Paula", "Jennings", "pjennings@medicalequip.com", "(555) 215-6655", "Philadelphia", "PA", "19103", "Net 30", 42000m, 12800m, "07-8899001", goldTier, "Medical and laboratory equipment frames", 13), - Comm("Food Processing Equipment", "Luis", "Espinoza", "lespinoza@foodprocessingequip.com", "(555) 816-3388", "Indianapolis", "IN", "46206", "Net 30", 31000m, 7400m, "18-9900112", goldTier, "Food-safe coating for processing equipment", 9), - Comm("Security Solutions Group", "Dale", "Pratt", "dpratt@securitysolutionsgrp.com", "(555) 214-4477", "Dallas", "TX", "75202", "Net 30", 26000m, 5900m, "29-0011223", goldTier, "Security enclosures and equipment housing", 8), - Comm("Mining Equipment Corp", "Rex", "Harmon", "rharmon@miningequip.com", "(555) 801-6622", "Salt Lake City", "UT", "84101", "Net 30", 48000m, 16400m, "40-1122334", platinumTier, "Mining and extraction equipment components", 17), - Comm("Construction Equipment Co", "Wayne", "Briggs", "wbriggs@constructionequipco.com", "(555) 918-7733", "Oklahoma City", "OK", "73101", "Net 30", 37000m, 10100m, "51-2233445", goldTier, "Construction and earthmoving equipment parts", 12), - Comm("Water Treatment Systems", "Irene", "Kamau", "ikamau@watertreatmentsys.com", "(555) 503-9944", "Portland", "OR", "97206", "Net 45", 44000m, 14100m, "62-3344556", platinumTier, "Municipal and industrial water treatment equipment", 18), - Comm("Rail Equipment Systems", "Doug", "Stafford", "dstafford@railequipmentsys.com", "(555) 312-7766", "Chicago", "IL", "60609", "Net 45", 52000m, 17800m, "73-4455667", platinumTier, "Railway maintenance and rolling stock equipment", 23), - Comm("Telecommunications Tower Co", "Maggie", "Solis", "msolis@telcotowers.com", "(555) 469-5588", "Dallas", "TX", "75203", "Net 30", 35000m, 9500m, "84-5566778", goldTier, "Cell tower hardware and mounting equipment", 10), - Comm("Data Center Infrastructure", "Bo", "Kimura", "bkimura@datacenterinfra.com", "(555) 408-2266", "San Jose", "CA", "95113", "Net 30", 29000m, 7200m, "95-6677889", goldTier, "Server rack frames and data center equipment", 7), - - // ─── Individual / Non-Commercial Customers (40) ─────────────────── - - Indiv("James", "Thompson", "jthompson@email.com", "(555) 111-2222", "Los Angeles", "CA", "90001", "Classic car restoration hobbyist", 6), - Indiv("Mary", "Harris", "mharris@email.com", "(555) 222-3333", "Houston", "TX", "77001", "Patio furniture refurbishment", 4), - Indiv("William", "Clark", "wclark@email.com", "(555) 333-4444", "Philadelphia", "PA", "19101", "Motorcycle customization", 7), - Indiv("Elizabeth","Lewis", "elewis@email.com", "(555) 444-5555", "Phoenix", "AZ", "85001", "Garden furniture restoration", 3), - Indiv("Richard", "Walker", "rwalker@email.com", "(555) 555-6666", "San Antonio", "TX", "78201", "Custom bike parts", 5), - Indiv("Barbara", "Hall", "bhall@email.com", "(555) 666-7777", "San Diego", "CA", "92101", "Antique furniture hardware", 2), - Indiv("Joseph", "Allen", "jallen@email.com", "(555) 777-8888", "Dallas", "TX", "75201", "Hot rod restoration", 8), - Indiv("Susan", "Young", "syoung@email.com", "(555) 888-9999", "San Jose", "CA", "95101", "Home décor projects", 1), - Indiv("Charles", "King", "cking@email.com", "(555) 999-0000", "Austin", "TX", "78701", "Vintage car parts", 5), - Indiv("Linda", "Wright", "lwright@email.com", "(555) 000-1111", "Jacksonville", "FL", "32201", "Outdoor metalwork restoration", 3), - Indiv("Gary", "Nelson", "gnelson@email.com", "(555) 131-4141", "Minneapolis", "MN", "55401", "Snowmobile frame and parts", 2), - Indiv("Carol", "Evans", "carol.evans@email.com", "(555) 242-5252", "Portland", "OR", "97207", "Vintage bicycle restoration", 1), - Indiv("Kenneth", "Scott", "kscott@email.com", "(555) 353-6363", "Baltimore", "MD", "21201", "Antique tool restoration", 3), - Indiv("Helen", "Green", "hgreen@email.com", "(555) 464-7474", "Memphis", "TN", "38101", "Wrought iron bed frame", 4), - Indiv("Donald", "Baker", "dbaker@email.com", "(555) 575-8585", "Louisville", "KY", "40201", "Classic truck restoration", 6), - Indiv("Donna", "Adams", "dadams@email.com", "(555) 686-9696", "Richmond", "VA", "23218", "Outdoor light fixture set", 2), - Indiv("Steven", "Nelson", "steven.n@email.com", "(555) 797-0707", "Columbus", "OH", "43202", "Motorcycle frame and tank", 5), - Indiv("Patricia", "Carter", "pcarter@email.com", "(555) 808-1818", "Austin", "TX", "78703", "Patio table and chair set — 6pc", 3), - Indiv("Mark", "Mitchell", "mmitchell@email.com", "(555) 919-2929", "Denver", "CO", "80204", "Car wheels — set of 4", 1), - Indiv("Sandra", "Perez", "sperez@email.com", "(555) 020-3030", "El Paso", "TX", "79901", "Spiral staircase railing", 4), - Indiv("George", "Roberts", "groberts@email.com", "(555) 141-4242", "Fort Worth", "TX", "76101", "Boat trailer frame", 3), - Indiv("Kathleen", "Turner", "kturner@email.com", "(555) 252-5353", "Nashville", "TN", "37202", "Fireplace grate and screen", 2), - Indiv("Eric", "Phillips", "ephillips@email.com", "(555) 363-6464", "Seattle", "WA", "98105", "Mountain bike frame", 1), - Indiv("Sharon", "Campbell", "scampbell@email.com", "(555) 474-7575", "Boston", "MA", "02102", "Iron garden bench set", 5), - Indiv("Larry", "Parker", "lparker@email.com", "(555) 585-8686", "Detroit", "MI", "48203", "Classic Mustang wheels and trim", 8), - Indiv("Shirley", "Evans", "shevans@email.com", "(555) 696-9797", "Charlotte", "NC", "28202", "Deck railing system", 3), - Indiv("Timothy", "Edwards", "tedwards@email.com", "(555) 707-0808", "Memphis", "TN", "38102", "ATV frame and fenders", 2), - Indiv("Angela", "Collins", "acollins@email.com", "(555) 818-1919", "Las Vegas", "NV", "89101", "Casino chair legs — set of 24", 4), - Indiv("Harold", "Stewart", "hstewart@email.com", "(555) 929-2020", "Tucson", "AZ", "85701", "Vintage pickup restoration parts", 6), - Indiv("Pamela", "Sanchez", "psanchez@email.com", "(555) 030-3131", "Sacramento", "CA", "95815", "Wrought iron wine rack", 1), - Indiv("Edward", "Morris", "emorris@email.com", "(555) 141-4343", "Raleigh", "NC", "27601", "Trailer hitch and receiver set", 2), - Indiv("Frances", "Rogers", "frogers@email.com", "(555) 252-5454", "Minneapolis", "MN", "55402", "Mid-century chair frames — 4pc", 3), - Indiv("Phillip", "Reed", "preed@email.com", "(555) 363-6565", "Omaha", "NE", "68101", "Go-kart frame and roll cage", 1), - Indiv("Ruth", "Cook", "rcook@email.com", "(555) 474-7676", "Tulsa", "OK", "74101", "Farmhouse shelving brackets — large set", 2), - Indiv("Andrew", "Morgan", "amorgan@email.com", "(555) 585-8787", "Atlanta", "GA", "30302", "Drift car cage and subframe", 4), - Indiv("Mildred", "Bell", "mbell@email.com", "(555) 696-9898", "Cincinnati", "OH", "45201", "Garden gate and fence panels", 5), - Indiv("Ralph", "Murphy", "rmurphy@email.com", "(555) 707-0909", "Fresno", "CA", "93701", "Custom motorcycle exhaust system", 3), - Indiv("Lois", "Rivera", "lrivera@email.com", "(555) 818-1010", "Corpus Christi", "TX", "78401", "Outdoor kitchen frame and brackets", 2), - Indiv("Roy", "Cooper", "rcooper@email.com", "(555) 929-2121", "Arlington", "TX", "76001", "Vintage tractor restoration parts", 7), - Indiv("Vera", "Richardson","vrichardson@email.com", "(555) 030-3232", "Lexington", "KY", "40502", "Wrought iron headboard and footboard", 4), + Indiv("James", "Thompson", "jthompson@email.com", "(555) 111-2222", "Los Angeles", "CA", "90001", "Classic car restoration hobbyist", 6), + Indiv("Mary", "Harris", "mharris@email.com", "(555) 222-3333", "Houston", "TX", "77001", "Patio furniture refurbishment", 4), + Indiv("William", "Clark", "wclark@email.com", "(555) 333-4444", "Philadelphia", "PA", "19101", "Motorcycle customization", 7), + Indiv("Elizabeth","Lewis", "elewis@email.com", "(555) 444-5555", "Phoenix", "AZ", "85001", "Garden furniture restoration", 3), + Indiv("Richard", "Walker", "rwalker@email.com", "(555) 555-6666", "San Antonio", "TX", "78201", "Custom bike parts", 5), + Indiv("Barbara", "Hall", "bhall@email.com", "(555) 666-7777", "San Diego", "CA", "92101", "Antique furniture hardware", 2), + Indiv("Joseph", "Allen", "jallen@email.com", "(555) 777-8888", "Dallas", "TX", "75201", "Hot rod restoration", 8), + Indiv("Susan", "Young", "syoung@email.com", "(555) 888-9999", "San Jose", "CA", "95101", "Home decor projects", 1), + Indiv("Charles", "King", "cking@email.com", "(555) 999-0000", "Austin", "TX", "78701", "Vintage car parts", 5), + Indiv("Linda", "Wright", "lwright@email.com", "(555) 000-1111", "Jacksonville", "FL", "32201", "Outdoor metalwork restoration", 3), + Indiv("Gary", "Nelson", "gnelson@email.com", "(555) 131-4141", "Minneapolis", "MN", "55401", "Snowmobile frame and parts", 2), + Indiv("Carol", "Evans", "carol.evans@email.com", "(555) 242-5252", "Portland", "OR", "97207", "Vintage bicycle restoration", 1), }; // Add customers one at a time to handle duplicates gracefully diff --git a/src/PowderCoating.Infrastructure/Services/SeedDataService.Jobs.cs b/src/PowderCoating.Infrastructure/Services/SeedDataService.Jobs.cs index 13464d5..d6b6c41 100644 --- a/src/PowderCoating.Infrastructure/Services/SeedDataService.Jobs.cs +++ b/src/PowderCoating.Infrastructure/Services/SeedDataService.Jobs.cs @@ -98,34 +98,23 @@ public partial class SeedDataService if (n.Length >= 13 && int.TryParse(n.Substring(9, 4), out var x) && x > maxNum) maxNum = x; var seq = maxNum + 1; - // ── Status plan (50 jobs, covering all 16 statuses) ────────────────── - // Active pipeline: PENDING(4) QUOTED(3) APPROVED(4) IN_PREPARATION(4) - // SANDBLASTING(4) MASKING_TAPING(3) CLEANING(3) IN_OVEN(3) - // COATING(4) CURING(3) QUALITY_CHECK(3) COMPLETED(5) - // READY_FOR_PICKUP(4) DELIVERED(3) ON_HOLD(2) CANCELLED(2) - // - // Maps job index to a status code, distributing all 16 statuses across 50 jobs. - // ON_HOLD and CANCELLED are placed last (indices 48–49) because they are terminal - // side-branches that affect date logic and status history traversal differently. - static string StatusFor(int i) => i switch - { - < 4 => "PENDING", - < 7 => "QUOTED", - < 11 => "APPROVED", - < 15 => "IN_PREPARATION", - < 19 => "SANDBLASTING", - < 22 => "MASKING_TAPING", - < 25 => "CLEANING", - < 28 => "IN_OVEN", - < 32 => "COATING", - < 35 => "CURING", - < 38 => "QUALITY_CHECK", - < 43 => "COMPLETED", - < 47 => "READY_FOR_PICKUP", - < 48 => "DELIVERED", - < 49 => "ON_HOLD", - _ => "CANCELLED" - }; + // ── Per-customer job counts (27 customers, ~32 total jobs) ────────── + // Varied 0-5 jobs per customer; the global jobIdx cycles all 16 statuses + // so every status is visible without requiring a large fixed pool. + static int JobsFor(int ci) => new[] + { 3, 2, 1, 2, 0, 2, 1, 3, 0, 1, 2, 1, 0, 2, 1, 1, 2, 0, 1, 0, 2, 1, 0, 1, 0, 1, 2 }[ci]; + + // All 16 statuses in production workflow order — cycled globally across jobs + // so the full pipeline is represented even with fewer total records. + string[] allStatuses = + [ + "PENDING", "QUOTED", "APPROVED", "IN_PREPARATION", "SANDBLASTING", + "MASKING_TAPING", "CLEANING", "IN_OVEN", "COATING", "CURING", + "QUALITY_CHECK", "COMPLETED", "READY_FOR_PICKUP", "DELIVERED", + "ON_HOLD", "CANCELLED" + ]; + + string StatusFor(int jobIdx) => allStatuses[jobIdx % allStatuses.Length]; // Maps job index modulo 10 to a priority code. RUSH and URGENT are intentionally // over-represented (4 of 10) relative to production averages so the priority colour @@ -165,105 +154,113 @@ public partial class SeedDataService _ => ("Custom Steel Parts — Batch", "Matte Gray", true, false, 40) }; - var jobs = new List(); - var quoteIdx = 0; + var jobs = new List(); + var quoteIdx = 0; + var jobIdx = 0; // global counter drives status cycling across all customers - for (int i = 0; i < 50; i++) + for (int ci = 0; ci < customers.Count; ci++) { - var statusCode = StatusFor(i); - var priorityCode = PriorityFor(i); - var customer = customers[i % customers.Count]; + var customer = customers[ci]; + var numJobs = JobsFor(ci); - // Link an approved quote to the first 25 in-progress/active jobs - Quote? linkedQuote = null; - if (i < 25 && quoteIdx < approvedQuotes.Count) + for (int j = 0; j < numJobs; j++, jobIdx++, seq++) { - // Only link if the quote's customer matches OR if customers align by index - linkedQuote = approvedQuotes[quoteIdx++]; - customer = customers.FirstOrDefault(c => c.Id == linkedQuote.CustomerId) ?? customer; - } + var statusCode = StatusFor(jobIdx); + var priorityCode = PriorityFor(jobIdx); - // Date logic — creation spread from -21 days to today - // Scheduled: future for early statuses, past for completed ones - var isCompleted = statusCode is "COMPLETED" or "READY_FOR_PICKUP" or "DELIVERED" or "CANCELLED"; - var isInProgress = statusCode is "IN_PREPARATION" or "SANDBLASTING" or "MASKING_TAPING" - or "CLEANING" or "IN_OVEN" or "COATING" or "CURING" or "QUALITY_CHECK"; - var isEarly = statusCode is "PENDING" or "QUOTED" or "APPROVED"; - - int daysAgo = isCompleted ? 14 + (i % 7) - : isInProgress ? 5 + (i % 7) - : 0 + (i % 5); - var createdDate = now.AddDays(-daysAgo); - var scheduledDate = isCompleted ? createdDate.AddDays(2) - : isInProgress ? now.AddDays(-(i % 3)) - : now.AddDays(2 + (i % 10)); - var rushDays = priorityCode == "RUSH" ? 2 : priorityCode == "URGENT" ? 3 : 7; - var dueDate = scheduledDate.AddDays(rushDays); - var startedDate = (!isEarly) ? scheduledDate : (DateTime?)null; - var completedDate = isCompleted ? scheduledDate.AddDays(1) : (DateTime?)null; - - var assignedUserId = shopUsers.Count > 0 ? shopUsers[i % shopUsers.Count].Id : null; - - var itemCount = 1 + (i % 3); - var items = new List(); - - for (int j = 0; j < itemCount; j++) - { - var (desc, color, sand, mask, mins) = ItemSpec(i, j); - var qty = 1 + (j % 3); - var unitPrice = linkedQuote != null && j == 0 - ? Math.Round((linkedQuote.Total / itemCount), 2) - : Math.Round(75m + (i % 8) * 12.5m + j * 15m, 2); - - items.Add(new JobItem + // Link an approved quote when one is available + Quote? linkedQuote = null; + if (quoteIdx < approvedQuotes.Count) { - Description = desc, - Quantity = qty, - ColorName = color, - SurfaceAreaSqFt = 10m + j * 3.5m, - UnitPrice = unitPrice, - TotalPrice = unitPrice * qty, - LaborCost = Math.Round(unitPrice * qty * 0.35m, 2), - RequiresSandblasting = sand, - RequiresMasking = mask, - EstimatedMinutes = mins, - CompanyId = company.Id, - CreatedAt = createdDate + var candidate = approvedQuotes[quoteIdx]; + if (candidate.CustomerId == customer.Id || quoteIdx % 3 == 0) + { + linkedQuote = candidate; + quoteIdx++; + } + } + + // Date logic — creation spread over 4-6 months + // Older jobs for completed statuses, recent for in-progress, future-scheduled for early statuses + var isCompleted = statusCode is "COMPLETED" or "READY_FOR_PICKUP" or "DELIVERED" or "CANCELLED"; + var isInProgress = statusCode is "IN_PREPARATION" or "SANDBLASTING" or "MASKING_TAPING" + or "CLEANING" or "IN_OVEN" or "COATING" or "CURING" or "QUALITY_CHECK"; + var isEarly = statusCode is "PENDING" or "QUOTED" or "APPROVED"; + + // Spread creation over 30-150 days ago (1-5 months), older jobs for completed statuses + int daysAgo = isCompleted ? 60 + (jobIdx % 90) + : isInProgress ? 10 + (jobIdx % 40) + : 2 + (jobIdx % 15); + var createdDate = now.AddDays(-daysAgo); + var scheduledDate = isCompleted ? createdDate.AddDays(3 + (jobIdx % 5)) + : isInProgress ? now.AddDays(-(jobIdx % 4)) + : now.AddDays(3 + (jobIdx % 12)); + var rushDays = priorityCode == "RUSH" ? 2 : priorityCode == "URGENT" ? 3 : 7; + var dueDate = scheduledDate.AddDays(rushDays); + var startedDate = !isEarly ? scheduledDate : (DateTime?)null; + var completedDate = isCompleted ? scheduledDate.AddDays(1) : (DateTime?)null; + + var assignedUserId = shopUsers.Count > 0 ? shopUsers[jobIdx % shopUsers.Count].Id : null; + + var itemCount = 1 + (jobIdx % 3); + var items = new List(); + + for (int k = 0; k < itemCount; k++) + { + var (desc, color, sand, mask, mins) = ItemSpec(jobIdx, k); + var qty = 1 + (k % 3); + var unitPrice = linkedQuote != null && k == 0 + ? Math.Round(linkedQuote.Total / itemCount, 2) + : Math.Round(75m + (jobIdx % 8) * 12.5m + k * 15m, 2); + + items.Add(new JobItem + { + Description = desc, + Quantity = qty, + ColorName = color, + SurfaceAreaSqFt = 10m + k * 3.5m, + UnitPrice = unitPrice, + TotalPrice = unitPrice * qty, + LaborCost = Math.Round(unitPrice * qty * 0.35m, 2), + RequiresSandblasting = sand, + RequiresMasking = mask, + EstimatedMinutes = mins, + CompanyId = company.Id, + CreatedAt = createdDate + }); + } + + var finalPrice = items.Sum(it => it.TotalPrice); + var quotedPrice = linkedQuote?.Total ?? Math.Round(finalPrice * 1.05m, 2); + + jobs.Add(new Job + { + JobNumber = $"{prefix}{seq:D4}", + CustomerId = customer.Id, + QuoteId = linkedQuote?.Id, + AssignedUserId = assignedUserId, + Description = linkedQuote?.Description + ?? $"Powder coating services for {customer.CompanyName ?? $"{customer.ContactFirstName} {customer.ContactLastName}".Trim()}", + JobStatusId = jobStatuses[statusCode], + JobPriorityId = jobPriorities[priorityCode], + ScheduledDate = scheduledDate, + StartedDate = startedDate, + CompletedDate = completedDate, + DueDate = dueDate, + QuotedPrice = quotedPrice, + FinalPrice = finalPrice, + IsRushJob = priorityCode == "RUSH", + CustomerPO = linkedQuote?.CustomerPO ?? (jobIdx % 3 == 0 ? $"PO-{40000 + jobIdx}" : null), + SpecialInstructions = jobIdx % 6 == 0 ? "Customer supplied parts — handle with extra care." : + jobIdx % 11 == 0 ? "Match existing color exactly — bring sample for approval." : null, + InternalNotes = jobIdx % 8 == 0 ? "Vintage parts — do not use aggressive blast media." : null, + RequiresCustomerApproval = jobIdx % 5 == 0, + IsCustomerApproved = jobIdx % 5 != 0 || !isEarly, + JobItems = items, + CompanyId = company.Id, + CreatedAt = createdDate }); } - - var finalPrice = items.Sum(it => it.TotalPrice); - var quotedPrice = linkedQuote?.Total ?? Math.Round(finalPrice * 1.05m, 2); - - jobs.Add(new Job - { - JobNumber = $"{prefix}{seq:D4}", - CustomerId = customer.Id, - QuoteId = linkedQuote?.Id, - AssignedUserId = assignedUserId, - Description = linkedQuote?.Description - ?? $"Powder coating services for {customer.CompanyName ?? $"{customer.ContactFirstName} {customer.ContactLastName}".Trim()}", - JobStatusId = jobStatuses[statusCode], - JobPriorityId = jobPriorities[priorityCode], - ScheduledDate = scheduledDate, - StartedDate = startedDate, - CompletedDate = completedDate, - DueDate = dueDate, - QuotedPrice = quotedPrice, - FinalPrice = finalPrice, - IsRushJob = priorityCode == "RUSH", - CustomerPO = linkedQuote?.CustomerPO ?? (i % 3 == 0 ? $"PO-{40000 + i}" : null), - SpecialInstructions = i % 6 == 0 ? "Customer supplied parts — handle with extra care." : - i % 11 == 0 ? "Match existing color exactly — bring sample for approval." : null, - InternalNotes = i % 8 == 0 ? "Vintage parts — do not use aggressive blast media." : null, - RequiresCustomerApproval = i % 5 == 0, - IsCustomerApproved = i % 5 != 0 || !isEarly, - JobItems = items, - CompanyId = company.Id, - CreatedAt = createdDate - }); - - seq++; } await _context.Set().AddRangeAsync(jobs); diff --git a/src/PowderCoating.Infrastructure/Services/SeedDataService.Quotes.cs b/src/PowderCoating.Infrastructure/Services/SeedDataService.Quotes.cs index d3d650e..7d2013d 100644 --- a/src/PowderCoating.Infrastructure/Services/SeedDataService.Quotes.cs +++ b/src/PowderCoating.Infrastructure/Services/SeedDataService.Quotes.cs @@ -164,26 +164,26 @@ public partial class SeedDataService _ => ("Flat Black", true, false, 35, 10.0m) }; - // Maps quote index to a status code following the distribution plan above. - // APPROVED is the majority (35/75) to give SeedJobsAsync enough approved quotes to link jobs to. + // Maps quote index to a status code. + // APPROVED is the majority (10/20) to give SeedJobsAsync enough approved quotes to link jobs to. static string StatusFor(int i) => i switch { - < 8 => "DRAFT", - < 20 => "SENT", - < 55 => "APPROVED", - < 65 => "REJECTED", + < 2 => "DRAFT", + < 5 => "SENT", + < 15 => "APPROVED", + < 18 => "REJECTED", _ => "EXPIRED" }; var quotes = new List(); - for (int i = 0; i < 75; i++) + for (int i = 0; i < 20; i++) { var customer = customers[i % customers.Count]; var statusCode = StatusFor(i); - // Spread creation dates over the past 90 days; older first - var daysAgo = 90 - (int)(i * 1.2); + // Spread creation dates over the past 120–180 days (4-6 months); older first + var daysAgo = 180 - (int)(i * 9.0); var quoteDate = now.AddDays(-daysAgo); var expireDate = quoteDate.AddDays(30); diff --git a/src/PowderCoating.Infrastructure/Services/SeedDataService.Remove.cs b/src/PowderCoating.Infrastructure/Services/SeedDataService.Remove.cs index 35b7c3e..64178a7 100644 --- a/src/PowderCoating.Infrastructure/Services/SeedDataService.Remove.cs +++ b/src/PowderCoating.Infrastructure/Services/SeedDataService.Remove.cs @@ -12,14 +12,14 @@ public partial class SeedDataService /// private static readonly string[] SeededCustomerEmails = [ - "john.smith@acmemfg.com", "sjohnson@precisionauto.com", "mchen@urbanrailings.com", - "lmartinez@fitequip.com", "dwilliams@metrota.gov", "rtaylor@classicwheels.com", - "janderson@indfurniture.com", "cbrown@motorsportscustom.com", "adavis@greenenergy.com", - "tmiller@heritagemetal.com", "pwilson@marineequip.com", "kgarcia@commercialhvac.com", - "nmartinez@playgroundusa.com", "blee@officesystems.com", "swhite@agequipment.com", + "john.smith@acmemfg.com", "sjohnson@precisionauto.com", "rtaylor@classicwheels.com", + "cbrown@motorsportscustom.com", "janderson@indfurniture.com", "kgarcia@commercialhvac.com", + "swhite@agequipment.com", "mchen@urbanrailings.com", "tmiller@heritagemetal.com", + "lmartinez@fitequip.com", "nmartinez@playgroundusa.com", "pwilson@marineequip.com", + "blee@officesystems.com", "dwilliams@metrota.gov", "adavis@greenenergy.com", "jthompson@email.com", "mharris@email.com", "wclark@email.com", "elewis@email.com", "rwalker@email.com", "bhall@email.com", "jallen@email.com", "syoung@email.com", - "cking@email.com", "lwright@email.com" + "cking@email.com", "lwright@email.com", "gnelson@email.com", "carol.evans@email.com" ]; ///