72 lines
2.5 KiB
C#
72 lines
2.5 KiB
C#
using Core.Abstractions.Models;
|
|
using Core.DomainObjects;
|
|
using Core.DomainObjects.Documents;
|
|
using WeatherForecast.Models.Pages;
|
|
using WeatherForecast.Models.PageSections;
|
|
|
|
namespace WeatherForecast.Models.Responses {
|
|
|
|
public class GetContentResponseModel : ResponseModel {
|
|
public string SiteName { get; set; }
|
|
public string SiteUrl { get; set; }
|
|
|
|
public HeaderModel Header { get; set; }
|
|
|
|
public LocalizationModel Localization { get; set; }
|
|
|
|
public List<RouteModel> Routes { get; set; }
|
|
public List<RouteModel> AdminRoutes { get; set; }
|
|
public List<RouteModel> ServiceRoutes { get; set; }
|
|
|
|
public List<MenuItemModel> TopMenu { get; set; }
|
|
public List<MenuItemModel> SideMenu { get; set; }
|
|
|
|
/// <summary>
|
|
/// Home page static front end content
|
|
/// </summary>
|
|
public HomePageModel HomePage { get; set; }
|
|
|
|
/// <summary>
|
|
/// Shop catalog page static front end content
|
|
/// </summary>
|
|
public ShopCatalogPageModel ShopCatalog { get; set; }
|
|
|
|
/// <summary>
|
|
/// Shop item page static front end content
|
|
/// </summary>
|
|
public ShopItemPageModel ShopItem { get; set; }
|
|
|
|
public ShopCartPageModel ShopCart { get; set; }
|
|
public ShopCheckoutPageModel ShopCheckout { get; set; }
|
|
|
|
|
|
public BlogCatalogPageModel BlogCatalog { get; set; }
|
|
public BlogItemPageModel BlogItem { get; set; }
|
|
|
|
public GetContentResponseModel(Content domainObject) {
|
|
|
|
SiteName = domainObject.SiteName;
|
|
SiteUrl = domainObject.SiteUrl;
|
|
|
|
Header = new HeaderModel(domainObject.Header);
|
|
Localization = new LocalizationModel(domainObject.Localization);
|
|
|
|
Routes = domainObject.Routes.Select(x => new RouteModel(x)).ToList();
|
|
AdminRoutes = domainObject.AdminRoutes.Select(x => new RouteModel(x)).ToList();
|
|
ServiceRoutes = domainObject.ServiceRoutes.Select(x => new RouteModel(x)).ToList();
|
|
|
|
TopMenu = domainObject.TopMenu.Select(x => new MenuItemModel(x)).ToList();
|
|
SideMenu = domainObject.SideMenu.Select(x => new MenuItemModel(x)).ToList();
|
|
|
|
HomePage = new HomePageModel(domainObject.HomePage);
|
|
ShopCatalog = new ShopCatalogPageModel(domainObject.ShopCatalog);
|
|
ShopItem = new ShopItemPageModel(domainObject.ShopItem);
|
|
ShopCart = new ShopCartPageModel(domainObject.ShopCart);
|
|
ShopCheckout = new ShopCheckoutPageModel(domainObject.ShopCheckout);
|
|
|
|
BlogCatalog = new BlogCatalogPageModel(domainObject.BlogCatalog);
|
|
BlogItem = new BlogItemPageModel(domainObject.BlogItem);
|
|
}
|
|
}
|
|
}
|