using Core.Abstractions; using Core.Abstractions.Models; using Core.DomainObjects.L10n; using Core.Enumerations; namespace WeatherForecast.Models.L10n { public class PostItemL10nModel : RequestModelBase { public string Locale { get; set; } public string Slug { get; set; } public string Description { get; set; } public string Title { get; set; } public string ShortText { get; set; } public string Text { get; set; } public string ContentType { get; set; } public List Badges { get; set; } public override PostItemL10n ToDomainObject() => new PostItemL10n { Locale = Enumeration.FromDisplayName(Locale), Slug = Slug, Description = Description, Title = Title, Text = Text, ShortText = ShortText, // TODO: create plain text creation logic PlainText = "TODO", ContentType = Enumeration.FromDisplayName(ContentType), Badges = Badges }; } }