Files
mixtape/zero.Core/Entities/Translation.cs
T

46 lines
942 B
C#
Raw Normal View History

2020-08-26 11:10:52 +02:00
using zero.Core.Attributes;
namespace zero.Core.Entities
2020-05-04 14:13:03 +02:00
{
2020-05-24 18:40:30 +02:00
public class Translation : ZeroEntity, ITranslation
2020-05-04 14:13:03 +02:00
{
/// <inheritdoc />
2020-10-12 13:14:23 +02:00
public string LanguageId { get; set; }
2020-05-24 18:40:30 +02:00
/// <inheritdoc />
2020-05-04 14:13:03 +02:00
public string Key { get; set; }
2020-12-18 20:50:13 +01:00
2020-05-24 18:40:30 +02:00
/// <inheritdoc />
2020-05-04 14:13:03 +02:00
public string Value { get; set; }
2020-05-24 18:40:30 +02:00
/// <inheritdoc />
2020-12-18 20:50:13 +01:00
public TranslationDisplay Display { get; set; }
2020-05-04 14:13:03 +02:00
}
public enum TranslationDisplay
{
Text = 0,
HTML = 1
}
2020-05-24 18:40:30 +02:00
2020-11-16 16:03:22 +01:00
[Collection("Translations", LongId = true)]
2020-11-14 12:34:26 +01:00
public interface ITranslation : IZeroEntity, ILanguageAwareEntity, IZeroDbConventions
2020-05-24 18:40:30 +02:00
{
/// <summary>
/// Key which can be used to query translations
/// </summary>
string Key { get; set; }
/// <summary>
/// Value of the translation
/// </summary>
string Value { get; set; }
/// <summary>
/// Display + input type
/// </summary>
TranslationDisplay Display { get; set; }
}
2020-05-04 14:13:03 +02:00
}