42 lines
1.0 KiB
C#
42 lines
1.0 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace CampusErrand.Models;
|
|
|
|
/// <summary>
|
|
/// 改价记录表
|
|
/// </summary>
|
|
public class PriceChange
|
|
{
|
|
[Key]
|
|
public int Id { get; set; }
|
|
|
|
/// <summary>订单 ID</summary>
|
|
public int OrderId { get; set; }
|
|
|
|
/// <summary>发起人 ID</summary>
|
|
public int InitiatorId { get; set; }
|
|
|
|
/// <summary>改价类型</summary>
|
|
public PriceChangeType ChangeType { get; set; }
|
|
|
|
/// <summary>原价</summary>
|
|
[Column(TypeName = "decimal(10,2)")]
|
|
public decimal OriginalPrice { get; set; }
|
|
|
|
/// <summary>新价</summary>
|
|
[Column(TypeName = "decimal(10,2)")]
|
|
public decimal NewPrice { get; set; }
|
|
|
|
/// <summary>状态</summary>
|
|
public PriceChangeStatus Status { get; set; } = PriceChangeStatus.Pending;
|
|
|
|
/// <summary>发起时间</summary>
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
|
|
// 导航属性
|
|
public Order? Order { get; set; }
|
|
|
|
public User? Initiator { get; set; }
|
|
}
|