Files
abzarasadi/Models/Order.cs
T
Soroush Asadi f97f891d67
CI/CD / CI — dotnet build (push) Successful in 44s
CI/CD / Deploy — docker compose (push) Failing after 1s
Initial commit — AsadiTools v1.0
Full ASP.NET Core 10 Razor Pages app for آساد ابزار tool repair shop
in Karaj, Iran (official DeWalt representative).

Features:
- Homepage, Services, DeWalt page, Shop (pagination + images)
- 10 brand SEO pages (/brands/*) with rich Persian content + FAQ schema
- Blog engine with admin management (/blog, /Admin/Blog)
- Cart, Checkout, Contact (OpenStreetMap embed)
- Admin panel: Products CRUD, Orders, Blog, Change Password
- Jalali date formatting, product images, SiteData centralised contact
- Docker + docker-compose with healthcheck
- Gitea CI/CD via .gitea/workflows/ci-cd.yml (NuGet through Nexus mirror)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 22:08:43 +03:30

38 lines
1.1 KiB
C#

namespace AsadiTools.Models;
public enum OrderStatus
{
Pending,
Confirmed,
Shipped,
Delivered,
Cancelled
}
public class Order
{
public int Id { get; set; }
public string OrderNumber { get; set; } = string.Empty;
public string CustomerName { get; set; } = string.Empty;
public string CustomerPhone { get; set; } = string.Empty;
public string? CustomerAddress { get; set; }
public string? Notes { get; set; }
public decimal Subtotal { get; set; }
public decimal Total { get; set; }
public OrderStatus Status { get; set; } = OrderStatus.Pending;
public DateTime CreatedAt { get; set; } = DateTime.Now;
public List<OrderItem> Items { get; set; } = [];
}
public class OrderItem
{
public int Id { get; set; }
public int OrderId { get; set; }
public Order Order { get; set; } = null!;
public int ProductId { get; set; }
public string ProductNameFa { get; set; } = string.Empty;
public decimal Price { get; set; }
public int Quantity { get; set; }
public decimal Subtotal => Price * Quantity;
}