Files
SIG-CM/src/SIGCM.Application/DTOs/ListingDtos.cs
2025-12-18 13:32:50 -03:00

46 lines
1.4 KiB
C#

namespace SIGCM.Application.DTOs;
public class CreateListingDto
{
public int CategoryId { get; set; }
public int OperationId { get; set; }
public required string Title { get; set; }
public string? Description { get; set; }
public decimal Price { get; set; }
public string Currency { get; set; } = "ARS";
public int? UserId { get; set; }
public Dictionary<int, string> Attributes { get; set; } = new();
public string? PrintText { get; set; }
public string? PrintFontSize { get; set; }
public string? PrintAlignment { get; set; }
public int PrintDaysCount { get; set; }
}
public class ListingDto : CreateListingDto
{
public int Id { get; set; }
public DateTime CreatedAt { get; set; }
public required string Status { get; set; }
}
public class ListingDetailDto : ListingDto
{
public IEnumerable<ListingAttributeDto> AttributeValues { get; set; } = new List<ListingAttributeDto>();
public IEnumerable<ListingImageDto> Images { get; set; } = new List<ListingImageDto>();
}
public class ListingAttributeDto
{
public int ListingId { get; set; }
public int AttributeDefinitionId { get; set; }
public required string AttributeName { get; set; }
public required string Value { get; set; }
}
public class ListingImageDto
{
public int Id { get; set; }
public required string Url { get; set; }
public bool IsMainInfo { get; set; }
public int DisplayOrder { get; set; }
}