Cleanup folder structure again

This commit is contained in:
lumijiez
2025-06-21 20:53:49 +03:00
parent f959770e25
commit ec78744d19
100 changed files with 195 additions and 232 deletions

View File

@@ -0,0 +1,14 @@
namespace Imprink.Application.Dtos;
public class CategoryDto
{
public Guid Id { get; set; }
public string Name { get; set; } = null!;
public string Description { get; set; } = null!;
public string? ImageUrl { get; set; }
public int SortOrder { get; set; }
public bool IsActive { get; set; }
public Guid? ParentCategoryId { get; set; }
public DateTime? CreatedAt { get; set; }
public DateTime? ModifiedAt { get; set; }
}

View File

@@ -0,0 +1,12 @@
namespace Imprink.Application.Dtos;
public class PagedResultDto<T>
{
public IEnumerable<T> Items { get; set; } = new List<T>();
public int TotalCount { get; set; }
public int PageNumber { get; set; }
public int PageSize { get; set; }
public int TotalPages => (int)Math.Ceiling((double)TotalCount / PageSize);
public bool HasPreviousPage => PageNumber > 1;
public bool HasNextPage => PageNumber < TotalPages;
}

View File

@@ -0,0 +1,16 @@
namespace Imprink.Application.Dtos;
public class ProductDto
{
public Guid Id { get; set; }
public string Name { get; set; } = null!;
public string? Description { get; set; }
public decimal BasePrice { get; set; }
public bool IsCustomizable { get; set; }
public bool IsActive { get; set; }
public string? ImageUrl { get; set; }
public Guid? CategoryId { get; set; }
public CategoryDto? Category { get; set; }
public DateTime? CreatedAt { get; set; }
public DateTime? ModifiedAt { get; set; }
}

View File

@@ -0,0 +1,17 @@
namespace Imprink.Application.Dtos;
public class ProductVariantDto
{
public Guid Id { get; set; }
public Guid ProductId { get; set; }
public string Size { get; set; } = null!;
public string? Color { get; set; }
public decimal Price { get; set; }
public string? ImageUrl { get; set; }
public string Sku { get; set; } = null!;
public int StockQuantity { get; set; }
public bool IsActive { get; set; }
public ProductDto? Product { get; set; }
public DateTime? CreatedAt { get; set; }
public DateTime? ModifiedAt { get; set; }
}

View File

@@ -0,0 +1,7 @@
namespace Imprink.Application.Dtos;
public class RoleDto
{
public required Guid RoleId { get; set; }
public required string RoleName { get; set; }
}

View File

@@ -0,0 +1,23 @@
using Imprink.Domain.Entities;
namespace Imprink.Application.Dtos;
public class UserDto
{
public string Id { get; set; } = null!;
public required string Name { get; set; }
public required string Nickname { get; set; }
public required string Email { get; set; }
public bool EmailVerified { get; set; }
public string? FirstName { get; set; }
public string? LastName { get; set; }
public string? PhoneNumber { get; set; }
public required bool IsActive { get; set; }
public virtual ICollection<Address> Addresses { get; set; } = new List<Address>();
public virtual ICollection<UserRole> UserRoles { get; set; } = new List<UserRole>();
public virtual ICollection<Order> Orders { get; set; } = new List<Order>();
public Address? DefaultAddress => Addresses.FirstOrDefault(a => a is { IsDefault: true, IsActive: true });
public IEnumerable<Role> Roles => UserRoles.Select(ur => ur.Role);
}

View File

@@ -0,0 +1,7 @@
namespace Imprink.Application.Dtos;
public class UserRoleDto
{
public required string UserId { get; set; }
public required Guid RoleId { get; set; }
}