2024-04-22 13:33:39 +03:30
|
|
|
|
namespace Netina.Domain.Entities.Brands;
|
2023-12-20 10:37:44 +03:30
|
|
|
|
|
|
|
|
|
|
public partial class Brand
|
|
|
|
|
|
{
|
2024-02-22 20:34:51 +03:30
|
|
|
|
public static Brand Create(string persianName, string englishName, string description, bool hasSpecialPage, string pageUrl)
|
2023-12-20 10:37:44 +03:30
|
|
|
|
{
|
2024-04-23 12:09:32 +03:30
|
|
|
|
|
|
|
|
|
|
var slug = StringExtensions.GetSlug(persianName);
|
|
|
|
|
|
return new Brand(persianName, slug, englishName, description, hasSpecialPage, pageUrl);
|
2023-12-20 10:37:44 +03:30
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public BrandStorageFile AddFile(string name, string fileLocation, string fileName, bool isHeader, bool isPrimary, StorageFileType fileType)
|
|
|
|
|
|
{
|
|
|
|
|
|
var file = BrandStorageFile.Create(name, fileLocation, fileName, isHeader, isPrimary, fileType, this.Id);
|
|
|
|
|
|
Files.Add(file);
|
|
|
|
|
|
return file;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public partial class BrandStorageFile
|
|
|
|
|
|
{
|
|
|
|
|
|
public static BrandStorageFile Create(string name, string fileLocation, string fileName, bool isHeader, bool isPrimary, StorageFileType fileType, Guid brandId)
|
|
|
|
|
|
{
|
|
|
|
|
|
return new BrandStorageFile(name, fileLocation, fileName, isHeader, isPrimary, fileType, brandId);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|