diff --git a/website/app/Models/ServiceBuildMilestone.php b/website/app/Models/ServiceBuildMilestone.php new file mode 100644 index 0000000..86fcb79 --- /dev/null +++ b/website/app/Models/ServiceBuildMilestone.php @@ -0,0 +1,65 @@ + + */ + public const STAGES = [ + self::STAGE_ORDERED, + self::STAGE_HARDWARE_ACQUIRED, + self::STAGE_ASSEMBLY, + self::STAGE_RACKED, + self::STAGE_DEPLOYED, + ]; + + protected $fillable = [ + 'subscription_id', + 'stage', + 'reached_at', + 'note', + 'updated_by', + ]; + + /** @return array */ + protected function casts(): array + { + return [ + 'reached_at' => 'datetime', + ]; + } + + public function subscription(): BelongsTo + { + return $this->belongsTo(Subscription::class); + } + + public function updatedBy(): BelongsTo + { + return $this->belongsTo(User::class, 'updated_by'); + } +} diff --git a/website/database/migrations/2026_04_26_213331_add_setup_fee_to_plans_table.php b/website/database/migrations/2026_04_26_213331_add_setup_fee_to_plans_table.php new file mode 100644 index 0000000..9566dd4 --- /dev/null +++ b/website/database/migrations/2026_04_26_213331_add_setup_fee_to_plans_table.php @@ -0,0 +1,24 @@ +decimal('setup_fee', 10, 2)->default(0)->after('price'); + }); + } + + public function down(): void + { + Schema::table('plans', function (Blueprint $table): void { + $table->dropColumn('setup_fee'); + }); + } +}; diff --git a/website/database/migrations/2026_04_26_213332_create_service_build_milestones_table.php b/website/database/migrations/2026_04_26_213332_create_service_build_milestones_table.php new file mode 100644 index 0000000..339a494 --- /dev/null +++ b/website/database/migrations/2026_04_26_213332_create_service_build_milestones_table.php @@ -0,0 +1,31 @@ +id(); + $table->foreignId('subscription_id')->constrained()->cascadeOnDelete(); + $table->string('stage', 32); // ordered | hardware_acquired | assembly | racked | deployed + $table->timestamp('reached_at')->nullable(); + $table->text('note')->nullable(); + $table->foreignId('updated_by')->nullable()->constrained('users')->nullOnDelete(); + $table->timestamps(); + + $table->unique(['subscription_id', 'stage']); + $table->index(['subscription_id', 'reached_at']); + }); + } + + public function down(): void + { + Schema::dropIfExists('service_build_milestones'); + } +}; diff --git a/website/database/seeders/PlanSeeder.php b/website/database/seeders/PlanSeeder.php index 20566e0..fb551fa 100644 --- a/website/database/seeders/PlanSeeder.php +++ b/website/database/seeders/PlanSeeder.php @@ -21,21 +21,10 @@ class PlanSeeder extends Seeder ]) ->update(['status' => 'inactive']); - // ─── Archive old dedicated server plans (12th/13th gen) ────── - $oldDedicatedSlugs = [ - 'dell-r330-lff', - 'dell-r420-lff', - 'dell-r620-sff-10-bay', - 'dell-r620-sff-8-bay', - 'dell-r520-lff', - 'dell-r430-lff', - 'dell-r630-sff', - 'dell-r730-lff', - ]; - - Plan::query() - ->whereIn('slug', $oldDedicatedSlugs) - ->update(['status' => 'hidden']); + // ─── Existing 12th/13th-gen dedicated plans stay rentable as + // ─── "in stock" inventory alongside the new 14th-gen build-to- + // ─── order line. Their status is set per-row in the seeder + // ─── definitions below. $plans = [ // ─── VPS Plans ───────────────────────────────────────────────── @@ -230,7 +219,7 @@ class PlanSeeder extends Seeder 'sort_order' => 9, ], - // ─── Dedicated Server Plans — OLD (12th/13th Gen, hidden) ─── + // ─── Dedicated Server Plans — In-Stock 12th/13th Gen (rack inventory) ─── [ 'name' => 'Dell R330 LFF', 'slug' => 'dell-r330-lff', @@ -247,8 +236,9 @@ class PlanSeeder extends Seeder 'ipv4' => '1 IPv4', 'ipv6' => '1 /64 IPv6', 'management' => 'SynergyCP', + 'generation' => '12th-gen', ], - 'status' => 'hidden', + 'status' => 'active', 'stock_quantity' => 3, 'sort_order' => 100, ], @@ -268,8 +258,9 @@ class PlanSeeder extends Seeder 'ipv4' => '1 IPv4', 'ipv6' => '1 /64 IPv6', 'management' => 'SynergyCP', + 'generation' => '12th-gen', ], - 'status' => 'hidden', + 'status' => 'active', 'stock_quantity' => 0, 'sort_order' => 101, ], @@ -289,8 +280,9 @@ class PlanSeeder extends Seeder 'ipv4' => '1 IPv4', 'ipv6' => '1 /64 IPv6', 'management' => 'SynergyCP', + 'generation' => '12th-gen', ], - 'status' => 'hidden', + 'status' => 'active', 'stock_quantity' => 0, 'sort_order' => 102, ], @@ -310,8 +302,9 @@ class PlanSeeder extends Seeder 'ipv4' => '1 IPv4', 'ipv6' => '1 /64 IPv6', 'management' => 'SynergyCP', + 'generation' => '12th-gen', ], - 'status' => 'hidden', + 'status' => 'active', 'stock_quantity' => 0, 'sort_order' => 103, ], @@ -331,8 +324,9 @@ class PlanSeeder extends Seeder 'ipv4' => '1 IPv4', 'ipv6' => '1 /64 IPv6', 'management' => 'SynergyCP', + 'generation' => '12th-gen', ], - 'status' => 'hidden', + 'status' => 'active', 'stock_quantity' => 2, 'sort_order' => 104, ], @@ -352,8 +346,9 @@ class PlanSeeder extends Seeder 'ipv4' => '1 IPv4', 'ipv6' => '1 /64 IPv6', 'management' => 'SynergyCP', + 'generation' => '13th-gen', ], - 'status' => 'hidden', + 'status' => 'active', 'stock_quantity' => 1, 'sort_order' => 105, ], @@ -373,8 +368,9 @@ class PlanSeeder extends Seeder 'ipv4' => '1 IPv4', 'ipv6' => '1 /64 IPv6', 'management' => 'SynergyCP', + 'generation' => '13th-gen', ], - 'status' => 'hidden', + 'status' => 'active', 'stock_quantity' => 1, 'sort_order' => 106, ], @@ -394,103 +390,270 @@ class PlanSeeder extends Seeder 'ipv4' => '1 IPv4', 'ipv6' => '1 /64 IPv6', 'management' => 'SynergyCP', + 'generation' => '13th-gen', ], - 'status' => 'hidden', + 'status' => 'active', 'stock_quantity' => 1, 'sort_order' => 107, ], - // ─── Dedicated Server Plans — NEW (14th Gen) ──────────────── + // ─── Dedicated Server Plans — Build-to-Order 14th Gen ─────────── [ - 'name' => 'Dell R440', - 'slug' => 'dell-r440', - 'description' => 'Entry-level dedicated server. Xeon Scalable, DDR4 ECC, 4x LFF drive bays. Perfect for small businesses, web hosting, and development.', + 'name' => 'Dell R440 — 4-Bay LFF (1U)', + 'slug' => 'r440-4lff', + 'description' => 'Entry-level dual-socket 14th-gen rackmount. Ideal for small databases, web hosting, or budget compute. Built to order in 7-10 business days from our Atlanta datacenter.', 'service_type' => 'dedicated', - 'price' => 79.00, + 'price' => 119.00, + 'setup_fee' => 349.00, 'billing_cycle' => 'monthly', 'features' => [ - 'cpu' => 'Intel Xeon Scalable', - 'ram' => 'DDR4 ECC', - 'storage_bays' => '4x LFF bays', - 'bandwidth' => '10 TB', - 'ipv4' => '1 IPv4', - 'ipv6' => '1 /64 IPv6', - 'management' => 'SynergyCP', + 'generation' => '14th-gen', + 'chassis' => 'R440', + 'form_factor' => '1U', + 'bays' => '4x 3.5" LFF', + 'bay_count' => 4, + 'bay_type' => 'LFF', + 'cpu' => '2x Intel Xeon Gold 6230 (40C / 2.10 GHz)', + 'cpu_class' => 'Cascade Lake Refresh', + 'ram' => '32 GB DDR4-2666 ECC RDIMM', + 'boot' => 'Dell BOSS — 2x 240 GB M.2 (mirrored)', + 'storage_controller' => 'PERC HBA330 (Non-RAID, IT mode)', + 'idrac' => 'iDRAC9 Enterprise', + 'network' => '1x 1 GbE + 1x 10 Gbps SFP+', + 'bandwidth' => '1 Gbps unmetered', + 'ipv4' => '1 Included', + 'ipv6' => '/64 Included', + 'lead_time_days' => '7-10', + 'tier' => 2, ], + 'stock_quantity' => null, + 'status' => 'active', 'sort_order' => 10, ], [ - 'name' => 'Dell R640', - 'slug' => 'dell-r640', - 'description' => 'High-performance 1U server. Xeon Scalable, DDR4 ECC, 8x SFF drive slots. Ideal for production applications, databases, and virtualization.', + 'name' => 'Dell R540 — 8-Bay LFF (2U)', + 'slug' => 'r540-8lff', + 'description' => 'Storage-optimized 2U server. Perfect for ZFS file servers, backup targets, and bulk media storage. Built to order in 7-10 business days.', 'service_type' => 'dedicated', - 'price' => 109.00, + 'price' => 159.00, + 'setup_fee' => 549.00, 'billing_cycle' => 'monthly', 'features' => [ - 'cpu' => 'Intel Xeon Scalable', - 'ram' => 'DDR4 ECC', - 'storage_bays' => '8x SFF slots', - 'bandwidth' => '10 TB', - 'ipv4' => '1 IPv4', - 'ipv6' => '1 /64 IPv6', - 'management' => 'SynergyCP', + 'generation' => '14th-gen', + 'chassis' => 'R540', + 'form_factor' => '2U', + 'bays' => '8x 3.5" LFF', + 'bay_count' => 8, + 'bay_type' => 'LFF', + 'cpu' => '2x Intel Xeon Gold 6230 (40C / 2.10 GHz)', + 'cpu_class' => 'Cascade Lake Refresh', + 'ram' => '32 GB DDR4-2666 ECC RDIMM', + 'boot' => 'Dell BOSS — 2x 240 GB M.2 (mirrored)', + 'storage_controller' => 'PERC HBA330 (Non-RAID, IT mode)', + 'idrac' => 'iDRAC9 Enterprise', + 'network' => '1x 1 GbE + 1x 10 Gbps SFP+', + 'bandwidth' => '1 Gbps unmetered', + 'ipv4' => '1 Included', + 'ipv6' => '/64 Included', + 'lead_time_days' => '7-10', + 'tier' => 3, ], + 'stock_quantity' => null, + 'status' => 'active', 'sort_order' => 11, ], [ - 'name' => 'Dell R540', - 'slug' => 'dell-r540', - 'description' => 'Storage-optimized 2U server. Xeon Scalable, DDR4 ECC, 8x LFF drive bays. Built for large databases, file servers, and storage-heavy workloads.', + 'name' => 'Dell R640 — 8-Bay SFF (1U)', + 'slug' => 'r640-8sff', + 'description' => 'High-performance 1U with 8 SFF bays. Best fit for application servers, mid-tier databases, and virtualization.', 'service_type' => 'dedicated', - 'price' => 119.00, + 'price' => 179.00, + 'setup_fee' => 349.00, 'billing_cycle' => 'monthly', 'features' => [ - 'cpu' => 'Intel Xeon Scalable', - 'ram' => 'DDR4 ECC', - 'storage_bays' => '8x LFF bays', - 'bandwidth' => '10 TB', - 'ipv4' => '1 IPv4', - 'ipv6' => '1 /64 IPv6', - 'management' => 'SynergyCP', + 'generation' => '14th-gen', + 'chassis' => 'R640', + 'form_factor' => '1U', + 'bays' => '8x 2.5" SFF', + 'bay_count' => 8, + 'bay_type' => 'SFF', + 'cpu' => '2x Intel Xeon Gold 6230 (40C / 2.10 GHz)', + 'cpu_class' => 'Cascade Lake Refresh', + 'ram' => '32 GB DDR4-2666 ECC RDIMM', + 'boot' => 'Dell BOSS — 2x 240 GB M.2 (mirrored)', + 'storage_controller' => 'PERC HBA330 (Non-RAID, mini)', + 'idrac' => 'iDRAC9 Enterprise', + 'network' => '1x 1 GbE + 1x 10 Gbps SFP+', + 'bandwidth' => '1 Gbps unmetered', + 'ipv4' => '1 Included', + 'ipv6' => '/64 Included', + 'lead_time_days' => '7-10', + 'tier' => 2, ], + 'stock_quantity' => null, + 'status' => 'active', 'sort_order' => 12, ], [ - 'name' => 'Dell R740', - 'slug' => 'dell-r740', - 'description' => 'Enterprise 2U server. Xeon Scalable, DDR4 ECC, 16x SFF drive slots. Maximum expansion for high-density deployments and virtualization.', + 'name' => 'Dell R740 — 16-Bay SFF (2U)', + 'slug' => 'r740-16sff', + 'description' => 'Dense 2U server with 16 SFF bays. Built for high-performance workloads, large SSD arrays, and VPS host nodes.', 'service_type' => 'dedicated', - 'price' => 159.00, + 'price' => 229.00, + 'setup_fee' => 549.00, 'billing_cycle' => 'monthly', 'features' => [ - 'cpu' => 'Intel Xeon Scalable', - 'ram' => 'DDR4 ECC', - 'storage_bays' => '16x SFF slots', - 'bandwidth' => '10 TB', - 'ipv4' => '1 IPv4', - 'ipv6' => '1 /64 IPv6', - 'management' => 'SynergyCP', + 'generation' => '14th-gen', + 'chassis' => 'R740', + 'form_factor' => '2U', + 'bays' => '16x 2.5" SFF', + 'bay_count' => 16, + 'bay_type' => 'SFF', + 'cpu' => '2x Intel Xeon Gold 6230 (40C / 2.10 GHz)', + 'cpu_class' => 'Cascade Lake Refresh', + 'ram' => '32 GB DDR4-2666 ECC RDIMM', + 'boot' => 'Dell BOSS — 2x 240 GB M.2 (mirrored)', + 'storage_controller' => 'PERC HBA330 (Non-RAID, mini)', + 'idrac' => 'iDRAC9 Enterprise', + 'network' => '1x 1 GbE + 1x 10 Gbps SFP+', + 'bandwidth' => '1 Gbps unmetered', + 'ipv4' => '1 Included', + 'ipv6' => '/64 Included', + 'lead_time_days' => '7-10', + 'tier' => 3, ], + 'stock_quantity' => null, + 'status' => 'active', 'sort_order' => 13, ], [ - 'name' => 'Storage Server 36-Bay', - 'slug' => 'stor-36bay', - 'description' => 'High-capacity storage server. Dual Xeon E5-2695 v4, 256GB DDR4 ECC, 36x 3.5" drive bays. Massive raw storage for backups, archives, and data lakes.', + 'name' => 'Dell R740xd — 24-Bay SFF (2U)', + 'slug' => 'r740xd-24sff', + 'description' => 'Maximum SFF density: 24 small form-factor bays for large SSD arrays, distributed storage, and supercluster nodes.', 'service_type' => 'dedicated', - 'price' => 449.00, + 'price' => 279.00, + 'setup_fee' => 549.00, 'billing_cycle' => 'monthly', 'features' => [ - 'cpu' => '2x Intel Xeon E5-2695 v4', - 'ram' => '256 GB DDR4 ECC', - 'storage_bays' => '36x 3.5" bays', - 'bandwidth' => '10 TB', - 'ipv4' => '1 IPv4', - 'ipv6' => '1 /64 IPv6', - 'management' => 'SynergyCP', + 'generation' => '14th-gen', + 'chassis' => 'R740xd', + 'form_factor' => '2U', + 'bays' => '24x 2.5" SFF', + 'bay_count' => 24, + 'bay_type' => 'SFF', + 'cpu' => '2x Intel Xeon Gold 6230 (40C / 2.10 GHz)', + 'cpu_class' => 'Cascade Lake Refresh', + 'ram' => '32 GB DDR4-2666 ECC RDIMM', + 'boot' => 'Dell BOSS — 2x 240 GB M.2 (mirrored)', + 'storage_controller' => 'PERC HBA330 (Non-RAID, mini)', + 'idrac' => 'iDRAC9 Enterprise', + 'network' => '1x 1 GbE + 1x 10 Gbps SFP+', + 'bandwidth' => '1 Gbps unmetered', + 'ipv4' => '1 Included', + 'ipv6' => '/64 Included', + 'lead_time_days' => '7-10', + 'tier' => 3, ], + 'stock_quantity' => null, + 'status' => 'active', 'sort_order' => 14, ], + [ + 'name' => 'Dell R740xd — 12-Bay LFF (2U)', + 'slug' => 'r740xd-12lff', + 'description' => 'Bulk storage workhorse: 12 large form-factor bays for ZFS pools, archive servers, and high-capacity object stores.', + 'service_type' => 'dedicated', + 'price' => 249.00, + 'setup_fee' => 549.00, + 'billing_cycle' => 'monthly', + 'features' => [ + 'generation' => '14th-gen', + 'chassis' => 'R740xd', + 'form_factor' => '2U', + 'bays' => '12x 3.5" LFF', + 'bay_count' => 12, + 'bay_type' => 'LFF', + 'cpu' => '2x Intel Xeon Gold 6230 (40C / 2.10 GHz)', + 'cpu_class' => 'Cascade Lake Refresh', + 'ram' => '32 GB DDR4-2666 ECC RDIMM', + 'boot' => 'Dell BOSS — 2x 240 GB M.2 (mirrored)', + 'storage_controller' => 'PERC HBA330 (Non-RAID, mini)', + 'idrac' => 'iDRAC9 Enterprise', + 'network' => '1x 1 GbE + 1x 10 Gbps SFP+', + 'bandwidth' => '1 Gbps unmetered', + 'ipv4' => '1 Included', + 'ipv6' => '/64 Included', + 'lead_time_days' => '7-10', + 'tier' => 3, + ], + 'stock_quantity' => null, + 'status' => 'active', + 'sort_order' => 15, + ], + [ + 'name' => 'Dell R640 NVMe — 10-Bay U.2 (1U)', + 'slug' => 'r640-10nvme', + 'description' => 'Extreme IOPS in 1U. 10x U.2 NVMe bays for latency-sensitive databases, in-memory caches, and edge inference.', + 'service_type' => 'dedicated', + 'price' => 239.00, + 'setup_fee' => 799.00, + 'billing_cycle' => 'monthly', + 'features' => [ + 'generation' => '14th-gen', + 'chassis' => 'R640 NVMe', + 'form_factor' => '1U', + 'bays' => '10x U.2 NVMe', + 'bay_count' => 10, + 'bay_type' => 'NVMe', + 'cpu' => '2x Intel Xeon Gold 6230 (40C / 2.10 GHz)', + 'cpu_class' => 'Cascade Lake Refresh', + 'ram' => '32 GB DDR4-2666 ECC RDIMM', + 'boot' => 'Dell BOSS — 2x 240 GB M.2 (mirrored)', + 'storage_controller' => 'PERC HBA330 (drop on confirmed NVMe-only orders)', + 'idrac' => 'iDRAC9 Enterprise', + 'network' => '1x 1 GbE + 1x 10 Gbps SFP+', + 'bandwidth' => '1 Gbps unmetered', + 'ipv4' => '1 Included', + 'ipv6' => '/64 Included', + 'lead_time_days' => '7-10', + 'tier' => 4, + ], + 'stock_quantity' => null, + 'status' => 'active', + 'sort_order' => 16, + ], + [ + 'name' => 'Dell R740xd NVMe — 24-Bay U.2 (2U)', + 'slug' => 'r740xd-24nvme', + 'description' => 'Massive-density NVMe: 24x U.2 bays direct-attached to CPU PCIe lanes. Built for distributed databases, ML training storage, and high-IOPS object stores.', + 'service_type' => 'dedicated', + 'price' => 279.00, + 'setup_fee' => 799.00, + 'billing_cycle' => 'monthly', + 'features' => [ + 'generation' => '14th-gen', + 'chassis' => 'R740xd NVMe', + 'form_factor' => '2U', + 'bays' => '24x U.2 NVMe', + 'bay_count' => 24, + 'bay_type' => 'NVMe', + 'cpu' => '2x Intel Xeon Gold 6230 (40C / 2.10 GHz)', + 'cpu_class' => 'Cascade Lake Refresh', + 'ram' => '32 GB DDR4-2666 ECC RDIMM', + 'boot' => 'Dell BOSS — 2x 240 GB M.2 (mirrored)', + 'storage_controller' => 'N/A — pure-PCIe, software RAID only (mdraid / ZFS / btrfs)', + 'idrac' => 'iDRAC9 Enterprise', + 'network' => '1x 1 GbE + 1x 10 Gbps SFP+', + 'bandwidth' => '1 Gbps unmetered', + 'ipv4' => '1 Included', + 'ipv6' => '/64 Included', + 'lead_time_days' => '7-10', + 'tier' => 4, + ], + 'stock_quantity' => null, + 'status' => 'active', + 'sort_order' => 17, + ], // ─── Web Hosting Plans ─────────────────────────────────────── [ @@ -818,12 +981,15 @@ class PlanSeeder extends Seeder 'stor-500' => ['monthly' => 18.00, 'quarterly' => 51.30, 'semi_annual' => 97.20, 'annual' => 183.60], 'stor-1tb' => ['monthly' => 28.00, 'quarterly' => 79.80, 'semi_annual' => 151.20, 'annual' => 285.60], - // Dedicated Server Plans — NEW (14th Gen) - 'dell-r440' => ['monthly' => 79.00, 'quarterly' => 225.15, 'semi_annual' => 426.60, 'annual' => 805.80], - 'dell-r640' => ['monthly' => 109.00, 'quarterly' => 310.65, 'semi_annual' => 588.60, 'annual' => 1111.80], - 'dell-r540' => ['monthly' => 119.00, 'quarterly' => 339.15, 'semi_annual' => 642.60, 'annual' => 1213.80], - 'dell-r740' => ['monthly' => 159.00, 'quarterly' => 453.15, 'semi_annual' => 858.60, 'annual' => 1621.80], - 'stor-36bay' => ['monthly' => 449.00, 'quarterly' => 1279.65, 'semi_annual' => 2424.60, 'annual' => 4579.80], + // Dedicated Server Plans — Build-to-Order 14th Gen + 'r440-4lff' => ['monthly' => 119.00, 'quarterly' => 339.15, 'semi_annual' => 642.60, 'annual' => 1213.80], + 'r540-8lff' => ['monthly' => 159.00, 'quarterly' => 453.15, 'semi_annual' => 858.60, 'annual' => 1621.80], + 'r640-8sff' => ['monthly' => 179.00, 'quarterly' => 510.15, 'semi_annual' => 966.60, 'annual' => 1825.80], + 'r740-16sff' => ['monthly' => 229.00, 'quarterly' => 652.65, 'semi_annual' => 1236.60, 'annual' => 2335.80], + 'r740xd-24sff' => ['monthly' => 279.00, 'quarterly' => 795.15, 'semi_annual' => 1506.60, 'annual' => 2845.80], + 'r740xd-12lff' => ['monthly' => 249.00, 'quarterly' => 709.65, 'semi_annual' => 1344.60, 'annual' => 2539.80], + 'r640-10nvme' => ['monthly' => 239.00, 'quarterly' => 681.15, 'semi_annual' => 1290.60, 'annual' => 2437.80], + 'r740xd-24nvme' => ['monthly' => 279.00, 'quarterly' => 795.15, 'semi_annual' => 1506.60, 'annual' => 2845.80], // Web Hosting Plans 'hosting-small' => ['monthly' => 3.99, 'annual' => 40.68],