Skip to content

Genesis Devices — Schema

Status: ✅ Shipped — GenesisDevice and PlanetFormation models are fully implemented with all documented fields, enums match exactly, and API endpoints exist; this is one of the more complete DATA_MODELS pages. (impl audit 2026-06-16)

Deployable terraforming devices and the per-deployment formation records they spawn. Companion docs: ../FEATURES/galaxy/genesis-devices.md, ../SYSTEMS/genesis-deploy.md.


GenesisDevice

Source: services/gameserver/src/models/genesis_device.py

Purpose: Deployable terraforming device; deploys to a sector to form a planet. Tracks process phase, success chance, and result.

Fields:

name type constraints notes
id UUID PK
name String(100) not null
serial_number String(50) unique, not null
type Enum genesis_type not null STANDARD/ENHANCED/SPECIALIZED/ADVANCED/EXPERIMENTAL/QUANTUM — only STANDARD, ENHANCED, ADVANCED are exposed at launch and map respectively to canonical tiers basic / enhanced / advanced per ../FEATURES/galaxy/genesis-devices.md. SPECIALIZED/EXPERIMENTAL/QUANTUM are reserved enum values for future tiers; the legacy "Experimental" tier name (a 100k-credit pre-launch concept with Earth-like bias) does not map to the canonical "advanced" tier (which is the Colony-Ship-sacrifice path per GD2).
status Enum genesis_status default INACTIVE INACTIVE/DEPLOYING/ACTIVE/COMPLETED/FAILED/UNSTABLE/ABORTED
owner_id UUID FK players.id not null
creator_faction String nullable
ship_id UUID FK ships.id nullable when stored on a ship
sector_id Integer nullable when deployed
planet_id UUID FK planets.id nullable target planet
deployed_at DateTime nullable
terraforming_power Integer default 100
terraforming_types ARRAY(String) default []
resource_generation, special_features JSONB / ARRAY defaults
phase, total_phases Integer default 0 / 1
progress Float default 0.0 0.0-1.0
estimated_completion DateTime nullable
resource_consumption JSONB default {}
stability Float default 1.0
failure_chance Float default 0.0
security_level Integer default 1
access_code String nullable
result_planet_type String nullable
result_planet_quality Float nullable 0.0-2.0
result_resources, result_special_features JSONB / ARRAY nullable

Relationships: - ownerPlayer. - shipShip (see ./ships.md), planetPlanet (the resulting planet — see ./planets.md). - formationsPlanetFormation (1:many, cascade delete).


PlanetFormation

Source: services/gameserver/src/models/genesis_device.py

Purpose: Per-deployment record of a Genesis device's formation process; produces a Planet.

Fields: id, genesis_device_id (FK), sector_id, original_conditions JSONB, started_at, completed_at, estimated_duration (hours), current_phase, total_phases, is_completed, is_failed, failure_reason, resulting_planet_id (FK planets.id), formation_log JSONB, anomalies JSONB.

Relationships: genesis_deviceGenesisDevice; resulting_planetPlanet (see ./planets.md).