mirror of
https://github.com/azaion/missions.git
synced 2026-06-21 15:11:06 +00:00
7025f4d075
Updated JWT authentication to use configuration values instead of hardcoded secrets, improving security and flexibility. Enhanced CORS policy to conditionally allow origins based on configuration settings, with logging for permissive defaults. Updated README to reflect project renaming and clarify service context.
56 lines
2.6 KiB
Markdown
56 lines
2.6 KiB
Markdown
# Module: `Azaion.Missions.Enums`
|
|
|
|
**Files (5)**: `Enums/VehicleType.cs`, `Enums/FuelType.cs`, `Enums/WaypointSource.cs`, `Enums/WaypointObjective.cs`, `Enums/ObjectStatus.cs`
|
|
|
|
> **NOTE (forward-looking)**: post-rename + post-multi-vehicle-support state. Today's source has `Enums/AircraftType.cs` with `Plane = 0`, `Copter = 1`. The expanded `VehicleType` is tracked under Jira AZ-EPIC child B6.
|
|
|
|
## Purpose
|
|
|
|
Domain enumerations used by entities and DTOs. All values are stored in PostgreSQL as `INTEGER NOT NULL DEFAULT 0` (per `DatabaseMigrator`).
|
|
|
|
## Public Interface
|
|
|
|
| Enum | Members (value) |
|
|
|------|-----------------|
|
|
| `VehicleType` | `Plane = 0`, `Copter = 1`, `UGV = 2`, `GuidedMissile = 3` |
|
|
| `FuelType` | `Electric = 0`, `Gasoline = 1`, `Diesel = 2` |
|
|
| `WaypointSource` | `Auto = 0`, `Manual = 1` |
|
|
| `WaypointObjective` | `Surveillance = 0`, `Strike = 1`, `Recon = 2` |
|
|
| `ObjectStatus` | `New = 0`, `Moved = 1`, `Removed = 2` |
|
|
|
|
## Internal Logic
|
|
|
|
None -- pure value lists. No `[Flags]`, no custom backing storage.
|
|
|
|
## Dependencies
|
|
|
|
None (no `using` of internal namespaces).
|
|
|
|
## Consumers
|
|
|
|
- `Database.Entities.Vehicle` -- `VehicleType`, `FuelType`
|
|
- `Database.Entities.Waypoint` -- `WaypointSource`, `WaypointObjective`
|
|
- `Database.Entities.MapObject` -- `ObjectStatus`
|
|
- `DTOs.CreateVehicleRequest`, `DTOs.UpdateVehicleRequest` -- `VehicleType`, `FuelType`
|
|
- `DTOs.CreateWaypointRequest`, `DTOs.UpdateWaypointRequest` -- `WaypointSource`, `WaypointObjective`
|
|
- `Services.WaypointService` -- `using` for symbol resolution; runtime use is via DTO/entity properties
|
|
|
|
## Data Models
|
|
|
|
The enums themselves; persisted as `INTEGER` columns (see `Database/DatabaseMigrator.cs`).
|
|
|
|
## Configuration / External Integrations / Security
|
|
|
|
None.
|
|
|
|
## Tests
|
|
|
|
None present.
|
|
|
|
## Notes / Smells
|
|
|
|
- **`VehicleType` covers UAV (Plane / Copter), UGV, and GuidedMissile** -- aligns with the broader fleet described in `../../../hardware/_standalone/target_acquisition/target_acquisition.md`. The previous `AircraftType` name was too narrow and excluded ground / loitering-munition vehicles.
|
|
- **`FuelType` may not fit `GuidedMissile`** -- a single-use missile has no battery/engine-consumption profile in the same sense. Carry forward as Phase C decision (Jira open: do we add `None` / make `FuelType` nullable?).
|
|
- The `WaypointObjective` set (`Surveillance`, `Strike`, `Recon`) covers the mission-level intent for any vehicle class.
|
|
- Integer-based persistence is positional; reordering or removing a member would silently corrupt existing rows. **Adding new members at the end (UGV = 2, GuidedMissile = 3) is safe** -- existing rows keep `Type = 0/1`.
|