using System.Collections.Generic;
using zero.Core.Attributes;
using zero.Core.Entities;
namespace zero.Core.Routing
{
[Collection("Routes")]
public class Route : IZeroIdEntity, IRoute
{
///
public string Id { get; set; }
///
public string AppId { get; set; }
///
public string Url { get; set; }
///
public Dictionary Params { get; set; } = new Dictionary();
///
public IList References { get; set; } = new List();
}
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;
}
}
public interface IRoute
{
///
/// Generated id
///
string Id { get; set; }
///
/// Affected application id
///
string AppId { get; set; }
///
/// Generated URL based on the URL provider
///
string Url { get; set; }
///
/// Additional parameters
///
Dictionary Params { get; set; }
///
/// Contains references to the resolved collection entities
///
IList References { get; set; }
}
}