Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

Picture Entity - add inherit from ITranslationEntity (it allows support for translation for alt, title attribute)

KrzysztofPajak98910bb37f2e
diff --git a/src/Core/Grand.Domain/Media/Picture.cs b/src/Core/Grand.Domain/Media/Picture.cs
index 651151b99..4fcf60ca3 100644
--- a/src/Core/Grand.Domain/Media/Picture.cs
+++ b/src/Core/Grand.Domain/Media/Picture.cs
@@ -1,12 +1,19 @@
using Grand.Domain.Common;
+using Grand.Domain.Localization;
+using System.Collections.Generic;
namespace Grand.Domain.Media
{
/// <summary>
/// Represents a picture
/// </summary>
- public partial class Picture : BaseEntity
+ public partial class Picture : BaseEntity, ITranslationEntity
{
+ public Picture()
+ {
+ Locales = new List<TranslationEntity>();
+ }
+
/// <summary>
/// Gets or sets the picture binary
/// </summary>
@@ -47,5 +54,10 @@ namespace Grand.Domain.Media
/// </summary>
public bool IsNew { get; set; }
+ /// <summary>
+ /// Gets or sets the collection of locales
+ /// </summary>
+ public IList<TranslationEntity> Locales { get; set; }
+
}
}