using System.Collections.Generic; using zero.Core.Attributes; using zero.Core.Entities; namespace zero.Core.Routing { [Collection("Routes")] public class Route : ZeroIdEntity { /// /// Generated URL based on the URL provider /// public string Url { get; set; } /// /// Alias of the URL provider which generated this route /// public string ProviderAlias { get; set; } /// /// Enable this property so all routes are catched which start with this Url /// public bool AllowSuffix { get; set; } /// /// Additional parameters /// public Dictionary Params { get; set; } = new(); /// /// Contains references to the resolved collection entities /// public List References { get; set; } = new(); /// /// Route dependencies can be used for cache busting /// public List Dependencies { get; set; } = new(); } public class RouteReference { public string Id { get; set; } public string Collection { get; set; } public RouteReference() { } public RouteReference(string id, string collection) { Id = id; Collection = collection; } } }