CheckPoint: Avances Varios

This commit is contained in:
2025-12-18 13:32:50 -03:00
parent 8f535f3a6e
commit 32663e6324
92 changed files with 12629 additions and 195 deletions

View File

@@ -1,6 +0,0 @@
namespace SIGCM.Domain;
public class Class1
{
}

View File

@@ -0,0 +1,14 @@
namespace SIGCM.Domain.Entities;
public class CategoryPricing
{
public int Id { get; set; }
public int CategoryId { get; set; }
public decimal BasePrice { get; set; }
public int BaseWordCount { get; set; }
public decimal ExtraWordPrice { get; set; }
public string SpecialChars { get; set; } = "!";
public decimal SpecialCharPrice { get; set; }
public decimal BoldSurcharge { get; set; }
public decimal FrameSurcharge { get; set; }
}

View File

@@ -8,10 +8,19 @@ public class Listing
public required string Title { get; set; }
public string? Description { get; set; }
public decimal Price { get; set; }
public string Currency { get; set; } = "ARS"; // ARS, USD
public string Currency { get; set; } = "ARS";
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public string Status { get; set; } = "Draft"; // Draft, Published, Sold, Paused
public string Status { get; set; } = "Draft";
public int? UserId { get; set; }
// Navigation properties logic will be handled manually via repositories in Dapper
}
// Propiedades para impresión
public string? PrintText { get; set; }
public DateTime? PrintStartDate { get; set; }
public int PrintDaysCount { get; set; }
public string PrintFontSize { get; set; } = "normal";
public string PrintAlignment { get; set; } = "left";
// Propiedades auxiliares (no están en la tabla Listings, vienen de Joins/Subqueries)
public string? CategoryName { get; set; }
public string? MainImageUrl { get; set; }
}

View File

@@ -0,0 +1,13 @@
namespace SIGCM.Domain.Entities;
public class Promotion
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public int? CategoryId { get; set; }
public int MinDays { get; set; }
public string? DaysOfWeek { get; set; } // "0,6"
public decimal DiscountPercentage { get; set; }
public decimal DiscountFixedAmount { get; set; }
public bool IsActive { get; set; }
}

View File

@@ -1,3 +1,4 @@
using SIGCM.Domain.Models;
using SIGCM.Domain.Entities;
namespace SIGCM.Domain.Interfaces;
@@ -6,5 +7,8 @@ public interface IListingRepository
{
Task<int> CreateAsync(Listing listing, Dictionary<int, string> attributes);
Task<Listing?> GetByIdAsync(int id);
Task<ListingDetail?> GetDetailByIdAsync(int id);
Task<IEnumerable<Listing>> GetAllAsync();
}
Task<IEnumerable<Listing>> SearchAsync(string? query, int? categoryId);
Task<IEnumerable<Listing>> GetListingsForPrintAsync(DateTime date);
}

View File

@@ -0,0 +1,15 @@
using SIGCM.Domain.Entities;
namespace SIGCM.Domain.Models;
public class ListingDetail
{
public required Listing Listing { get; set; }
public required IEnumerable<ListingAttributeValueWithName> Attributes { get; set; }
public required IEnumerable<ListingImage> Images { get; set; }
}
public class ListingAttributeValueWithName : ListingAttributeValue
{
public required string AttributeName { get; set; }
}