2022-11-14 19:32:41 +00:00
|
|
|
|
using DataModel.Database.Common;
|
|
|
|
|
|
|
|
|
|
namespace DataModel.Database;
|
2022-06-12 19:42:47 +00:00
|
|
|
|
|
|
|
|
|
public sealed class Translation
|
|
|
|
|
{
|
|
|
|
|
public int Id { get; set; }
|
2022-11-06 20:07:41 +00:00
|
|
|
|
|
|
|
|
|
public Guid UniqueId { get; set; }
|
2022-06-12 19:42:47 +00:00
|
|
|
|
|
|
|
|
|
public TextElement TextElement { get; set; }
|
|
|
|
|
|
|
|
|
|
public string Culture { get; set; } = "en-US";
|
|
|
|
|
|
|
|
|
|
public string Text { get; set; } = string.Empty;
|
2022-09-21 20:52:17 +00:00
|
|
|
|
|
|
|
|
|
public bool TranslateManual { get; set; } = false;
|
2022-11-14 19:32:41 +00:00
|
|
|
|
|
|
|
|
|
internal DataContext.JsonUniqueId JsonUniqueId => new($"{this.TextElement.Code}::{this.Culture}", this.UniqueId, "Trans");
|
|
|
|
|
|
|
|
|
|
internal DataContext.JsonTranslation ToJsonTranslation() => new()
|
|
|
|
|
{
|
|
|
|
|
UniqueId = this.JsonUniqueId,
|
|
|
|
|
Culture = this.Culture,
|
|
|
|
|
TranslateManual = this.TranslateManual,
|
|
|
|
|
TextElementUniqueId = this.TextElement.JsonUniqueId,
|
|
|
|
|
Text = this.Text,
|
|
|
|
|
};
|
2022-06-12 19:42:47 +00:00
|
|
|
|
}
|