57 lines
1.2 KiB
C#
57 lines
1.2 KiB
C#
using DomainObjects;
|
|
using DomainObjects.PageSections;
|
|
using WeatherForecast.Models.Abstractions;
|
|
|
|
namespace WeatherForecast.Models.Content.Responses.PageSections {
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public class FeatureModel {
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string Icon { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string Title { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public string Text { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="feature"></param>
|
|
public FeatureModel(Feature feature) {
|
|
Icon = feature.Icon;
|
|
Title = feature.Title;
|
|
Text = feature.Text;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public class FeaturesSectionModel : PageSectionModelBase<FeaturesSection> {
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public List<FeatureModel> Items { get; set; }
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="featuresSection"></param>
|
|
public FeaturesSectionModel(FeaturesSection featuresSection) : base(featuresSection) {
|
|
Items = featuresSection.Items.Select(x => new FeatureModel(x)).ToList();
|
|
}
|
|
}
|
|
}
|