96 lines
2.7 KiB
C#
96 lines
2.7 KiB
C#
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<Guid>
|
|
{
|
|
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<HomeSlideDto> SlidesDto
|
|
{
|
|
get
|
|
{
|
|
if (!string.IsNullOrEmpty(SlidesJson))
|
|
return JsonSerializer.Deserialize<List<HomeSlideDto>>(SlidesJson);
|
|
return [];
|
|
}
|
|
set { SlidesJson = JsonSerializer.Serialize(value); }
|
|
}
|
|
|
|
[JsonIgnore]
|
|
public string FeaturesJson { get; set; }
|
|
|
|
public List<HomeFeatureDto> FeaturesDto
|
|
{
|
|
get
|
|
{
|
|
if (!string.IsNullOrEmpty(FeaturesJson))
|
|
return JsonSerializer.Deserialize<List<HomeFeatureDto>>(FeaturesJson);
|
|
return [];
|
|
}
|
|
set { FeaturesJson = JsonSerializer.Serialize(value); }
|
|
}
|
|
|
|
[JsonIgnore]
|
|
public string SolutionsJson { get; set; }
|
|
|
|
public List<HomeSolutionDto> SolutionsDto
|
|
{
|
|
get
|
|
{
|
|
if (!string.IsNullOrEmpty(SolutionsJson))
|
|
return JsonSerializer.Deserialize<List<HomeSolutionDto>>(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<HomeSlideServiceDto> 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; }
|
|
}
|