26 lines
1016 B
C#
26 lines
1016 B
C#
namespace Netina.Domain.Entities.Brands;
|
|
|
|
public partial class Brand
|
|
{
|
|
public static Brand Create(string persianName, string englishName, string description, bool hasSpecialPage, string pageUrl)
|
|
{
|
|
|
|
var slug = StringExtensions.GetSlug(persianName);
|
|
return new Brand(persianName, slug, englishName, description, hasSpecialPage, pageUrl);
|
|
}
|
|
|
|
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);
|
|
}
|
|
} |