feat:Initial commit

This commit is contained in:
elar1s
2025-09-25 22:21:41 +03:00
commit 02934b1fd9
35 changed files with 1267 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
using System.ComponentModel.DataAnnotations;
namespace StoreService.Models;
/// <summary>
/// Request body to create a new order consisting of store item identifiers.
/// </summary>
public class CreateOrderRequest
{
/// <summary>Identifier of the user creating the order.</summary>
[Required]
public long UserId { get; set; }
/// <summary>Collection of store item ids to include (unique). Duplicates are ignored.</summary>
[Required]
[MinLength(1)]
public List<long> StoreItemIds { get; set; } = new();
}

View File

@@ -0,0 +1,15 @@
namespace StoreService.Models;
/// <summary>
/// Result DTO representing an order summary.
/// </summary>
public class OrderDto
{
public long Id { get; set; }
public long UserId { get; set; }
public DateTime CostUpdateDate { get; set; }
public DateTime? PaidDate { get; set; }
public bool ItemsRedeemed { get; set; }
public List<OrderItemDto> Items { get; set; } = new();
}

View File

@@ -0,0 +1,13 @@
namespace StoreService.Models;
/// <summary>
/// Order line DTO.
/// </summary>
public class OrderItemDto
{
public long Id { get; set; }
public long StoreItemId { get; set; }
public int CalculatedPrice { get; set; }
public List<long> AppliedDiscountIds { get; set; } = new();
}

View File

@@ -0,0 +1,3 @@
// Legacy aggregated models file kept intentionally empty after splitting into individual files.
// CreateOrderRequest, OrderDto, and OrderItemDto now reside in separate files.