54 lines
1.4 KiB
C#
54 lines
1.4 KiB
C#
using System;
|
|
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
using Volo.Abp.Application.Dtos;
|
|
|
|
namespace Sozsoft.Platform.Public;
|
|
|
|
public class ContactDto : EntityDto<Guid>
|
|
{
|
|
public string Address { get; set; }
|
|
public string PhoneNumber { get; set; }
|
|
public string Email { get; set; }
|
|
public string Location { get; set; }
|
|
public string TaxNumber { get; set; }
|
|
|
|
[JsonIgnore]
|
|
public string BankJson { get; set; }
|
|
public BankDto BankDto
|
|
{
|
|
get
|
|
{
|
|
if (!string.IsNullOrEmpty(BankJson))
|
|
return JsonSerializer.Deserialize<BankDto>(BankJson);
|
|
return new BankDto();
|
|
}
|
|
set { BankJson = JsonSerializer.Serialize(value); }
|
|
}
|
|
|
|
[JsonIgnore]
|
|
public string WorkHoursJson { get; set; }
|
|
public WorkHoursDto WorkHoursDto
|
|
{
|
|
get
|
|
{
|
|
if (!string.IsNullOrEmpty(WorkHoursJson))
|
|
return JsonSerializer.Deserialize<WorkHoursDto>(WorkHoursJson);
|
|
return new WorkHoursDto();
|
|
}
|
|
set { WorkHoursJson = JsonSerializer.Serialize(value); }
|
|
}
|
|
|
|
[JsonIgnore]
|
|
public string MapJson { get; set; }
|
|
public MapDto MapDto
|
|
{
|
|
get
|
|
{
|
|
if (!string.IsNullOrEmpty(MapJson))
|
|
return JsonSerializer.Deserialize<MapDto>(MapJson);
|
|
return new MapDto();
|
|
}
|
|
set { MapJson = JsonSerializer.Serialize(value); }
|
|
}
|
|
}
|