Merge branch 'main' into kub-stage
This commit is contained in:
@@ -25,8 +25,38 @@ public class GetUserOrderResponseDto
|
|||||||
public string? UserAddressText { get; set; }
|
public string? UserAddressText { get; set; }
|
||||||
//
|
//
|
||||||
public List<GetUserOrderResponseFactorDetail>? FactorDetails { get; set; }
|
public List<GetUserOrderResponseFactorDetail>? FactorDetails { get; set; }
|
||||||
|
// اطلاعات مالیات بر ارزش افزوده
|
||||||
|
public OrderVATInfoDto? VatInfo { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
}public class GetUserOrderResponseFactorDetail
|
/// <summary>
|
||||||
|
/// اطلاعات مالیات بر ارزش افزوده
|
||||||
|
/// </summary>
|
||||||
|
public class OrderVATInfoDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// نرخ مالیات (مثلاً 0.09 = 9%)
|
||||||
|
/// </summary>
|
||||||
|
public double VatRate { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// مبلغ پایه (قبل از مالیات)
|
||||||
|
/// </summary>
|
||||||
|
public long BaseAmount { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// مبلغ مالیات
|
||||||
|
/// </summary>
|
||||||
|
public long VatAmount { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// مبلغ کل (پایه + مالیات)
|
||||||
|
/// </summary>
|
||||||
|
public long TotalAmount { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// آیا پرداخت شده
|
||||||
|
/// </summary>
|
||||||
|
public bool IsPaid { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GetUserOrderResponseFactorDetail
|
||||||
{
|
{
|
||||||
//شناسه
|
//شناسه
|
||||||
public long ProductId { get; set; }
|
public long ProductId { get; set; }
|
||||||
|
|||||||
40
src/FrontOffice.BFF.WebApi/Dockerfile
Normal file
40
src/FrontOffice.BFF.WebApi/Dockerfile
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
|
||||||
|
USER $APP_UID
|
||||||
|
WORKDIR /app
|
||||||
|
EXPOSE 8080
|
||||||
|
EXPOSE 8081
|
||||||
|
|
||||||
|
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
|
||||||
|
ARG BUILD_CONFIGURATION=Release
|
||||||
|
WORKDIR /src
|
||||||
|
COPY ["FrontOffice.BFF.WebApi/NuGet.config", "NuGet.config"]
|
||||||
|
COPY ["FrontOffice.BFF.WebApi/FrontOffice.BFF.WebApi.csproj", "FrontOffice.BFF.WebApi/"]
|
||||||
|
COPY ["Protobufs/FrontOffice.BFF.DiscountShop.Protobuf/FrontOffice.BFF.DiscountShop.Protobuf.csproj", "Protobufs/FrontOffice.BFF.DiscountShop.Protobuf/"]
|
||||||
|
COPY ["FrontOffice.BFF.Application/FrontOffice.BFF.Application.csproj", "FrontOffice.BFF.Application/"]
|
||||||
|
COPY ["FrontOffice.BFF.Domain/FrontOffice.BFF.Domain.csproj", "FrontOffice.BFF.Domain/"]
|
||||||
|
COPY ["Protobufs/FrontOffice.BFF.UserOrder.Protobuf/FrontOffice.BFF.UserOrder.Protobuf.csproj", "Protobufs/FrontOffice.BFF.UserOrder.Protobuf/"]
|
||||||
|
COPY ["Protobufs/FrontOffice.BFF.Category.Protobuf/FrontOffice.BFF.Category.Protobuf.csproj", "Protobufs/FrontOffice.BFF.Category.Protobuf/"]
|
||||||
|
COPY ["FrontOffice.BFF.Infrastructure/FrontOffice.BFF.Infrastructure.csproj", "FrontOffice.BFF.Infrastructure/"]
|
||||||
|
COPY ["Protobufs/FrontOffice.BFF.Products.Protobuf/FrontOffice.BFF.Products.Protobuf.csproj", "Protobufs/FrontOffice.BFF.Products.Protobuf/"]
|
||||||
|
COPY ["Protobufs/FrontOffice.BFF.ShopingCart.Protobuf/FrontOffice.BFF.ShopingCart.Protobuf.csproj", "Protobufs/FrontOffice.BFF.ShopingCart.Protobuf/"]
|
||||||
|
COPY ["Protobufs/FrontOffice.BFF.Transaction.Protobuf/FrontOffice.BFF.Transaction.Protobuf.csproj", "Protobufs/FrontOffice.BFF.Transaction.Protobuf/"]
|
||||||
|
COPY ["Protobufs/FrontOffice.BFF.UserWallet.Protobuf/FrontOffice.BFF.UserWallet.Protobuf.csproj", "Protobufs/FrontOffice.BFF.UserWallet.Protobuf/"]
|
||||||
|
COPY ["Protobufs/FrontOffice.BFF.User.Protobuf/FrontOffice.BFF.User.Protobuf.csproj", "Protobufs/FrontOffice.BFF.User.Protobuf/"]
|
||||||
|
COPY ["Protobufs/FrontOffice.BFF.UserAddress.Protobuf/FrontOffice.BFF.UserAddress.Protobuf.csproj", "Protobufs/FrontOffice.BFF.UserAddress.Protobuf/"]
|
||||||
|
COPY ["Protobufs/FrontOffice.BFF.Package.Protobuf/FrontOffice.BFF.Package.Protobuf.csproj", "Protobufs/FrontOffice.BFF.Package.Protobuf/"]
|
||||||
|
COPY ["Protobufs/FrontOffice.BFF.Commission.Protobuf/FrontOffice.BFF.Commission.Protobuf.csproj", "Protobufs/FrontOffice.BFF.Commission.Protobuf/"]
|
||||||
|
COPY ["Protobufs/FrontOffice.BFF.ClubMembership.Protobuf/FrontOffice.BFF.ClubMembership.Protobuf.csproj", "Protobufs/FrontOffice.BFF.ClubMembership.Protobuf/"]
|
||||||
|
COPY ["Protobufs/FrontOffice.BFF.NetworkMembership.Protobuf/FrontOffice.BFF.NetworkMembership.Protobuf.csproj", "Protobufs/FrontOffice.BFF.NetworkMembership.Protobuf/"]
|
||||||
|
RUN dotnet restore "FrontOffice.BFF.WebApi/FrontOffice.BFF.WebApi.csproj" --configfile NuGet.config
|
||||||
|
COPY . .
|
||||||
|
WORKDIR "/src/FrontOffice.BFF.WebApi"
|
||||||
|
RUN dotnet build "./FrontOffice.BFF.WebApi.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
||||||
|
|
||||||
|
FROM build AS publish
|
||||||
|
ARG BUILD_CONFIGURATION=Release
|
||||||
|
RUN dotnet publish "./FrontOffice.BFF.WebApi.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
||||||
|
|
||||||
|
FROM base AS final
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=publish /app/publish .
|
||||||
|
ENTRYPOINT ["dotnet", "FrontOffice.BFF.WebApi.dll"]
|
||||||
@@ -36,4 +36,9 @@
|
|||||||
<ProjectReference Include="..\Protobufs\FrontOffice.BFF.ClubMembership.Protobuf\FrontOffice.BFF.ClubMembership.Protobuf.csproj" />
|
<ProjectReference Include="..\Protobufs\FrontOffice.BFF.ClubMembership.Protobuf\FrontOffice.BFF.ClubMembership.Protobuf.csproj" />
|
||||||
<ProjectReference Include="..\Protobufs\FrontOffice.BFF.NetworkMembership.Protobuf\FrontOffice.BFF.NetworkMembership.Protobuf.csproj" />
|
<ProjectReference Include="..\Protobufs\FrontOffice.BFF.NetworkMembership.Protobuf\FrontOffice.BFF.NetworkMembership.Protobuf.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="..\.dockerignore">
|
||||||
|
<Link>.dockerignore</Link>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
18
src/FrontOffice.BFF.WebApi/NuGet.config
Normal file
18
src/FrontOffice.BFF.WebApi/NuGet.config
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<packageSources>
|
||||||
|
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
||||||
|
<add key="FourSat" value="https://git.afrino.co/api/packages/FourSat/nuget/index.json" />
|
||||||
|
<add key="Afrino" value="https://git.afrino.co/api/packages/Afrino/nuget/index.json" />
|
||||||
|
</packageSources>
|
||||||
|
<packageSourceCredentials>
|
||||||
|
<FourSat>
|
||||||
|
<add key="Username" value="masoud" />
|
||||||
|
<add key="ClearTextPassword" value="87zH26nbqT" />
|
||||||
|
</FourSat>
|
||||||
|
<Afrino>
|
||||||
|
<add key="Username" value="systemuser" />
|
||||||
|
<add key="ClearTextPassword" value="sZSA7PTiv3pUSQZ" />
|
||||||
|
</Afrino>
|
||||||
|
</packageSourceCredentials>
|
||||||
|
</configuration>
|
||||||
@@ -94,6 +94,18 @@ message GetUserOrderResponse
|
|||||||
}
|
}
|
||||||
google.protobuf.StringValue user_address_text = 10;
|
google.protobuf.StringValue user_address_text = 10;
|
||||||
repeated GetUserOrderResponseFactorDetail factor_details = 11;
|
repeated GetUserOrderResponseFactorDetail factor_details = 11;
|
||||||
|
// VAT information
|
||||||
|
OrderVATInfo vat_info = 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
// اطلاعات مالیات بر ارزش افزوده
|
||||||
|
message OrderVATInfo
|
||||||
|
{
|
||||||
|
double vat_rate = 1; // نرخ مالیات (مثلاً 0.09)
|
||||||
|
int64 base_amount = 2; // مبلغ پایه (قبل از مالیات)
|
||||||
|
int64 vat_amount = 3; // مبلغ مالیات
|
||||||
|
int64 total_amount = 4; // مبلغ کل (پایه + مالیات)
|
||||||
|
bool is_paid = 5; // آیا پرداخت شده
|
||||||
}
|
}
|
||||||
enum PaymentStatus
|
enum PaymentStatus
|
||||||
{
|
{
|
||||||
@@ -173,6 +185,8 @@ message SubmitShopBuyOrderRequest
|
|||||||
message SubmitShopBuyOrderResponse
|
message SubmitShopBuyOrderResponse
|
||||||
{
|
{
|
||||||
int64 id = 1;
|
int64 id = 1;
|
||||||
|
// VAT information for checkout confirmation
|
||||||
|
OrderVATInfo vat_info = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message PaginationState
|
message PaginationState
|
||||||
|
|||||||
Reference in New Issue
Block a user