changes
This commit is contained in:
22
Webshop.Application/DTOs/AdminProductDto.cs
Normal file
22
Webshop.Application/DTOs/AdminProductDto.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
namespace Webshop.Application.DTOs
|
||||
{
|
||||
public class AdminProductDto
|
||||
{
|
||||
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;
|
||||
public decimal Price { get; set; }
|
||||
public decimal? OldPrice { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
public bool IsInStock { get; set; } = true;
|
||||
public int StockQuantity { get; set; }
|
||||
public decimal? Weight { get; set; }
|
||||
public string? ImageUrl { get; set; }
|
||||
public string Slug { get; set; } = string.Empty;
|
||||
public DateTimeOffset CreatedDate { get; set; }
|
||||
public DateTimeOffset? LastModifiedDate { get; set; }
|
||||
public Guid? SupplierId { get; set; }
|
||||
public decimal? PurchasePrice { get; set; } // Admin-spezifisches Feld
|
||||
}
|
||||
}
|
||||
12
Webshop.Application/DTOs/Auth/AuthResponseDto.cs
Normal file
12
Webshop.Application/DTOs/Auth/AuthResponseDto.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace Webshop.Application.DTOs.Auth
|
||||
{
|
||||
public class AuthResponseDto
|
||||
{
|
||||
public bool IsAuthSuccessful { get; set; }
|
||||
public string ErrorMessage { get; set; } = string.Empty;
|
||||
public string Token { get; set; } = string.Empty;
|
||||
public string UserId { get; set; } = string.Empty;
|
||||
public string Email { get; set; } = string.Empty;
|
||||
public List<string> Roles { get; set; } = new List<string>();
|
||||
}
|
||||
}
|
||||
14
Webshop.Application/DTOs/Auth/LoginRequestDto.cs
Normal file
14
Webshop.Application/DTOs/Auth/LoginRequestDto.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Webshop.Application.DTOs.Auth
|
||||
{
|
||||
public class LoginRequestDto
|
||||
{
|
||||
[Required(ErrorMessage = "E-Mail ist erforderlich.")]
|
||||
[EmailAddress(ErrorMessage = "Ungültiges E-Mail-Format.")]
|
||||
public string Email { get; set; } = string.Empty;
|
||||
|
||||
[Required(ErrorMessage = "Passwort ist erforderlich.")]
|
||||
public string Password { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
22
Webshop.Application/DTOs/Auth/RegisterRequestDto.cs
Normal file
22
Webshop.Application/DTOs/Auth/RegisterRequestDto.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Webshop.Application.DTOs.Auth
|
||||
{
|
||||
public class RegisterRequestDto
|
||||
{
|
||||
[Required(ErrorMessage = "E-Mail ist erforderlich.")]
|
||||
[EmailAddress(ErrorMessage = "Ungültiges E-Mail-Format.")]
|
||||
public string Email { get; set; } = string.Empty;
|
||||
|
||||
[Required(ErrorMessage = "Passwort ist erforderlich.")]
|
||||
[MinLength(6, ErrorMessage = "Passwort muss mindestens 6 Zeichen lang sein.")]
|
||||
public string Password { get; set; } = string.Empty;
|
||||
|
||||
[Required(ErrorMessage = "Passwortbestätigung ist erforderlich.")]
|
||||
[Compare("Password", ErrorMessage = "Passwörter stimmen nicht überein.")]
|
||||
public string ConfirmPassword { get; set; } = string.Empty;
|
||||
|
||||
public string? FirstName { get; set; }
|
||||
public string? LastName { get; set; }
|
||||
}
|
||||
}
|
||||
12
Webshop.Application/DTOs/Users/UserDto.cs
Normal file
12
Webshop.Application/DTOs/Users/UserDto.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace Webshop.Application.DTOs.Users
|
||||
{
|
||||
public class UserDto
|
||||
{
|
||||
public string Id { get; set; } = string.Empty;
|
||||
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 bool EmailConfirmed { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user