f97f891d67
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>
22 lines
824 B
C#
22 lines
824 B
C#
namespace AsadiTools.Models;
|
|
|
|
public class Product
|
|
{
|
|
public int Id { get; set; }
|
|
public string NameFa { get; set; } = string.Empty;
|
|
public string? NameEn { get; set; }
|
|
public string? Description { get; set; }
|
|
public decimal Price { get; set; }
|
|
public decimal? DiscountPrice { get; set; }
|
|
public string Category { get; set; } = string.Empty;
|
|
public string? Brand { get; set; }
|
|
public string? Sku { get; set; }
|
|
public int Stock { get; set; }
|
|
public bool IsActive { get; set; } = true;
|
|
public string? ImageUrl { get; set; }
|
|
public DateTime CreatedAt { get; set; } = DateTime.Now;
|
|
|
|
public decimal FinalPrice => DiscountPrice.HasValue && DiscountPrice < Price ? DiscountPrice.Value : Price;
|
|
public bool HasDiscount => DiscountPrice.HasValue && DiscountPrice < Price;
|
|
}
|