using System; using System.Collections.Generic; using System.Text.Json; using System.Text.Json.Serialization; using Volo.Abp.Application.Dtos; namespace Sozsoft.Platform.Public; public class HomeDto : EntityDto { public string HeroBackgroundImageKey { get; set; } public string HeroPrimaryCtaKey { get; set; } public string HeroSecondaryCtaKey { get; set; } public string FeaturesTitleKey { get; set; } public string FeaturesSubtitleKey { get; set; } public string SolutionsTitleKey { get; set; } public string SolutionsSubtitleKey { get; set; } public string CtaTitleKey { get; set; } public string CtaSubtitleKey { get; set; } public string CtaButtonLabelKey { get; set; } [JsonIgnore] public string SlidesJson { get; set; } public List SlidesDto { get { if (!string.IsNullOrEmpty(SlidesJson)) return JsonSerializer.Deserialize>(SlidesJson); return []; } set { SlidesJson = JsonSerializer.Serialize(value); } } [JsonIgnore] public string FeaturesJson { get; set; } public List FeaturesDto { get { if (!string.IsNullOrEmpty(FeaturesJson)) return JsonSerializer.Deserialize>(FeaturesJson); return []; } set { FeaturesJson = JsonSerializer.Serialize(value); } } [JsonIgnore] public string SolutionsJson { get; set; } public List SolutionsDto { get { if (!string.IsNullOrEmpty(SolutionsJson)) return JsonSerializer.Deserialize>(SolutionsJson); return []; } set { SolutionsJson = JsonSerializer.Serialize(value); } } } public class HomeSlideDto { public string TitleKey { get; set; } public string SubtitleKey { get; set; } public string StyleClass { get; set; } public List Services { get; set; } = []; } public class HomeSlideServiceDto { public string Icon { get; set; } public string TitleKey { get; set; } public string DescriptionKey { get; set; } public string StyleClass { get; set; } } public class HomeFeatureDto { public string Icon { get; set; } public string TitleKey { get; set; } public string DescriptionKey { get; set; } public string StyleClass { get; set; } } public class HomeSolutionDto { public string Icon { get; set; } public string ColorClass { get; set; } public string TitleKey { get; set; } public string DescriptionKey { get; set; } public string StyleClass { get; set; } }