campus-errand/server/Models/Dtos/PriceChangeDtos.cs
2026-03-01 05:01:47 +08:00

44 lines
1.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.ComponentModel.DataAnnotations;
namespace CampusErrand.Models.Dtos;
/// <summary>
/// 发起改价请求
/// </summary>
public class PriceChangeRequest
{
/// <summary>改价类型Commission 或 GoodsAmount</summary>
[Required(ErrorMessage = "改价类型不能为空")]
public string ChangeType { get; set; } = string.Empty;
/// <summary>新价格</summary>
public decimal NewPrice { get; set; }
}
/// <summary>
/// 响应改价请求
/// </summary>
public class RespondPriceChangeRequest
{
/// <summary>操作Accepted 或 Rejected</summary>
[Required(ErrorMessage = "操作不能为空")]
public string Action { get; set; } = string.Empty;
}
/// <summary>
/// 改价响应
/// </summary>
public class PriceChangeResponse
{
public int Id { get; set; }
public int OrderId { get; set; }
public int InitiatorId { get; set; }
public string ChangeType { get; set; } = string.Empty;
public decimal OriginalPrice { get; set; }
public decimal NewPrice { get; set; }
/// <summary>差额(正数=补缴,负数=退款)</summary>
public decimal Difference { get; set; }
public string Status { get; set; } = string.Empty;
public DateTime CreatedAt { get; set; }
}