'int', 'order_id' => 'int', 'offer_id' => 'int', 'resource_pool_id' => 'int', 'host_id' => 'int', 'user_id' => 'int', 'instance_id' => 'int', 'network_attachment_id' => 'int', 'public_ip_pool_id' => 'int', 'public_ip_id' => 'int', 'cpu_cores' => 'int', 'memory_mib' => 'int', 'disk_gib' => 'int', 'expires_at' => 'int', 'released_at' => 'int', 'created_at' => 'int', 'updated_at' => 'int', ]; /** * Nullable columns permit an in-place legacy schema upgrade, but every * reservation created by current code must carry a complete immutable * network allocation boundary. */ protected static function booted(): void { static::creating(static function (self $reservation): void { foreach (['network_attachment_id', 'public_ip_pool_id', 'public_ip_id'] as $field) { if ((int) ($reservation->{$field} ?? 0) < 1) { throw new \LogicException( 'New reservations require complete network allocation references.' ); } } }); } }