Skip to content

Length and Duration as integer plus unit #52

@yepzdk

Description

@yepzdk

Description

distance and totalDuration on Route are currently free-text strings (src/Entity/Route.php). Split each into a numeric value (integer) and a unit (dropdown/enum, e.g., meters/km for distance, minutes/hours for duration).

Implementation

  • Add new fields (distanceValue, distanceUnit, durationValue, durationUnit) or use embedded value objects
  • Create a Doctrine migration with data conversion for existing records
  • Update admin form to use numeric input + unit dropdown
  • Update API serialization to expose the structured data

Part of #35

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions