try
This commit is contained in:
20
Webshop.Application/DTOs/AddressDto.cs
Normal file
20
Webshop.Application/DTOs/AddressDto.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
|
||||
namespace Webshop.Application.DTOs
|
||||
{
|
||||
public class AddressDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Street { get; set; } = string.Empty;
|
||||
public string HouseNumber { get; set; } = string.Empty;
|
||||
public string City { get; set; } = string.Empty;
|
||||
public string PostalCode { get; set; } = string.Empty;
|
||||
public string Country { get; set; } = string.Empty;
|
||||
public AddressType Type { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,10 @@
|
||||
namespace Webshop.Application.DTOs
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace Webshop.Application.DTOs
|
||||
{
|
||||
public class AdminProductDto
|
||||
{
|
||||
@@ -14,9 +20,9 @@
|
||||
public decimal? Weight { get; set; }
|
||||
public string? ImageUrl { get; set; }
|
||||
public string Slug { get; set; } = string.Empty;
|
||||
public DateTimeOffset CreatedDate { get; set; }
|
||||
public DateTimeOffset CreatedDate { get; set; } = DateTimeOffset.UtcNow;
|
||||
public DateTimeOffset? LastModifiedDate { get; set; }
|
||||
public Guid? SupplierId { get; set; }
|
||||
public decimal? PurchasePrice { get; set; } // Admin-spezifisches Feld
|
||||
public decimal? PurchasePrice { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
namespace Webshop.Application.DTOs.Auth
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace Webshop.Application.DTOs.Auth
|
||||
{
|
||||
public class AuthResponseDto
|
||||
{
|
||||
@@ -9,4 +15,4 @@
|
||||
public string Email { get; set; } = string.Empty;
|
||||
public List<string> Roles { get; set; } = new List<string>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
|
||||
namespace Webshop.Application.DTOs.Auth
|
||||
{
|
||||
@@ -11,4 +16,4 @@ namespace Webshop.Application.DTOs.Auth
|
||||
[Required(ErrorMessage = "Passwort ist erforderlich.")]
|
||||
public string Password { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
|
||||
namespace Webshop.Application.DTOs.Auth
|
||||
{
|
||||
@@ -19,4 +24,4 @@ namespace Webshop.Application.DTOs.Auth
|
||||
public string? FirstName { get; set; }
|
||||
public string? LastName { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
20
Webshop.Application/DTOs/CategoryDto.cs
Normal file
20
Webshop.Application/DTOs/CategoryDto.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace Webshop.Application.DTOs
|
||||
{
|
||||
public class CategoryDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Slug { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public Guid? ParentCategoryId { get; set; }
|
||||
public string? ImageUrl { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public int DisplayOrder { get; set; }
|
||||
}
|
||||
}
|
||||
19
Webshop.Application/DTOs/CreateCategoryDto.cs
Normal file
19
Webshop.Application/DTOs/CreateCategoryDto.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace Webshop.Application.DTOs
|
||||
{
|
||||
public class CreateCategoryDto
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Slug { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public Guid? ParentCategoryId { get; set; }
|
||||
public string? ImageUrl { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
public int DisplayOrder { get; set; } = 0;
|
||||
}
|
||||
}
|
||||
20
Webshop.Application/DTOs/CreateOrderDto.cs
Normal file
20
Webshop.Application/DTOs/CreateOrderDto.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace Webshop.Application.DTOs
|
||||
{
|
||||
public class CreateOrderDto
|
||||
{
|
||||
public Guid? CustomerId { get; set; } // Nullable für Gastbestellung
|
||||
public string? GuestEmail { get; set; }
|
||||
public string? GuestPhoneNumber { get; set; }
|
||||
public Guid ShippingAddressId { get; set; }
|
||||
public Guid BillingAddressId { get; set; }
|
||||
public Guid PaymentMethodId { get; set; }
|
||||
public Guid ShippingMethodId { get; set; }
|
||||
public List<CreateOrderItemDto> Items { get; set; } = new List<CreateOrderItemDto>();
|
||||
}
|
||||
}
|
||||
15
Webshop.Application/DTOs/CreateOrderItemDto.cs
Normal file
15
Webshop.Application/DTOs/CreateOrderItemDto.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace Webshop.Application.DTOs
|
||||
{
|
||||
public class CreateOrderItemDto
|
||||
{
|
||||
public Guid ProductId { get; set; }
|
||||
public Guid? ProductVariantId { get; set; }
|
||||
public int Quantity { get; set; }
|
||||
}
|
||||
}
|
||||
16
Webshop.Application/DTOs/CreateReviewDto.cs
Normal file
16
Webshop.Application/DTOs/CreateReviewDto.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace Webshop.Application.DTOs
|
||||
{
|
||||
public class CreateReviewDto
|
||||
{
|
||||
public Guid ProductId { get; set; }
|
||||
public int Rating { get; set; }
|
||||
public string? Title { get; set; }
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
20
Webshop.Application/DTOs/CustomerDto.cs
Normal file
20
Webshop.Application/DTOs/CustomerDto.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace Webshop.Application.DTOs
|
||||
{
|
||||
public class CustomerDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string UserId { get; set; } = string.Empty;
|
||||
public string FirstName { get; set; } = string.Empty;
|
||||
public string LastName { get; set; } = string.Empty;
|
||||
public string Email { get; set; } = string.Empty;
|
||||
public string? PhoneNumber { get; set; }
|
||||
public Guid? DefaultShippingAddressId { get; set; }
|
||||
public Guid? DefaultBillingAddressId { get; set; }
|
||||
}
|
||||
}
|
||||
24
Webshop.Application/DTOs/DiscountDto.cs
Normal file
24
Webshop.Application/DTOs/DiscountDto.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
|
||||
namespace Webshop.Application.DTOs
|
||||
{
|
||||
public class DiscountDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public DiscountType Type { get; set; }
|
||||
public decimal Value { get; set; }
|
||||
public string? CouponCode { get; set; }
|
||||
public DateTimeOffset StartDate { get; set; }
|
||||
public DateTimeOffset EndDate { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public int? MaxUses { get; set; }
|
||||
public int CurrentUses { get; set; }
|
||||
public string? Description { get; set; }
|
||||
}
|
||||
}
|
||||
27
Webshop.Application/DTOs/OrderDetailDto.cs
Normal file
27
Webshop.Application/DTOs/OrderDetailDto.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
|
||||
namespace Webshop.Application.DTOs
|
||||
{
|
||||
public class OrderDetailDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string OrderNumber { get; set; } = string.Empty;
|
||||
public Guid CustomerId { get; set; }
|
||||
public DateTimeOffset OrderDate { get; set; }
|
||||
public OrderStatus Status { get; set; }
|
||||
public decimal TotalAmount { get; set; }
|
||||
public Guid ShippingAddressId { get; set; }
|
||||
public Guid BillingAddressId { get; set; }
|
||||
public Guid PaymentMethodId { get; set; }
|
||||
public string? ShippingTrackingNumber { get; set; }
|
||||
public DateTimeOffset? ShippedDate { get; set; }
|
||||
public DateTimeOffset? DeliveredDate { get; set; }
|
||||
public PaymentStatus PaymentStatus { get; set; }
|
||||
public List<OrderItemDto> OrderItems { get; set; } = new List<OrderItemDto>();
|
||||
}
|
||||
}
|
||||
21
Webshop.Application/DTOs/OrderItemDto.cs
Normal file
21
Webshop.Application/DTOs/OrderItemDto.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace Webshop.Application.DTOs
|
||||
{
|
||||
public class OrderItemDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid OrderId { get; set; } // Foreign Key zu Order
|
||||
public Guid ProductId { get; set; }
|
||||
public Guid? ProductVariantId { get; set; }
|
||||
public string ProductName { get; set; } = string.Empty;
|
||||
public string ProductSKU { get; set; } = string.Empty;
|
||||
public int Quantity { get; set; }
|
||||
public decimal UnitPrice { get; set; }
|
||||
public decimal TotalPrice { get; set; }
|
||||
}
|
||||
}
|
||||
21
Webshop.Application/DTOs/OrderSummaryDto.cs
Normal file
21
Webshop.Application/DTOs/OrderSummaryDto.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
|
||||
namespace Webshop.Application.DTOs
|
||||
{
|
||||
public class OrderSummaryDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string OrderNumber { get; set; } = string.Empty;
|
||||
public DateTimeOffset OrderDate { get; set; }
|
||||
public OrderStatus Status { get; set; }
|
||||
public decimal TotalAmount { get; set; }
|
||||
public PaymentStatus PaymentStatus { get; set; }
|
||||
public string PaymentMethodName { get; set; } = string.Empty;
|
||||
public string ShippingMethodName { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
19
Webshop.Application/DTOs/PaymentMethodDto.cs
Normal file
19
Webshop.Application/DTOs/PaymentMethodDto.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
|
||||
namespace Webshop.Application.DTOs
|
||||
{
|
||||
public class PaymentMethodDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string? Description { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public PaymentGatewayType GatewayType { get; set; }
|
||||
public decimal? ProcessingFee { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,21 @@
|
||||
namespace Webshop.Application.DTOs
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace Webshop.Application.DTOs
|
||||
{
|
||||
public class ProductDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public string SKU { get; set; } = string.Empty; // STELLEN SIE SICHER, DASS DIES DA IST
|
||||
public string SKU { get; set; } = string.Empty;
|
||||
public decimal Price { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public bool IsInStock { get; set; }
|
||||
public int StockQuantity { get; set; }
|
||||
public string? ImageUrl { get; set; } // STELLEN SIE SICHER, DASS DIES DA IST
|
||||
public string? ImageUrl { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
21
Webshop.Application/DTOs/ProductVariantDto.cs
Normal file
21
Webshop.Application/DTOs/ProductVariantDto.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace Webshop.Application.DTOs
|
||||
{
|
||||
public class ProductVariantDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid ProductId { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Value { get; set; } = string.Empty;
|
||||
public string? SKU { get; set; }
|
||||
public decimal PriceAdjustment { get; set; }
|
||||
public int StockQuantity { get; set; }
|
||||
public string? ImageUrl { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
}
|
||||
20
Webshop.Application/DTOs/ReviewDto.cs
Normal file
20
Webshop.Application/DTOs/ReviewDto.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace Webshop.Application.DTOs
|
||||
{
|
||||
public class ReviewDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid ProductId { get; set; }
|
||||
public Guid? CustomerId { get; set; }
|
||||
public int Rating { get; set; }
|
||||
public string? Title { get; set; }
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
public DateTimeOffset ReviewDate { get; set; }
|
||||
public bool IsApproved { get; set; }
|
||||
}
|
||||
}
|
||||
16
Webshop.Application/DTOs/SettingDto.cs
Normal file
16
Webshop.Application/DTOs/SettingDto.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace Webshop.Application.DTOs
|
||||
{
|
||||
public class SettingDto
|
||||
{
|
||||
public string Key { get; set; } = string.Empty;
|
||||
public string Value { get; set; } = string.Empty;
|
||||
public string? Description { get; set; }
|
||||
public DateTimeOffset LastModifiedDate { get; set; }
|
||||
}
|
||||
}
|
||||
19
Webshop.Application/DTOs/ShippingMethodDto.cs
Normal file
19
Webshop.Application/DTOs/ShippingMethodDto.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace Webshop.Application.DTOs
|
||||
{
|
||||
public class ShippingMethodDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string? Description { get; set; }
|
||||
public decimal Cost { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public int MinDeliveryDays { get; set; }
|
||||
public int MaxDeliveryDays { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,19 @@
|
||||
// src/Webshop.Application/DTOs/SupplierDto.cs
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace Webshop.Application.DTOs
|
||||
{
|
||||
public class SupplierDto
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.NewGuid(); // Für PUT/GET, bei POST optional
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string? ContactPerson { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? PhoneNumber { get; set; }
|
||||
public Guid? AddressId { get; set; } // Wenn Sie Adressen haben, sonst null
|
||||
public Guid? AddressId { get; set; }
|
||||
public string? Notes { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
namespace Webshop.Application.DTOs.Users
|
||||
// Auto-generiert von CreateWebshopFiles.ps1
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace Webshop.Application.DTOs.Users
|
||||
{
|
||||
public class UserDto
|
||||
{
|
||||
@@ -6,7 +12,7 @@
|
||||
public string Email { get; set; } = string.Empty;
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
public List<string> Roles { get; set; } = new List<string>();
|
||||
public DateTimeOffset CreatedDate { get; set; } // Placeholder, as IdentityUser doesn't have it directly
|
||||
public DateTimeOffset CreatedDate { get; set; }
|
||||
public bool EmailConfirmed { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user