37 lines
912 B
C#
37 lines
912 B
C#
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace View_by_Distance.Shared.Models;
|
|
|
|
public class PersonImport
|
|
{
|
|
|
|
public DateTime _Key;
|
|
public string _Name;
|
|
public string _MergeName;
|
|
public string _OldName;
|
|
public string _Comment;
|
|
|
|
public DateTime Key => _Key;
|
|
public string Name => _Name;
|
|
public string MergeName => _MergeName;
|
|
public string OldName => _OldName;
|
|
public string Comment => _Comment;
|
|
|
|
[JsonConstructor]
|
|
public PersonImport(DateTime key, string name, string mergeName, string oldName, string comment)
|
|
{
|
|
_Key = key;
|
|
_Name = name;
|
|
_MergeName = mergeName;
|
|
_OldName = oldName;
|
|
_Comment = comment;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
string result = JsonSerializer.Serialize(this, new JsonSerializerOptions() { WriteIndented = true });
|
|
return result;
|
|
}
|
|
|
|
} |