Infrastructure

This commit is contained in:
2026-04-22 20:51:02 +04:30
parent c64c3dd9be
commit 64ee78e320
199 changed files with 7428 additions and 1027 deletions
@@ -0,0 +1,7 @@
using Vizhvizh.BuildingBlocks.Domain.Contract;
namespace Vizhvizh.GoldGallery.ApplicationContract.Commands;
public record CreateCategoryCommand(string Title, string Description, string Image, long? ParentId) : CommandBase;
public record UpdateCategoryCommand(long CategoryId, string Title, string Description, string Image, long? ParentId) : CommandBase;
public record DeleteCategoryCommand(long CategoryId) : CommandBase;
@@ -0,0 +1,9 @@
using Vizhvizh.BuildingBlocks.Domain.Contract;
using Vizhvizh.GoldGallery.ApplicationContract.Models.Products;
using Vizhvizh.GoldGallery.Domain.Products.ValuesObjects;
namespace Vizhvizh.GoldGallery.ApplicationContract.Commands;
public record CreateProductCommand(long ShopId, long CategoryId, string Title, string Description, string Image, decimal CraftsmanshipFee,
ProductConditionEnum ProductCondition, string? File3D, List<CreateProductModel.SpecificationsModel> ProductSpecifications,
List<CreateProductModel.ProductVariant> ProductVariants) : CommandBase;
@@ -0,0 +1,9 @@
using Vizhvizh.BuildingBlocks.Domain.Contract;
using Vizhvizh.GoldGallery.Domain.Shops.TypeIds;
using Vizhvizh.GoldGallery.Domain.Shops.ValuesObjects;
namespace Vizhvizh.GoldGallery.ApplicationContract.Commands;
public record CreateShopCommand(long OwnerId, string Title,string Telephone,string ShopBusinessLicenseImage,string ShopBusinessLicenseCode,
string Description, string Email, ShopLocation ShopLocation) : CommandBase;
public record SetTitleShopCommand(long ShopId,string Title) : CommandBase;
@@ -0,0 +1,6 @@
using Vizhvizh.BuildingBlocks.Domain.Contract;
using Vizhvizh.GoldGallery.Domain.Sliders.ValuesObjects;
namespace Vizhvizh.GoldGallery.ApplicationContract.Commands;
public record CreateSliderCommand(string Title, string ImageUrl,string LinkUrl, SliderKeyType SliderKeyType, string? SliderKey) : CommandBase;
@@ -0,0 +1,6 @@
using Vizhvizh.BuildingBlocks.Domain.Contract;
namespace Vizhvizh.GoldGallery.ApplicationContract.Commands
{
public record TestCommand() : CommandBase<Guid>;
}
@@ -0,0 +1,13 @@
namespace Vizhvizh.GoldGallery.ApplicationContract.DTOs;
public class ShopDTO
{
public long Id { get; set; }
public long OwnerId{ get; set; }
public string Title { get; set; } = null!;
public string? Description{ get; set; }
public string? Email { get; set; }
public string Telephone { get; set; } = null!;
public string Logo{ get; set; } = null!;
public ShopLocationDTO ShopLocation { get; set; } = null!;
}
@@ -0,0 +1,9 @@
using Newtonsoft.Json;
namespace Vizhvizh.GoldGallery.ApplicationContract.DTOs;
public record ShopLocationDTO(double Latitude,double Longitude,int ProvinceId, int CityId,string Address, string PostalCode)
{
public static implicit operator ShopLocationDTO(string address)
=> JsonConvert.DeserializeObject<ShopLocationDTO>(address)!;
}
@@ -0,0 +1,3 @@
namespace Vizhvizh.GoldGallery.ApplicationContract.DTOs;
public record SliderDTO(string Title, string Image,string LinkUrl);
@@ -0,0 +1,7 @@
namespace Vizhvizh.GoldGallery.ApplicationContract.Models.Products;
public class CreateProductModel
{
public record SpecificationsModel(string Title, List<string> Values);
public record ProductVariant(double Quantity, decimal Weight, List<string> Gallery);
}
@@ -0,0 +1,7 @@
namespace Vizhvizh.GoldGallery.ApplicationContract.Queries;
public class PaginationQuery
{
public int PageNumber { get; set; }
public int PageSize { get; set; }
}
@@ -0,0 +1,7 @@
using Vizhvizh.BuildingBlocks.Domain.Contract;
using Vizhvizh.GoldGallery.ApplicationContract.DTOs;
using Vizhvizh.GoldGallery.Domain.Shops.TypeIds;
namespace Vizhvizh.GoldGallery.ApplicationContract.Queries;
public record GetShopByIdQuery(long ShopId) : IQuery<ShopDTO?>;
@@ -0,0 +1,9 @@
using Vizhvizh.BuildingBlocks.Domain.Contract;
using Vizhvizh.GoldGallery.ApplicationContract.DTOs;
namespace Vizhvizh.GoldGallery.ApplicationContract.Queries;
public class GetSlidersByKeyQuery : PaginationQuery, IQuery<IEnumerable<SliderDTO>>
{
public string Key { get; set; }
}
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Vichvich.Shared.Application\Vizhvizh.Shared.Application.csproj" />
<ProjectReference Include="..\Vizhvizh.GoldGallery.Domain\Vizhvizh.GoldGallery.Domain.csproj" />
</ItemGroup>
</Project>