feat : add shipping methods CRUD

create shipping page and action dialog , complete shipping CRUD
release
Amir Hossein Khademi 2024-02-09 21:43:14 +03:30
parent d442ed17ee
commit c4286e9d40
14 changed files with 2983 additions and 436 deletions

View File

@ -1,18 +1,18 @@
namespace NetinaShop.Domain.CommandQueries.Commands; namespace NetinaShop.Domain.CommandQueries.Commands;
public sealed record CreateShippingCommand ( public sealed record CreateShippingCommand (
string Title, string Name,
string WarehouseName, string WarehouseName,
bool IsFastShipping , bool IsExpressShipping,
bool IsShipBySeller , bool IsShipBySeller ,
bool IsOriginalWarehouse, bool IsOriginalWarehouse,
double DeliveryCost) : IRequest<ShippingSDto>; double DeliveryCost) : IRequest<ShippingSDto>;
public sealed record UpdateShippingCommand( public sealed record UpdateShippingCommand(
Guid Id, Guid Id,
string Title, string Name,
string WarehouseName, string WarehouseName,
bool IsFastShipping, bool IsExpressShipping,
bool IsShipBySeller, bool IsShipBySeller,
bool IsOriginalWarehouse, bool IsOriginalWarehouse,
double DeliveryCost) : IRequest<bool>; double DeliveryCost) : IRequest<bool>;

View File

@ -10,9 +10,9 @@ public class ProductLDto : BaseDto<ProductLDto,Product>
public string Warranty { get; set; } = string.Empty; public string Warranty { get; set; } = string.Empty;
public bool BeDisplayed { get; set; } public bool BeDisplayed { get; set; }
public bool HasExpressDelivery { get; set; } public bool HasExpressDelivery { get; set; }
public int MaxOrderCount { get; set; }
public double Cost { get; set; } public double Cost { get; set; }
public double PackingCost { get; set; } public double PackingCost { get; set; }
public int MaxOrderCount { get; set; }
public int Stock { get; set; } public int Stock { get; set; }
public Guid BrandId { get; set; } public Guid BrandId { get; set; }
public string BrandName { get; set; } = string.Empty; public string BrandName { get; set; } = string.Empty;

View File

@ -12,6 +12,8 @@ public class DiscountSDto : BaseDto<DiscountSDto,Discount>
public DateTime StartDate { get; set; } public DateTime StartDate { get; set; }
public DateTime ExpireDate { get; set; } public DateTime ExpireDate { get; set; }
public long PriceFloor { get; set; } public long PriceFloor { get; set; }
public int MaxOrderCount { get; set; }
public int Stock { get; set; }
public bool HasPriceFloor { get; set; } public bool HasPriceFloor { get; set; }
public long PriceCeiling { get; set; } public long PriceCeiling { get; set; }
public bool HasPriceCeiling { get; set; } public bool HasPriceCeiling { get; set; }

View File

@ -2,5 +2,10 @@
public class ShippingSDto : BaseDto<ShippingSDto,Shipping> public class ShippingSDto : BaseDto<ShippingSDto,Shipping>
{ {
public string Name { get; set; } = string.Empty;
public string WarehouseName { get; set; } = string.Empty;
public bool IsExpressShipping { get; set; }
public bool IsShipBySeller { get; set; }
public bool IsOriginalWarehouse { get; set; }
public double DeliveryCost { get; set; }
} }

View File

@ -9,9 +9,9 @@ public partial class Shipping : ApiEntity
{ {
} }
public Shipping(string title, string warehouseName, bool isExpressShipping, bool isShipBySeller, bool isOriginalWarehouse, double deliveryCost) public Shipping(string name, string warehouseName, bool isExpressShipping, bool isShipBySeller, bool isOriginalWarehouse, double deliveryCost)
{ {
Title = title; Name = name;
WarehouseName = warehouseName; WarehouseName = warehouseName;
IsExpressShipping = isExpressShipping; IsExpressShipping = isExpressShipping;
IsShipBySeller = isShipBySeller; IsShipBySeller = isShipBySeller;
@ -19,7 +19,7 @@ public partial class Shipping : ApiEntity
DeliveryCost = deliveryCost; DeliveryCost = deliveryCost;
} }
public string Title { get; internal set; } = string.Empty; public string Name { get; internal set; } = string.Empty;
public string WarehouseName { get; internal set; } = string.Empty; public string WarehouseName { get; internal set; } = string.Empty;
public bool IsExpressShipping { get; internal set; } public bool IsExpressShipping { get; internal set; }
public bool IsShipBySeller { get; internal set; } public bool IsShipBySeller { get; internal set; }

View File

@ -30,7 +30,17 @@ namespace NetinaShop.Domain.Mappers
HasExpressDelivery = p1.HasExpressDelivery, HasExpressDelivery = p1.HasExpressDelivery,
MaxOrderCount = p1.MaxOrderCount, MaxOrderCount = p1.MaxOrderCount,
BrandId = p1.BrandId, BrandId = p1.BrandId,
Brand = new Brand()
{
Name = p1.BrandName,
Id = p1.BrandId
},
CategoryId = p1.CategoryId, CategoryId = p1.CategoryId,
Category = new ProductCategory()
{
Name = p1.CategoryName,
Id = p1.CategoryId
},
Specifications = funcMain1(p1.Specifications), Specifications = funcMain1(p1.Specifications),
Reviews = funcMain2(p1.Reviews), Reviews = funcMain2(p1.Reviews),
Files = funcMain3(p1.Files), Files = funcMain3(p1.Files),
@ -59,318 +69,333 @@ namespace NetinaShop.Domain.Mappers
result.HasExpressDelivery = p5.HasExpressDelivery; result.HasExpressDelivery = p5.HasExpressDelivery;
result.MaxOrderCount = p5.MaxOrderCount; result.MaxOrderCount = p5.MaxOrderCount;
result.BrandId = p5.BrandId; result.BrandId = p5.BrandId;
result.Brand = funcMain4(new Never(), result.Brand, p5);
result.CategoryId = p5.CategoryId; result.CategoryId = p5.CategoryId;
result.Specifications = funcMain4(p5.Specifications, result.Specifications); result.Category = funcMain5(new Never(), result.Category, p5);
result.Reviews = funcMain5(p5.Reviews, result.Reviews); result.Specifications = funcMain6(p5.Specifications, result.Specifications);
result.Files = funcMain6(p5.Files, result.Files); result.Reviews = funcMain7(p5.Reviews, result.Reviews);
result.Files = funcMain8(p5.Files, result.Files);
result.Id = p5.Id; result.Id = p5.Id;
result.CreatedAt = p5.CreatedAt; result.CreatedAt = p5.CreatedAt;
return result; return result;
} }
public static Expression<Func<ProductLDto, Product>> ProjectToProduct => p13 => new Product() public static Expression<Func<ProductLDto, Product>> ProjectToProduct => p17 => new Product()
{ {
PersianName = p13.PersianName, PersianName = p17.PersianName,
EnglishName = p13.EnglishName, EnglishName = p17.EnglishName,
Summery = p13.Summery, Summery = p17.Summery,
ExpertCheck = p13.ExpertCheck, ExpertCheck = p17.ExpertCheck,
Tags = p13.Tags, Tags = p17.Tags,
Warranty = p13.Warranty, Warranty = p17.Warranty,
Cost = p13.Cost, Cost = p17.Cost,
BeDisplayed = p13.BeDisplayed, BeDisplayed = p17.BeDisplayed,
PackingCost = p13.PackingCost, PackingCost = p17.PackingCost,
Stock = p13.Stock, Stock = p17.Stock,
HasExpressDelivery = p13.HasExpressDelivery, HasExpressDelivery = p17.HasExpressDelivery,
MaxOrderCount = p13.MaxOrderCount, MaxOrderCount = p17.MaxOrderCount,
BrandId = p13.BrandId, BrandId = p17.BrandId,
CategoryId = p13.CategoryId, Brand = new Brand()
Specifications = p13.Specifications.Select<SpecificationSDto, Specification>(p14 => new Specification()
{ {
Title = p14.Title, Name = p17.BrandName,
Detail = p14.Detail, Id = p17.BrandId
Value = p14.Value, },
IsFeature = p14.IsFeature, CategoryId = p17.CategoryId,
ProductId = p14.ProductId, Category = new ProductCategory()
ParentId = (Guid?)p14.ParentId, {
Id = p14.Id, Name = p17.CategoryName,
CreatedAt = p14.CreatedAt Id = p17.CategoryId
},
Specifications = p17.Specifications.Select<SpecificationSDto, Specification>(p18 => new Specification()
{
Title = p18.Title,
Detail = p18.Detail,
Value = p18.Value,
IsFeature = p18.IsFeature,
ProductId = p18.ProductId,
ParentId = (Guid?)p18.ParentId,
Id = p18.Id,
CreatedAt = p18.CreatedAt
}).ToList<Specification>(), }).ToList<Specification>(),
Reviews = p13.Reviews.Select<ReviewSDto, Review>(p15 => new Review() Reviews = p17.Reviews.Select<ReviewSDto, Review>(p19 => new Review()
{ {
Title = p15.Title, Title = p19.Title,
Comment = p15.Comment, Comment = p19.Comment,
Rate = p15.Rate, Rate = p19.Rate,
IsBuyer = p15.IsBuyer, IsBuyer = p19.IsBuyer,
ProductId = p15.ProductId, ProductId = p19.ProductId,
UserId = p15.UserId, UserId = p19.UserId,
Id = p15.Id, Id = p19.Id,
CreatedAt = p15.CreatedAt CreatedAt = p19.CreatedAt
}).ToList<Review>(), }).ToList<Review>(),
Files = p13.Files.Select<StorageFileSDto, ProductStorageFile>(p16 => new ProductStorageFile() Files = p17.Files.Select<StorageFileSDto, ProductStorageFile>(p20 => new ProductStorageFile()
{ {
Name = p16.Name, Name = p20.Name,
FileLocation = p16.FileLocation, FileLocation = p20.FileLocation,
FileName = p16.FileName, FileName = p20.FileName,
IsHeader = p16.IsHeader, IsHeader = p20.IsHeader,
IsPrimary = p16.IsPrimary, IsPrimary = p20.IsPrimary,
FileType = p16.FileType, FileType = p20.FileType,
Id = p16.Id, Id = p20.Id,
CreatedAt = p16.CreatedAt CreatedAt = p20.CreatedAt
}).ToList<ProductStorageFile>(), }).ToList<ProductStorageFile>(),
Id = p13.Id, Id = p17.Id,
CreatedAt = p13.CreatedAt CreatedAt = p17.CreatedAt
}; };
public static ProductLDto AdaptToLDto(this Product p17) public static ProductLDto AdaptToLDto(this Product p21)
{ {
return p17 == null ? null : new ProductLDto() return p21 == null ? null : new ProductLDto()
{ {
PersianName = p17.PersianName, PersianName = p21.PersianName,
EnglishName = p17.EnglishName, EnglishName = p21.EnglishName,
Summery = p17.Summery, Summery = p21.Summery,
ExpertCheck = p17.ExpertCheck, ExpertCheck = p21.ExpertCheck,
Tags = p17.Tags, Tags = p21.Tags,
Warranty = p17.Warranty, Warranty = p21.Warranty,
BeDisplayed = p17.BeDisplayed, BeDisplayed = p21.BeDisplayed,
HasExpressDelivery = p17.HasExpressDelivery, HasExpressDelivery = p21.HasExpressDelivery,
MaxOrderCount = p17.MaxOrderCount, Cost = p21.Cost,
Cost = p17.Cost, PackingCost = p21.PackingCost,
PackingCost = p17.PackingCost, MaxOrderCount = p21.MaxOrderCount,
Stock = p17.Stock, Stock = p21.Stock,
BrandId = p17.BrandId, BrandId = p21.BrandId,
BrandName = p17.Brand == null ? null : p17.Brand.Name, BrandName = p21.Brand == null ? null : p21.Brand.Name,
CategoryId = p17.CategoryId, CategoryId = p21.CategoryId,
CategoryName = p17.Category == null ? null : p17.Category.Name, CategoryName = p21.Category == null ? null : p21.Category.Name,
Specifications = funcMain7(p17.Specifications), Specifications = funcMain9(p21.Specifications),
Reviews = funcMain8(p17.Reviews), Reviews = funcMain10(p21.Reviews),
Files = funcMain9(p17.Files), Files = funcMain11(p21.Files),
Id = p17.Id, Id = p21.Id,
CreatedAt = p17.CreatedAt CreatedAt = p21.CreatedAt
}; };
} }
public static ProductLDto AdaptTo(this Product p21, ProductLDto p22) public static ProductLDto AdaptTo(this Product p25, ProductLDto p26)
{ {
if (p21 == null) if (p25 == null)
{ {
return null; return null;
} }
ProductLDto result = p22 ?? new ProductLDto(); ProductLDto result = p26 ?? new ProductLDto();
result.PersianName = p21.PersianName; result.PersianName = p25.PersianName;
result.EnglishName = p21.EnglishName; result.EnglishName = p25.EnglishName;
result.Summery = p21.Summery; result.Summery = p25.Summery;
result.ExpertCheck = p21.ExpertCheck; result.ExpertCheck = p25.ExpertCheck;
result.Tags = p21.Tags; result.Tags = p25.Tags;
result.Warranty = p21.Warranty; result.Warranty = p25.Warranty;
result.BeDisplayed = p21.BeDisplayed; result.BeDisplayed = p25.BeDisplayed;
result.HasExpressDelivery = p21.HasExpressDelivery; result.HasExpressDelivery = p25.HasExpressDelivery;
result.MaxOrderCount = p21.MaxOrderCount; result.Cost = p25.Cost;
result.Cost = p21.Cost; result.PackingCost = p25.PackingCost;
result.PackingCost = p21.PackingCost; result.MaxOrderCount = p25.MaxOrderCount;
result.Stock = p21.Stock; result.Stock = p25.Stock;
result.BrandId = p21.BrandId; result.BrandId = p25.BrandId;
result.BrandName = p21.Brand == null ? null : p21.Brand.Name; result.BrandName = p25.Brand == null ? null : p25.Brand.Name;
result.CategoryId = p21.CategoryId; result.CategoryId = p25.CategoryId;
result.CategoryName = p21.Category == null ? null : p21.Category.Name; result.CategoryName = p25.Category == null ? null : p25.Category.Name;
result.Specifications = funcMain10(p21.Specifications, result.Specifications); result.Specifications = funcMain12(p25.Specifications, result.Specifications);
result.Reviews = funcMain11(p21.Reviews, result.Reviews); result.Reviews = funcMain13(p25.Reviews, result.Reviews);
result.Files = funcMain12(p21.Files, result.Files); result.Files = funcMain14(p25.Files, result.Files);
result.Id = p21.Id; result.Id = p25.Id;
result.CreatedAt = p21.CreatedAt; result.CreatedAt = p25.CreatedAt;
return result; return result;
} }
public static Expression<Func<Product, ProductLDto>> ProjectToLDto => p29 => new ProductLDto() public static Expression<Func<Product, ProductLDto>> ProjectToLDto => p33 => new ProductLDto()
{ {
PersianName = p29.PersianName, PersianName = p33.PersianName,
EnglishName = p29.EnglishName, EnglishName = p33.EnglishName,
Summery = p29.Summery, Summery = p33.Summery,
ExpertCheck = p29.ExpertCheck, ExpertCheck = p33.ExpertCheck,
Tags = p29.Tags, Tags = p33.Tags,
Warranty = p29.Warranty, Warranty = p33.Warranty,
BeDisplayed = p29.BeDisplayed, BeDisplayed = p33.BeDisplayed,
HasExpressDelivery = p29.HasExpressDelivery, HasExpressDelivery = p33.HasExpressDelivery,
MaxOrderCount = p29.MaxOrderCount, Cost = p33.Cost,
Cost = p29.Cost, PackingCost = p33.PackingCost,
PackingCost = p29.PackingCost, MaxOrderCount = p33.MaxOrderCount,
Stock = p29.Stock, Stock = p33.Stock,
BrandId = p29.BrandId, BrandId = p33.BrandId,
BrandName = p29.Brand.Name, BrandName = p33.Brand == null ? null : p33.Brand.Name,
CategoryId = p29.CategoryId, CategoryId = p33.CategoryId,
CategoryName = p29.Category.Name, CategoryName = p33.Category == null ? null : p33.Category.Name,
Specifications = p29.Specifications.Select<Specification, SpecificationSDto>(p30 => new SpecificationSDto() Specifications = p33.Specifications.Select<Specification, SpecificationSDto>(p34 => new SpecificationSDto()
{ {
Title = p30.Title, Title = p34.Title,
Detail = p30.Detail, Detail = p34.Detail,
Value = p30.Value, Value = p34.Value,
IsFeature = p30.IsFeature, IsFeature = p34.IsFeature,
ProductId = p30.ProductId, ProductId = p34.ProductId,
ParentId = p30.ParentId == null ? default(Guid) : (Guid)p30.ParentId, ParentId = p34.ParentId == null ? default(Guid) : (Guid)p34.ParentId,
Id = p30.Id, Id = p34.Id,
CreatedAt = p30.CreatedAt CreatedAt = p34.CreatedAt
}).ToList<SpecificationSDto>(), }).ToList<SpecificationSDto>(),
Reviews = p29.Reviews.Select<Review, ReviewSDto>(p31 => new ReviewSDto() Reviews = p33.Reviews.Select<Review, ReviewSDto>(p35 => new ReviewSDto()
{ {
Title = p31.Title, Title = p35.Title,
Comment = p31.Comment, Comment = p35.Comment,
Rate = p31.Rate, Rate = p35.Rate,
IsBuyer = p31.IsBuyer, IsBuyer = p35.IsBuyer,
ProductId = p31.ProductId, ProductId = p35.ProductId,
UserId = p31.UserId, UserId = p35.UserId,
Id = p31.Id, Id = p35.Id,
CreatedAt = p31.CreatedAt CreatedAt = p35.CreatedAt
}).ToList<ReviewSDto>(), }).ToList<ReviewSDto>(),
Files = p29.Files.Select<ProductStorageFile, StorageFileSDto>(p32 => new StorageFileSDto() Files = p33.Files.Select<ProductStorageFile, StorageFileSDto>(p36 => new StorageFileSDto()
{ {
Name = p32.Name, Name = p36.Name,
FileLocation = p32.FileLocation, FileLocation = p36.FileLocation,
FileName = p32.FileName, FileName = p36.FileName,
IsHeader = p32.IsHeader, IsHeader = p36.IsHeader,
IsPrimary = p32.IsPrimary, IsPrimary = p36.IsPrimary,
FileType = p32.FileType, FileType = p36.FileType,
Id = p32.Id Id = p36.Id
}).ToList<StorageFileSDto>(), }).ToList<StorageFileSDto>(),
Id = p29.Id, Id = p33.Id,
CreatedAt = p29.CreatedAt CreatedAt = p33.CreatedAt
}; };
public static Product AdaptToProduct(this ProductSDto p33) public static Product AdaptToProduct(this ProductSDto p37)
{ {
return p33 == null ? null : new Product() return p37 == null ? null : new Product()
{ {
PersianName = p33.PersianName, PersianName = p37.PersianName,
EnglishName = p33.EnglishName, EnglishName = p37.EnglishName,
Summery = p33.Summery, Summery = p37.Summery,
ExpertCheck = p33.ExpertCheck, ExpertCheck = p37.ExpertCheck,
Tags = p33.Tags, Tags = p37.Tags,
Warranty = p33.Warranty, Warranty = p37.Warranty,
Cost = p33.Cost, Cost = p37.Cost,
IsEnable = p33.IsEnable, IsEnable = p37.IsEnable,
BeDisplayed = p33.BeDisplayed, BeDisplayed = p37.BeDisplayed,
PackingCost = p33.PackingCost, PackingCost = p37.PackingCost,
Rate = p33.Rate, Rate = p37.Rate,
ReviewCount = p33.ReviewCount, ReviewCount = p37.ReviewCount,
Viewed = p33.Viewed, Viewed = p37.Viewed,
BrandId = p33.BrandId, BrandId = p37.BrandId,
Brand = new Brand() Brand = new Brand()
{ {
Name = p33.BrandName, Name = p37.BrandName,
Id = p33.BrandId Id = p37.BrandId
}, },
CategoryId = p33.CategoryId, CategoryId = p37.CategoryId,
Category = new ProductCategory() Category = new ProductCategory()
{ {
Name = p33.CategoryName, Name = p37.CategoryName,
Id = p33.CategoryId Id = p37.CategoryId
}, },
Id = p33.Id, Id = p37.Id,
CreatedAt = p33.CreatedAt CreatedAt = p37.CreatedAt
}; };
} }
public static Product AdaptTo(this ProductSDto p34, Product p35) public static Product AdaptTo(this ProductSDto p38, Product p39)
{ {
if (p34 == null) if (p38 == null)
{ {
return null; return null;
} }
Product result = p35 ?? new Product(); Product result = p39 ?? new Product();
result.PersianName = p34.PersianName; result.PersianName = p38.PersianName;
result.EnglishName = p34.EnglishName; result.EnglishName = p38.EnglishName;
result.Summery = p34.Summery; result.Summery = p38.Summery;
result.ExpertCheck = p34.ExpertCheck; result.ExpertCheck = p38.ExpertCheck;
result.Tags = p34.Tags; result.Tags = p38.Tags;
result.Warranty = p34.Warranty; result.Warranty = p38.Warranty;
result.Cost = p34.Cost; result.Cost = p38.Cost;
result.IsEnable = p34.IsEnable; result.IsEnable = p38.IsEnable;
result.BeDisplayed = p34.BeDisplayed; result.BeDisplayed = p38.BeDisplayed;
result.PackingCost = p34.PackingCost; result.PackingCost = p38.PackingCost;
result.Rate = p34.Rate; result.Rate = p38.Rate;
result.ReviewCount = p34.ReviewCount; result.ReviewCount = p38.ReviewCount;
result.Viewed = p34.Viewed; result.Viewed = p38.Viewed;
result.BrandId = p34.BrandId; result.BrandId = p38.BrandId;
result.Brand = funcMain13(new Never(), result.Brand, p34); result.Brand = funcMain15(new Never(), result.Brand, p38);
result.CategoryId = p34.CategoryId; result.CategoryId = p38.CategoryId;
result.Category = funcMain14(new Never(), result.Category, p34); result.Category = funcMain16(new Never(), result.Category, p38);
result.Id = p34.Id; result.Id = p38.Id;
result.CreatedAt = p34.CreatedAt; result.CreatedAt = p38.CreatedAt;
return result; return result;
} }
public static ProductSDto AdaptToSDto(this Product p40) public static ProductSDto AdaptToSDto(this Product p44)
{ {
return p40 == null ? null : new ProductSDto() return p44 == null ? null : new ProductSDto()
{ {
PersianName = p40.PersianName, PersianName = p44.PersianName,
EnglishName = p40.EnglishName, EnglishName = p44.EnglishName,
Summery = p40.Summery, Summery = p44.Summery,
ExpertCheck = p40.ExpertCheck, ExpertCheck = p44.ExpertCheck,
Tags = p40.Tags, Tags = p44.Tags,
Warranty = p40.Warranty, Warranty = p44.Warranty,
Cost = p40.Cost, Cost = p44.Cost,
IsEnable = p40.IsEnable, IsEnable = p44.IsEnable,
BeDisplayed = p40.BeDisplayed, BeDisplayed = p44.BeDisplayed,
PackingCost = p40.PackingCost, PackingCost = p44.PackingCost,
Rate = p40.Rate, Rate = p44.Rate,
ReviewCount = p40.ReviewCount, ReviewCount = p44.ReviewCount,
Viewed = p40.Viewed, Viewed = p44.Viewed,
CategoryId = p40.CategoryId, MainImage = p44.Files.FirstOrDefault<ProductStorageFile>(funcMain17) != null ? p44.Files.FirstOrDefault<ProductStorageFile>(funcMain18).FileLocation : (p44.Files.Count > 0 ? p44.Files.FirstOrDefault<ProductStorageFile>().FileLocation : string.Empty),
BrandId = p40.BrandId, CategoryId = p44.CategoryId,
BrandName = p40.Brand == null ? null : p40.Brand.Name, BrandId = p44.BrandId,
CategoryName = p40.Category == null ? null : p40.Category.Name, BrandName = p44.Brand == null ? null : p44.Brand.Name,
Id = p40.Id, CategoryName = p44.Category == null ? null : p44.Category.Name,
CreatedAt = p40.CreatedAt Id = p44.Id,
CreatedAt = p44.CreatedAt
}; };
} }
public static ProductSDto AdaptTo(this Product p41, ProductSDto p42) public static ProductSDto AdaptTo(this Product p45, ProductSDto p46)
{ {
if (p41 == null) if (p45 == null)
{ {
return null; return null;
} }
ProductSDto result = p42 ?? new ProductSDto(); ProductSDto result = p46 ?? new ProductSDto();
result.PersianName = p41.PersianName; result.PersianName = p45.PersianName;
result.EnglishName = p41.EnglishName; result.EnglishName = p45.EnglishName;
result.Summery = p41.Summery; result.Summery = p45.Summery;
result.ExpertCheck = p41.ExpertCheck; result.ExpertCheck = p45.ExpertCheck;
result.Tags = p41.Tags; result.Tags = p45.Tags;
result.Warranty = p41.Warranty; result.Warranty = p45.Warranty;
result.Cost = p41.Cost; result.Cost = p45.Cost;
result.IsEnable = p41.IsEnable; result.IsEnable = p45.IsEnable;
result.BeDisplayed = p41.BeDisplayed; result.BeDisplayed = p45.BeDisplayed;
result.PackingCost = p41.PackingCost; result.PackingCost = p45.PackingCost;
result.Rate = p41.Rate; result.Rate = p45.Rate;
result.ReviewCount = p41.ReviewCount; result.ReviewCount = p45.ReviewCount;
result.Viewed = p41.Viewed; result.Viewed = p45.Viewed;
result.CategoryId = p41.CategoryId; result.MainImage = p45.Files.FirstOrDefault<ProductStorageFile>(funcMain17) != null ? p45.Files.FirstOrDefault<ProductStorageFile>(funcMain18).FileLocation : (p45.Files.Count > 0 ? p45.Files.FirstOrDefault<ProductStorageFile>().FileLocation : string.Empty);
result.BrandId = p41.BrandId; result.CategoryId = p45.CategoryId;
result.BrandName = p41.Brand == null ? null : p41.Brand.Name; result.BrandId = p45.BrandId;
result.CategoryName = p41.Category == null ? null : p41.Category.Name; result.BrandName = p45.Brand == null ? null : p45.Brand.Name;
result.Id = p41.Id; result.CategoryName = p45.Category == null ? null : p45.Category.Name;
result.CreatedAt = p41.CreatedAt; result.Id = p45.Id;
result.CreatedAt = p45.CreatedAt;
return result; return result;
} }
public static Expression<Func<Product, ProductSDto>> ProjectToSDto => p43 => new ProductSDto() public static Expression<Func<Product, ProductSDto>> ProjectToSDto => p47 => new ProductSDto()
{ {
PersianName = p43.PersianName, PersianName = p47.PersianName,
EnglishName = p43.EnglishName, EnglishName = p47.EnglishName,
Summery = p43.Summery, Summery = p47.Summery,
ExpertCheck = p43.ExpertCheck, ExpertCheck = p47.ExpertCheck,
Tags = p43.Tags, Tags = p47.Tags,
Warranty = p43.Warranty, Warranty = p47.Warranty,
Cost = p43.Cost, Cost = p47.Cost,
IsEnable = p43.IsEnable, IsEnable = p47.IsEnable,
BeDisplayed = p43.BeDisplayed, BeDisplayed = p47.BeDisplayed,
PackingCost = p43.PackingCost, PackingCost = p47.PackingCost,
Rate = p43.Rate, Rate = p47.Rate,
ReviewCount = p43.ReviewCount, ReviewCount = p47.ReviewCount,
Viewed = p43.Viewed, Viewed = p47.Viewed,
CategoryId = p43.CategoryId, MainImage = p47.Files.FirstOrDefault<ProductStorageFile>(f => f.IsPrimary) != null ? p47.Files.FirstOrDefault<ProductStorageFile>(f => f.IsPrimary).FileLocation : (p47.Files.Count > 0 ? p47.Files.FirstOrDefault<ProductStorageFile>().FileLocation : string.Empty),
BrandId = p43.BrandId, CategoryId = p47.CategoryId,
BrandName = p43.Brand == null ? null : p43.Brand.Name, BrandId = p47.BrandId,
CategoryName = p43.Category == null ? null : p43.Category.Name, BrandName = p47.Brand == null ? null : p47.Brand.Name,
Id = p43.Id, CategoryName = p47.Category == null ? null : p47.Category.Name,
CreatedAt = p43.CreatedAt Id = p47.Id,
CreatedAt = p47.CreatedAt
}; };
private static List<Specification> funcMain1(List<SpecificationSDto> p2) private static List<Specification> funcMain1(List<SpecificationSDto> p2)
@ -466,20 +491,40 @@ namespace NetinaShop.Domain.Mappers
} }
private static List<Specification> funcMain4(List<SpecificationSDto> p7, List<Specification> p8) private static Brand funcMain4(Never p7, Brand p8, ProductLDto p5)
{ {
if (p7 == null) Brand result = p8 ?? new Brand();
result.Name = p5.BrandName;
result.Id = p5.BrandId;
return result;
}
private static ProductCategory funcMain5(Never p9, ProductCategory p10, ProductLDto p5)
{
ProductCategory result = p10 ?? new ProductCategory();
result.Name = p5.CategoryName;
result.Id = p5.CategoryId;
return result;
}
private static List<Specification> funcMain6(List<SpecificationSDto> p11, List<Specification> p12)
{
if (p11 == null)
{ {
return null; return null;
} }
List<Specification> result = new List<Specification>(p7.Count); List<Specification> result = new List<Specification>(p11.Count);
int i = 0; int i = 0;
int len = p7.Count; int len = p11.Count;
while (i < len) while (i < len)
{ {
SpecificationSDto item = p7[i]; SpecificationSDto item = p11[i];
result.Add(item == null ? null : new Specification() result.Add(item == null ? null : new Specification()
{ {
Title = item.Title, Title = item.Title,
@ -497,20 +542,20 @@ namespace NetinaShop.Domain.Mappers
} }
private static List<Review> funcMain5(List<ReviewSDto> p9, List<Review> p10) private static List<Review> funcMain7(List<ReviewSDto> p13, List<Review> p14)
{ {
if (p9 == null) if (p13 == null)
{ {
return null; return null;
} }
List<Review> result = new List<Review>(p9.Count); List<Review> result = new List<Review>(p13.Count);
int i = 0; int i = 0;
int len = p9.Count; int len = p13.Count;
while (i < len) while (i < len)
{ {
ReviewSDto item = p9[i]; ReviewSDto item = p13[i];
result.Add(item == null ? null : new Review() result.Add(item == null ? null : new Review()
{ {
Title = item.Title, Title = item.Title,
@ -528,20 +573,20 @@ namespace NetinaShop.Domain.Mappers
} }
private static List<ProductStorageFile> funcMain6(List<StorageFileSDto> p11, List<ProductStorageFile> p12) private static List<ProductStorageFile> funcMain8(List<StorageFileSDto> p15, List<ProductStorageFile> p16)
{ {
if (p11 == null) if (p15 == null)
{ {
return null; return null;
} }
List<ProductStorageFile> result = new List<ProductStorageFile>(p11.Count); List<ProductStorageFile> result = new List<ProductStorageFile>(p15.Count);
int i = 0; int i = 0;
int len = p11.Count; int len = p15.Count;
while (i < len) while (i < len)
{ {
StorageFileSDto item = p11[i]; StorageFileSDto item = p15[i];
result.Add(item == null ? null : new ProductStorageFile() result.Add(item == null ? null : new ProductStorageFile()
{ {
Name = item.Name, Name = item.Name,
@ -559,20 +604,20 @@ namespace NetinaShop.Domain.Mappers
} }
private static List<SpecificationSDto> funcMain7(List<Specification> p18) private static List<SpecificationSDto> funcMain9(List<Specification> p22)
{ {
if (p18 == null) if (p22 == null)
{ {
return null; return null;
} }
List<SpecificationSDto> result = new List<SpecificationSDto>(p18.Count); List<SpecificationSDto> result = new List<SpecificationSDto>(p22.Count);
int i = 0; int i = 0;
int len = p18.Count; int len = p22.Count;
while (i < len) while (i < len)
{ {
Specification item = p18[i]; Specification item = p22[i];
result.Add(item == null ? null : new SpecificationSDto() result.Add(item == null ? null : new SpecificationSDto()
{ {
Title = item.Title, Title = item.Title,
@ -590,112 +635,20 @@ namespace NetinaShop.Domain.Mappers
} }
private static List<ReviewSDto> funcMain8(List<Review> p19) private static List<ReviewSDto> funcMain10(List<Review> p23)
{
if (p19 == null)
{
return null;
}
List<ReviewSDto> result = new List<ReviewSDto>(p19.Count);
int i = 0;
int len = p19.Count;
while (i < len)
{
Review item = p19[i];
result.Add(item == null ? null : new ReviewSDto()
{
Title = item.Title,
Comment = item.Comment,
Rate = item.Rate,
IsBuyer = item.IsBuyer,
ProductId = item.ProductId,
UserId = item.UserId,
Id = item.Id,
CreatedAt = item.CreatedAt
});
i++;
}
return result;
}
private static List<StorageFileSDto> funcMain9(List<ProductStorageFile> p20)
{
if (p20 == null)
{
return null;
}
List<StorageFileSDto> result = new List<StorageFileSDto>(p20.Count);
int i = 0;
int len = p20.Count;
while (i < len)
{
ProductStorageFile item = p20[i];
result.Add(item == null ? null : new StorageFileSDto()
{
Name = item.Name,
FileLocation = item.FileLocation,
FileName = item.FileName,
IsHeader = item.IsHeader,
IsPrimary = item.IsPrimary,
FileType = item.FileType,
Id = item.Id
});
i++;
}
return result;
}
private static List<SpecificationSDto> funcMain10(List<Specification> p23, List<SpecificationSDto> p24)
{ {
if (p23 == null) if (p23 == null)
{ {
return null; return null;
} }
List<SpecificationSDto> result = new List<SpecificationSDto>(p23.Count); List<ReviewSDto> result = new List<ReviewSDto>(p23.Count);
int i = 0; int i = 0;
int len = p23.Count; int len = p23.Count;
while (i < len) while (i < len)
{ {
Specification item = p23[i]; Review item = p23[i];
result.Add(item == null ? null : new SpecificationSDto()
{
Title = item.Title,
Detail = item.Detail,
Value = item.Value,
IsFeature = item.IsFeature,
ProductId = item.ProductId,
ParentId = item.ParentId == null ? default(Guid) : (Guid)item.ParentId,
Id = item.Id,
CreatedAt = item.CreatedAt
});
i++;
}
return result;
}
private static List<ReviewSDto> funcMain11(List<Review> p25, List<ReviewSDto> p26)
{
if (p25 == null)
{
return null;
}
List<ReviewSDto> result = new List<ReviewSDto>(p25.Count);
int i = 0;
int len = p25.Count;
while (i < len)
{
Review item = p25[i];
result.Add(item == null ? null : new ReviewSDto() result.Add(item == null ? null : new ReviewSDto()
{ {
Title = item.Title, Title = item.Title,
@ -713,20 +666,20 @@ namespace NetinaShop.Domain.Mappers
} }
private static List<StorageFileSDto> funcMain12(List<ProductStorageFile> p27, List<StorageFileSDto> p28) private static List<StorageFileSDto> funcMain11(List<ProductStorageFile> p24)
{ {
if (p27 == null) if (p24 == null)
{ {
return null; return null;
} }
List<StorageFileSDto> result = new List<StorageFileSDto>(p27.Count); List<StorageFileSDto> result = new List<StorageFileSDto>(p24.Count);
int i = 0; int i = 0;
int len = p27.Count; int len = p24.Count;
while (i < len) while (i < len)
{ {
ProductStorageFile item = p27[i]; ProductStorageFile item = p24[i];
result.Add(item == null ? null : new StorageFileSDto() result.Add(item == null ? null : new StorageFileSDto()
{ {
Name = item.Name, Name = item.Name,
@ -743,24 +696,126 @@ namespace NetinaShop.Domain.Mappers
} }
private static Brand funcMain13(Never p36, Brand p37, ProductSDto p34) private static List<SpecificationSDto> funcMain12(List<Specification> p27, List<SpecificationSDto> p28)
{ {
Brand result = p37 ?? new Brand(); if (p27 == null)
{
return null;
}
List<SpecificationSDto> result = new List<SpecificationSDto>(p27.Count);
result.Name = p34.BrandName; int i = 0;
result.Id = p34.BrandId; int len = p27.Count;
while (i < len)
{
Specification item = p27[i];
result.Add(item == null ? null : new SpecificationSDto()
{
Title = item.Title,
Detail = item.Detail,
Value = item.Value,
IsFeature = item.IsFeature,
ProductId = item.ProductId,
ParentId = item.ParentId == null ? default(Guid) : (Guid)item.ParentId,
Id = item.Id,
CreatedAt = item.CreatedAt
});
i++;
}
return result; return result;
} }
private static ProductCategory funcMain14(Never p38, ProductCategory p39, ProductSDto p34) private static List<ReviewSDto> funcMain13(List<Review> p29, List<ReviewSDto> p30)
{ {
ProductCategory result = p39 ?? new ProductCategory(); if (p29 == null)
{
return null;
}
List<ReviewSDto> result = new List<ReviewSDto>(p29.Count);
result.Name = p34.CategoryName; int i = 0;
result.Id = p34.CategoryId; int len = p29.Count;
while (i < len)
{
Review item = p29[i];
result.Add(item == null ? null : new ReviewSDto()
{
Title = item.Title,
Comment = item.Comment,
Rate = item.Rate,
IsBuyer = item.IsBuyer,
ProductId = item.ProductId,
UserId = item.UserId,
Id = item.Id,
CreatedAt = item.CreatedAt
});
i++;
}
return result; return result;
} }
private static List<StorageFileSDto> funcMain14(List<ProductStorageFile> p31, List<StorageFileSDto> p32)
{
if (p31 == null)
{
return null;
}
List<StorageFileSDto> result = new List<StorageFileSDto>(p31.Count);
int i = 0;
int len = p31.Count;
while (i < len)
{
ProductStorageFile item = p31[i];
result.Add(item == null ? null : new StorageFileSDto()
{
Name = item.Name,
FileLocation = item.FileLocation,
FileName = item.FileName,
IsHeader = item.IsHeader,
IsPrimary = item.IsPrimary,
FileType = item.FileType,
Id = item.Id
});
i++;
}
return result;
}
private static Brand funcMain15(Never p40, Brand p41, ProductSDto p38)
{
Brand result = p41 ?? new Brand();
result.Name = p38.BrandName;
result.Id = p38.BrandId;
return result;
}
private static ProductCategory funcMain16(Never p42, ProductCategory p43, ProductSDto p38)
{
ProductCategory result = p43 ?? new ProductCategory();
result.Name = p38.CategoryName;
result.Id = p38.CategoryId;
return result;
}
private static bool funcMain17(ProductStorageFile f)
{
return f.IsPrimary;
}
private static bool funcMain18(ProductStorageFile f)
{
return f.IsPrimary;
}
} }
} }

View File

@ -11,6 +11,12 @@ namespace NetinaShop.Domain.Mappers
{ {
return p1 == null ? null : new Shipping() return p1 == null ? null : new Shipping()
{ {
Name = p1.Name,
WarehouseName = p1.WarehouseName,
IsExpressShipping = p1.IsExpressShipping,
IsShipBySeller = p1.IsShipBySeller,
IsOriginalWarehouse = p1.IsOriginalWarehouse,
DeliveryCost = p1.DeliveryCost,
Id = p1.Id, Id = p1.Id,
CreatedAt = p1.CreatedAt CreatedAt = p1.CreatedAt
}; };
@ -23,6 +29,12 @@ namespace NetinaShop.Domain.Mappers
} }
Shipping result = p3 ?? new Shipping(); Shipping result = p3 ?? new Shipping();
result.Name = p2.Name;
result.WarehouseName = p2.WarehouseName;
result.IsExpressShipping = p2.IsExpressShipping;
result.IsShipBySeller = p2.IsShipBySeller;
result.IsOriginalWarehouse = p2.IsOriginalWarehouse;
result.DeliveryCost = p2.DeliveryCost;
result.Id = p2.Id; result.Id = p2.Id;
result.CreatedAt = p2.CreatedAt; result.CreatedAt = p2.CreatedAt;
return result; return result;
@ -32,6 +44,12 @@ namespace NetinaShop.Domain.Mappers
{ {
return p4 == null ? null : new ShippingSDto() return p4 == null ? null : new ShippingSDto()
{ {
Name = p4.Name,
WarehouseName = p4.WarehouseName,
IsExpressShipping = p4.IsExpressShipping,
IsShipBySeller = p4.IsShipBySeller,
IsOriginalWarehouse = p4.IsOriginalWarehouse,
DeliveryCost = p4.DeliveryCost,
Id = p4.Id, Id = p4.Id,
CreatedAt = p4.CreatedAt CreatedAt = p4.CreatedAt
}; };
@ -44,6 +62,12 @@ namespace NetinaShop.Domain.Mappers
} }
ShippingSDto result = p6 ?? new ShippingSDto(); ShippingSDto result = p6 ?? new ShippingSDto();
result.Name = p5.Name;
result.WarehouseName = p5.WarehouseName;
result.IsExpressShipping = p5.IsExpressShipping;
result.IsShipBySeller = p5.IsShipBySeller;
result.IsOriginalWarehouse = p5.IsOriginalWarehouse;
result.DeliveryCost = p5.DeliveryCost;
result.Id = p5.Id; result.Id = p5.Id;
result.CreatedAt = p5.CreatedAt; result.CreatedAt = p5.CreatedAt;
return result; return result;
@ -51,6 +75,12 @@ namespace NetinaShop.Domain.Mappers
} }
public static Expression<Func<Shipping, ShippingSDto>> ProjectToSDto => p7 => new ShippingSDto() public static Expression<Func<Shipping, ShippingSDto>> ProjectToSDto => p7 => new ShippingSDto()
{ {
Name = p7.Name,
WarehouseName = p7.WarehouseName,
IsExpressShipping = p7.IsExpressShipping,
IsShipBySeller = p7.IsShipBySeller,
IsOriginalWarehouse = p7.IsOriginalWarehouse,
DeliveryCost = p7.DeliveryCost,
Id = p7.Id, Id = p7.Id,
CreatedAt = p7.CreatedAt CreatedAt = p7.CreatedAt
}; };

View File

@ -17,6 +17,13 @@ public class MapsterRegister : IRegister
.TwoWays(); .TwoWays();
config.NewConfig<Product, ProductSDto>() config.NewConfig<Product, ProductSDto>()
.Map("MainImage",o=>o.Files.FirstOrDefault(f=>f.IsPrimary) != null ? o.Files.FirstOrDefault(f => f.IsPrimary).FileLocation : o.Files.Count>0 ? o.Files.FirstOrDefault().FileLocation : string.Empty)
.Map("CategoryName", o => o.Category == null ? null : o.Category.Name)
.Map("BrandName", o => o.Brand == null ? null : o.Brand.Name)
.IgnoreNullValues(false)
.TwoWays();
config.NewConfig<Product, ProductLDto>()
.Map("CategoryName", o => o.Category == null ? null : o.Category.Name) .Map("CategoryName", o => o.Category == null ? null : o.Category.Name)
.Map("BrandName", o => o.Brand == null ? null : o.Brand.Name) .Map("BrandName", o => o.Brand == null ? null : o.Brand.Name)
.IgnoreNullValues(false) .IgnoreNullValues(false)

View File

@ -12,7 +12,7 @@ public class CreateShippingCommandHandler : IRequestHandler<CreateShippingComman
} }
public async Task<ShippingSDto> Handle(CreateShippingCommand request, CancellationToken cancellationToken) public async Task<ShippingSDto> Handle(CreateShippingCommand request, CancellationToken cancellationToken)
{ {
var ent = Shipping.Create(request.Title, request.WarehouseName, request.IsFastShipping, request.IsShipBySeller, var ent = Shipping.Create(request.Name, request.WarehouseName, request.IsExpressShipping, request.IsShipBySeller,
request.IsOriginalWarehouse,request.DeliveryCost); request.IsOriginalWarehouse,request.DeliveryCost);
_repositoryWrapper.SetRepository<Shipping>().Add(ent); _repositoryWrapper.SetRepository<Shipping>().Add(ent);
await _repositoryWrapper.SaveChangesAsync(cancellationToken); await _repositoryWrapper.SaveChangesAsync(cancellationToken);

View File

@ -15,8 +15,8 @@ public class GetShippingsQueryHandler : IRequestHandler<GetShippingsQuery,List<S
return await _repositoryWrapper return await _repositoryWrapper
.SetRepository<Shipping>() .SetRepository<Shipping>()
.TableNoTracking.OrderByDescending(b => b.CreatedAt) .TableNoTracking.OrderByDescending(b => b.CreatedAt)
.Skip(request.Page * 10) .Skip(request.Page * 20)
.Take(10) .Take(20)
.Select(ShippingMapper.ProjectToSDto) .Select(ShippingMapper.ProjectToSDto)
.ToListAsync(cancellationToken); .ToListAsync(cancellationToken);
} }

View File

@ -17,7 +17,7 @@ public class UpdateShippingCommandHandler : IRequestHandler<UpdateShippingComman
if (ent == null) if (ent == null)
throw new AppException("Shipping not found", ApiResultStatusCode.NotFound); throw new AppException("Shipping not found", ApiResultStatusCode.NotFound);
var newEnt = Shipping.Create(request.Title, request.WarehouseName, request.IsFastShipping, request.IsShipBySeller, var newEnt = Shipping.Create(request.Name, request.WarehouseName, request.IsExpressShipping, request.IsShipBySeller,
request.IsOriginalWarehouse,request.DeliveryCost); request.IsOriginalWarehouse,request.DeliveryCost);
newEnt.Id = ent.Id; newEnt.Id = ent.Id;
newEnt.CreatedAt = ent.CreatedAt; newEnt.CreatedAt = ent.CreatedAt;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,930 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace NetinaShop.Repository.Migrations
{
/// <inheritdoc />
public partial class EditShippingName : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "Title",
schema: "public",
table: "Shippings",
newName: "Name");
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "UserFavoriteProducts",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "UserFavoriteProducts",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "UserFavoriteProducts",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "UserAddresses",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "UserAddresses",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "UserAddresses",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "StorageFiles",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "StorageFiles",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "StorageFiles",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "Specifications",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "Specifications",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "Specifications",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "Shippings",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "Shippings",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "Shippings",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "Reviews",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "Reviews",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "Reviews",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "Products",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "Products",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "Products",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "ProductCategories",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "ProductCategories",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "ProductCategories",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "Orders",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "Orders",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "Orders",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "OrderProducts",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "OrderProducts",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "OrderProducts",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "OrderDeliveries",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "OrderDeliveries",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "OrderDeliveries",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "Discounts",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "Discounts",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "Discounts",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "Brands",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "Brands",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "Brands",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "Blogs",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "Blogs",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "Blogs",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "BlogCategories",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "BlogCategories",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "BlogCategories",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "Name",
schema: "public",
table: "Shippings",
newName: "Title");
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "UserFavoriteProducts",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "UserFavoriteProducts",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "UserFavoriteProducts",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "UserAddresses",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "UserAddresses",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "UserAddresses",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "StorageFiles",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "StorageFiles",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "StorageFiles",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "Specifications",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "Specifications",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "Specifications",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "Shippings",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "Shippings",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "Shippings",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "Reviews",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "Reviews",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "Reviews",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "Products",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "Products",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "Products",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "ProductCategories",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "ProductCategories",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "ProductCategories",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "Orders",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "Orders",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "Orders",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "OrderProducts",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "OrderProducts",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "OrderProducts",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "OrderDeliveries",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "OrderDeliveries",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "OrderDeliveries",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "Discounts",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "Discounts",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "Discounts",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "Brands",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "Brands",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "Brands",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "Blogs",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "Blogs",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "Blogs",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "RemovedBy",
schema: "public",
table: "BlogCategories",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ModifiedBy",
schema: "public",
table: "BlogCategories",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "CreatedBy",
schema: "public",
table: "BlogCategories",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
}
}
}

View File

@ -143,7 +143,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("CreatedBy") b.Property<string>("CreatedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<bool>("IsRemoved") b.Property<bool>("IsRemoved")
@ -156,7 +155,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("ModifiedBy") b.Property<string>("ModifiedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<int>("ReadingTime") b.Property<int>("ReadingTime")
@ -166,7 +164,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("RemovedBy") b.Property<string>("RemovedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<string>("Summery") b.Property<string>("Summery")
@ -198,7 +195,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("CreatedBy") b.Property<string>("CreatedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<string>("Description") b.Property<string>("Description")
@ -212,7 +208,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("ModifiedBy") b.Property<string>("ModifiedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<string>("Name") b.Property<string>("Name")
@ -223,7 +218,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("RemovedBy") b.Property<string>("RemovedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.HasKey("Id"); b.HasKey("Id");
@ -241,7 +235,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("CreatedBy") b.Property<string>("CreatedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<string>("Description") b.Property<string>("Description")
@ -258,7 +251,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("ModifiedBy") b.Property<string>("ModifiedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<string>("Name") b.Property<string>("Name")
@ -273,7 +265,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("RemovedBy") b.Property<string>("RemovedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.HasKey("Id"); b.HasKey("Id");
@ -301,7 +292,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("CreatedBy") b.Property<string>("CreatedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<long>("DiscountAmount") b.Property<long>("DiscountAmount")
@ -343,7 +333,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("ModifiedBy") b.Property<string>("ModifiedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<long>("PriceCeiling") b.Property<long>("PriceCeiling")
@ -356,7 +345,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("RemovedBy") b.Property<string>("RemovedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<DateTime>("StartDate") b.Property<DateTime>("StartDate")
@ -387,7 +375,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("CreatedBy") b.Property<string>("CreatedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<double>("DeliveryPrice") b.Property<double>("DeliveryPrice")
@ -416,7 +403,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("ModifiedBy") b.Property<string>("ModifiedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<DateTime>("OrderAt") b.Property<DateTime>("OrderAt")
@ -441,7 +427,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("RemovedBy") b.Property<string>("RemovedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<double>("ServicePrice") b.Property<double>("ServicePrice")
@ -482,7 +467,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("CreatedBy") b.Property<string>("CreatedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<double>("DeliveryCost") b.Property<double>("DeliveryCost")
@ -495,7 +479,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("ModifiedBy") b.Property<string>("ModifiedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<Guid>("OrderId") b.Property<Guid>("OrderId")
@ -517,7 +500,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("RemovedBy") b.Property<string>("RemovedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<Guid>("ShippingId") b.Property<Guid>("ShippingId")
@ -545,7 +527,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("CreatedBy") b.Property<string>("CreatedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<bool>("IsRemoved") b.Property<bool>("IsRemoved")
@ -555,7 +536,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("ModifiedBy") b.Property<string>("ModifiedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<Guid>("OrderId") b.Property<Guid>("OrderId")
@ -586,7 +566,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("RemovedBy") b.Property<string>("RemovedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.HasKey("Id"); b.HasKey("Id");
@ -608,7 +587,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("CreatedBy") b.Property<string>("CreatedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<string>("Description") b.Property<string>("Description")
@ -625,7 +603,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("ModifiedBy") b.Property<string>("ModifiedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<string>("Name") b.Property<string>("Name")
@ -639,7 +616,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("RemovedBy") b.Property<string>("RemovedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.HasKey("Id"); b.HasKey("Id");
@ -671,7 +647,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("CreatedBy") b.Property<string>("CreatedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<string>("EnglishName") b.Property<string>("EnglishName")
@ -698,7 +673,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("ModifiedBy") b.Property<string>("ModifiedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<double>("PackingCost") b.Property<double>("PackingCost")
@ -715,7 +689,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("RemovedBy") b.Property<string>("RemovedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<int>("ReviewCount") b.Property<int>("ReviewCount")
@ -762,7 +735,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("CreatedBy") b.Property<string>("CreatedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<bool>("IsBuyer") b.Property<bool>("IsBuyer")
@ -778,7 +750,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("ModifiedBy") b.Property<string>("ModifiedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<Guid>("ProductId") b.Property<Guid>("ProductId")
@ -791,7 +762,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("RemovedBy") b.Property<string>("RemovedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<string>("Title") b.Property<string>("Title")
@ -820,7 +790,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("CreatedBy") b.Property<string>("CreatedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<string>("Detail") b.Property<string>("Detail")
@ -837,7 +806,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("ModifiedBy") b.Property<string>("ModifiedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<Guid?>("ParentId") b.Property<Guid?>("ParentId")
@ -850,7 +818,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("RemovedBy") b.Property<string>("RemovedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<string>("Title") b.Property<string>("Title")
@ -880,7 +847,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("CreatedBy") b.Property<string>("CreatedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<string>("Discriminator") b.Property<string>("Discriminator")
@ -912,7 +878,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("ModifiedBy") b.Property<string>("ModifiedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<string>("Name") b.Property<string>("Name")
@ -923,7 +888,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("RemovedBy") b.Property<string>("RemovedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.HasKey("Id"); b.HasKey("Id");
@ -1074,7 +1038,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("CreatedBy") b.Property<string>("CreatedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<bool>("IsRemoved") b.Property<bool>("IsRemoved")
@ -1090,7 +1053,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("ModifiedBy") b.Property<string>("ModifiedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<string>("PostalCode") b.Property<string>("PostalCode")
@ -1109,7 +1071,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("RemovedBy") b.Property<string>("RemovedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<Guid>("UserId") b.Property<Guid>("UserId")
@ -1132,7 +1093,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("CreatedBy") b.Property<string>("CreatedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<bool>("IsRemoved") b.Property<bool>("IsRemoved")
@ -1142,7 +1102,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("ModifiedBy") b.Property<string>("ModifiedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<Guid>("ProductId") b.Property<Guid>("ProductId")
@ -1152,7 +1111,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("RemovedBy") b.Property<string>("RemovedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<Guid>("UserId") b.Property<Guid>("UserId")
@ -1177,7 +1135,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("CreatedBy") b.Property<string>("CreatedBy")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<double>("DeliveryCost") b.Property<double>("DeliveryCost")
@ -1199,6 +1156,9 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("ModifiedBy") b.Property<string>("ModifiedBy")
.HasColumnType("text");
b.Property<string>("Name")
.IsRequired() .IsRequired()
.HasColumnType("text"); .HasColumnType("text");
@ -1206,11 +1166,6 @@ namespace NetinaShop.Repository.Migrations
.HasColumnType("timestamp without time zone"); .HasColumnType("timestamp without time zone");
b.Property<string>("RemovedBy") b.Property<string>("RemovedBy")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Title")
.IsRequired()
.HasColumnType("text"); .HasColumnType("text");
b.Property<string>("WarehouseName") b.Property<string>("WarehouseName")