52 lines
1.4 KiB
C#
52 lines
1.4 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 AboutDto : EntityDto<Guid>
|
|
{
|
|
public Guid? TenantId { get; set; }
|
|
|
|
[JsonIgnore]
|
|
public string StatsJson { get; set; }
|
|
public List<StatDto> StatsDto
|
|
{
|
|
get
|
|
{
|
|
if (!string.IsNullOrEmpty(StatsJson))
|
|
return JsonSerializer.Deserialize<List<StatDto>>(StatsJson);
|
|
return new List<StatDto>();
|
|
}
|
|
set { StatsJson = JsonSerializer.Serialize(value); }
|
|
}
|
|
|
|
[JsonIgnore]
|
|
public string DescriptionsJson { get; set; }
|
|
public List<string> DescriptionsDto
|
|
{
|
|
get
|
|
{
|
|
if (!string.IsNullOrEmpty(DescriptionsJson))
|
|
return JsonSerializer.Deserialize<List<string>>(DescriptionsJson);
|
|
return [];
|
|
}
|
|
set { DescriptionsJson = JsonSerializer.Serialize(value); }
|
|
}
|
|
|
|
[JsonIgnore]
|
|
public string SectionsJson { get; set; }
|
|
public List<SectionDto> SectionsDto
|
|
{
|
|
get
|
|
{
|
|
if (!string.IsNullOrEmpty(SectionsJson))
|
|
return JsonSerializer.Deserialize<List<SectionDto>>(SectionsJson);
|
|
return new List<SectionDto>();
|
|
}
|
|
set { SectionsJson = JsonSerializer.Serialize(value); }
|
|
}
|
|
}
|
|
|