Files
SqlSugar/Src/Asp.NetCore2/PerformanceBenchmarks/Entities/BenchmarkOrderItem.cs
2025-11-08 10:08:14 -05:00

72 lines
1.8 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 SqlSugar;
namespace PerformanceBenchmarks.Entities
{
/// <summary>
/// Benchmark order item entity
/// 基准测试订单项实体
/// </summary>
[SugarTable("BenchmarkOrderItem")]
public class BenchmarkOrderItem
{
/// <summary>
/// Order item ID (Primary Key)
/// 订单项ID主键
/// </summary>
[SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
public int OrderItemId { get; set; }
/// <summary>
/// Order ID (Foreign Key)
/// 订单ID外键
/// </summary>
public int OrderId { get; set; }
/// <summary>
/// Product ID (Foreign Key)
/// 产品ID外键
/// </summary>
public int ProductId { get; set; }
/// <summary>
/// Quantity
/// 数量
/// </summary>
public int Quantity { get; set; }
/// <summary>
/// Unit price
/// 单价
/// </summary>
public decimal UnitPrice { get; set; }
/// <summary>
/// Discount
/// 折扣
/// </summary>
public decimal Discount { get; set; }
/// <summary>
/// Total price
/// 总价
/// </summary>
public decimal TotalPrice { get; set; }
/// <summary>
/// Navigation property to order
/// 订单导航属性
/// </summary>
[SugarColumn(IsIgnore = true)]
[Navigate(NavigateType.OneToOne, nameof(OrderId))]
public BenchmarkOrder Order { get; set; }
/// <summary>
/// Navigation property to product
/// 产品导航属性
/// </summary>
[SugarColumn(IsIgnore = true)]
[Navigate(NavigateType.OneToOne, nameof(ProductId))]
public BenchmarkProduct Product { get; set; }
}
}