sozsoft-platform/api/src/Sozsoft.Platform.Application.Contracts/Public/AboutDto.cs
Sedat Öztürk 429227df1d Initial
2026-02-24 23:44:16 +03:00

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); }
}
}