config for admin
parent
1578c27f3d
commit
4ebcf7538a
|
@ -1,7 +1,8 @@
|
||||||
{
|
{
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"PostgresServer": "User ID=postgres;Password=root;Host=localhost;Port=5432;Database=iGarsonDB;",
|
"PostgresServer": "User ID=postgres;Password=root;Host=localhost;Port=5432;Database=iGarsonDB;",
|
||||||
"Postgres": "Host=pg-0,pg-1;Username=igarsonAgent;Password=xHTpBf4wC+bBeNg2pL6Ga7VEWKFJx7VPEUpqxwPFfOc2YYTVwFQuHfsiqoVeT9+6;Database=NetinaShopDB;Load Balance Hosts=true;Target Session Attributes=primary;Application Name=iGLS"
|
"Postgres": "Host=pg-0,pg-1;Username=igarsonAgent;Password=xHTpBf4wC+bBeNg2pL6Ga7VEWKFJx7VPEUpqxwPFfOc2YYTVwFQuHfsiqoVeT9+6;Database=NetinaShopDB;Load Balance Hosts=true;Target Session Attributes=primary;Application Name=iGLS",
|
||||||
|
"SettingDB": "Host=pg-0,pg-1;Username=igarsonAgent;Password=xHTpBf4wC+bBeNg2pL6Ga7VEWKFJx7VPEUpqxwPFfOc2YYTVwFQuHfsiqoVeT9+6;Database=NetinaShopSettingDB;Load Balance Hosts=true;Target Session Attributes=primary;Application Name=iGLS"
|
||||||
},
|
},
|
||||||
"Logging": {
|
"Logging": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
namespace NetinaShop.Common.Extensions;
|
||||||
|
|
||||||
|
public static class BoolExtensions
|
||||||
|
{
|
||||||
|
public static string ToPersianString(this bool value)
|
||||||
|
{
|
||||||
|
return value ? "بله" : "خیر";
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
using NetinaShop.Domain.DocumentEntities.Complexes;
|
||||||
|
|
||||||
|
namespace NetinaShop.Domain.CommandQueries.Commands;
|
||||||
|
|
||||||
|
public record CreateOrUpdateComplexCommand(string Name,
|
||||||
|
string Address,
|
||||||
|
string Description,
|
||||||
|
string SupportPhone,
|
||||||
|
double Latitude,
|
||||||
|
double Longitude,
|
||||||
|
string ReturnedAddress,
|
||||||
|
string TermsAndPrivacyRules) : IRequest<Complex>;
|
|
@ -0,0 +1,9 @@
|
||||||
|
namespace NetinaShop.Domain.DocumentEntities.Complexes;
|
||||||
|
|
||||||
|
public partial class Complex
|
||||||
|
{
|
||||||
|
public static Complex Create(string name, string address, string description, string supportPhone, double latitude, double longitude, string returnedAddress, string termsAndPrivacyRules)
|
||||||
|
{
|
||||||
|
return new Complex(name, address, description, supportPhone, latitude, longitude, returnedAddress,termsAndPrivacyRules);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
namespace NetinaShop.Domain.DocumentEntities.Complexes;
|
||||||
|
|
||||||
|
public partial class Complex
|
||||||
|
{
|
||||||
|
public Complex()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
public Complex(string name,
|
||||||
|
string address,
|
||||||
|
string description,
|
||||||
|
string supportPhone,
|
||||||
|
double latitude,
|
||||||
|
double longitude,
|
||||||
|
string returnedAddress,
|
||||||
|
string termsAndPrivacyRules)
|
||||||
|
{
|
||||||
|
Name = name;
|
||||||
|
Address = address;
|
||||||
|
Description = description;
|
||||||
|
SupportPhone = supportPhone;
|
||||||
|
Latitude = latitude;
|
||||||
|
Longitude = longitude;
|
||||||
|
ReturnedAddress = returnedAddress;
|
||||||
|
TermsAndPrivacyRules = termsAndPrivacyRules;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
public string Name { get; internal set; } = string.Empty;
|
||||||
|
public string Address { get; internal set; } = string.Empty;
|
||||||
|
public string Description { get; internal set; } = string.Empty;
|
||||||
|
public string SupportPhone { get; internal set; } = string.Empty;
|
||||||
|
public double Latitude { get; internal set; }
|
||||||
|
public double Longitude { get; internal set; }
|
||||||
|
public string ReturnedAddress { get; internal set; } = string.Empty;
|
||||||
|
public string TermsAndPrivacyRules { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
namespace NetinaShop.Domain.DocumentEntities.Settings;
|
||||||
|
|
||||||
|
public class OrderingSetting
|
||||||
|
{
|
||||||
|
public bool HasCashPayment { get; set; }
|
||||||
|
}
|
|
@ -23,4 +23,5 @@ public class ProductSDto : BaseDto<ProductSDto, Product>
|
||||||
|
|
||||||
public Guid BrandId { get; set; }
|
public Guid BrandId { get; set; }
|
||||||
public string BrandNames { get; set; } = string.Empty;
|
public string BrandNames { get; set; } = string.Empty;
|
||||||
|
public string CategoryName { get; set; } = string.Empty;
|
||||||
}
|
}
|
|
@ -2,14 +2,15 @@
|
||||||
|
|
||||||
public partial class Product
|
public partial class Product
|
||||||
{
|
{
|
||||||
public static Product Create(string persianName, string englishName, string summery, string expertCheck, string tags, string warranty, bool beDisplayed, double cost, double packingCost,
|
public static Product Create(string persianName, string englishName, string summery, string expertCheck, string tags, string warranty, bool beDisplayed,
|
||||||
int reviewCount,
|
double cost,
|
||||||
float reviewRate,
|
double packingCost,
|
||||||
int viewed,
|
bool hasExpressDelivery,
|
||||||
|
int maxOrderCount,
|
||||||
Guid brandId,
|
Guid brandId,
|
||||||
Guid categoryId)
|
Guid categoryId)
|
||||||
{
|
{
|
||||||
return new Product(persianName, englishName, summery, expertCheck, tags, warranty, beDisplayed,cost, packingCost, reviewCount, reviewRate, viewed, brandId,categoryId);
|
return new Product(persianName, englishName, summery, expertCheck, tags, warranty, beDisplayed,cost, packingCost,hasExpressDelivery,maxOrderCount, brandId,categoryId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddRate(float rate)
|
public void AddRate(float rate)
|
||||||
|
|
|
@ -21,9 +21,8 @@ public partial class Product : ApiEntity
|
||||||
bool beDisplayed,
|
bool beDisplayed,
|
||||||
double cost,
|
double cost,
|
||||||
double packingCost,
|
double packingCost,
|
||||||
int reviewCount,
|
bool hasExpressDelivery,
|
||||||
float rate,
|
int maxOrderCount,
|
||||||
int viewed,
|
|
||||||
Guid brandId,
|
Guid brandId,
|
||||||
Guid categoryId)
|
Guid categoryId)
|
||||||
{
|
{
|
||||||
|
@ -36,11 +35,10 @@ public partial class Product : ApiEntity
|
||||||
BeDisplayed = beDisplayed;
|
BeDisplayed = beDisplayed;
|
||||||
Cost = cost;
|
Cost = cost;
|
||||||
PackingCost = packingCost;
|
PackingCost = packingCost;
|
||||||
|
HasExpressDelivery = hasExpressDelivery;
|
||||||
|
MaxOrderCount = maxOrderCount;
|
||||||
BrandId = brandId;
|
BrandId = brandId;
|
||||||
CategoryId = categoryId;
|
CategoryId = categoryId;
|
||||||
ReviewCount = reviewCount;
|
|
||||||
Rate = rate;
|
|
||||||
Viewed = viewed;
|
|
||||||
}
|
}
|
||||||
public string PersianName { get; internal set; } = string.Empty;
|
public string PersianName { get; internal set; } = string.Empty;
|
||||||
public string EnglishName { get; internal set; } = string.Empty;
|
public string EnglishName { get; internal set; } = string.Empty;
|
||||||
|
@ -55,6 +53,8 @@ public partial class Product : ApiEntity
|
||||||
public float Rate { get; internal set; }
|
public float Rate { get; internal set; }
|
||||||
public int ReviewCount { get; internal set; }
|
public int ReviewCount { get; internal set; }
|
||||||
public int Viewed { get; internal set; }
|
public int Viewed { get; internal set; }
|
||||||
|
public bool HasExpressDelivery { get; set; }
|
||||||
|
public int MaxOrderCount { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public Guid BrandId { get; internal set; }
|
public Guid BrandId { get; internal set; }
|
||||||
|
|
|
@ -9,11 +9,11 @@ public partial class Shipping : ApiEntity
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public Shipping(string title, string warehouseName, bool isFastShipping, bool isShipBySeller, bool isOriginalWarehouse, double deliveryCost)
|
public Shipping(string title, string warehouseName, bool isExpressShipping, bool isShipBySeller, bool isOriginalWarehouse, double deliveryCost)
|
||||||
{
|
{
|
||||||
Title = title;
|
Title = title;
|
||||||
WarehouseName = warehouseName;
|
WarehouseName = warehouseName;
|
||||||
IsFastShipping = isFastShipping;
|
IsExpressShipping = isExpressShipping;
|
||||||
IsShipBySeller = isShipBySeller;
|
IsShipBySeller = isShipBySeller;
|
||||||
IsOriginalWarehouse = isOriginalWarehouse;
|
IsOriginalWarehouse = isOriginalWarehouse;
|
||||||
DeliveryCost = deliveryCost;
|
DeliveryCost = deliveryCost;
|
||||||
|
@ -21,7 +21,7 @@ public partial class Shipping : ApiEntity
|
||||||
|
|
||||||
public string Title { get; internal set; } = string.Empty;
|
public string Title { get; internal set; } = string.Empty;
|
||||||
public string WarehouseName { get; internal set; } = string.Empty;
|
public string WarehouseName { get; internal set; } = string.Empty;
|
||||||
public bool IsFastShipping { get; internal set; }
|
public bool IsExpressShipping { get; internal set; }
|
||||||
public bool IsShipBySeller { get; internal set; }
|
public bool IsShipBySeller { get; internal set; }
|
||||||
public bool IsOriginalWarehouse { get; internal set; }
|
public bool IsOriginalWarehouse { get; internal set; }
|
||||||
public double DeliveryCost { get; internal set; }
|
public double DeliveryCost { get; internal set; }
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
using NetinaShop.Domain.DocumentEntities.Complexes;
|
||||||
|
|
||||||
|
namespace NetinaShop.Repository.Handlers.Complexes;
|
||||||
|
|
||||||
|
public class CreateOrUpdateComplexCommandHandler : IRequestHandler<CreateOrUpdateComplexCommand,Complex>
|
||||||
|
{
|
||||||
|
|
||||||
|
public Task<Complex> Handle(CreateOrUpdateComplexCommand request, CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -29,6 +29,7 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Handlers\Brands\" />
|
<Folder Include="Handlers\Brands\" />
|
||||||
|
<Folder Include="Handlers\Complexes\" />
|
||||||
<Folder Include="Models\" />
|
<Folder Include="Models\" />
|
||||||
<Folder Include="Extensions\" />
|
<Folder Include="Extensions\" />
|
||||||
<Folder Include="Services\Abstracts\" />
|
<Folder Include="Services\Abstracts\" />
|
||||||
|
|
Loading…
Reference in New Issue