namespace WeatherForecast.Models {

  /// <summary>
  /// 
  /// </summary>
  public class RouteModel {

    /// <summary>
    /// 
    /// </summary>
    public string Target { get; set; }

    /// <summary>
    /// 
    /// </summary>
    public string? Component { get; set; }

    /// <summary>
    /// 
    /// </summary>
    public List<RouteModel>? ChildRoutes { get; set; }

    /// <summary>
    /// 
    /// </summary>
    /// <param name="route"></param>
    public RouteModel(Core.DomainObjects.Route route) {
      Target = route.Target;
      Component = route.Component;
      ChildRoutes = route.ChildRoutes?.Select(x => new RouteModel(x)).ToList();
    }
  }
}
