mi-assessment/server/MiAssessment/src/MiAssessment.Admin.Business/Entities/Order.cs
zpc 6bf2ea595c feat(admin-business): 完成后台管理系统全部业务模块
- 系统配置管理模块 (Config)
- 内容管理模块 (Banner, Promotion)
- 测评管理模块 (Type, Question, Category, Mapping, Conclusion)
- 用户管理模块 (User)
- 订单管理模块 (Order)
- 规划师管理模块 (Planner)
- 分销管理模块 (InviteCode, Commission, Withdrawal)
- 数据统计仪表盘模块 (Dashboard)
- 权限控制集成
- 服务注册配置

全部381个测试通过
2026-02-03 20:50:51 +08:00

130 lines
2.7 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;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace MiAssessment.Admin.Business.Entities;
/// <summary>
/// 订单表
/// </summary>
[Table("orders")]
public class Order
{
/// <summary>
/// 主键ID
/// </summary>
[Key]
public long Id { get; set; }
/// <summary>
/// 订单编号
/// </summary>
[Required]
[MaxLength(32)]
public string OrderNo { get; set; } = null!;
/// <summary>
/// 用户ID
/// </summary>
public long UserId { get; set; }
/// <summary>
/// 订单类型1测评订单 2学业规划订单
/// </summary>
public int OrderType { get; set; }
/// <summary>
/// 商品ID
/// </summary>
public long ProductId { get; set; }
/// <summary>
/// 商品名称
/// </summary>
[Required]
[MaxLength(100)]
public string ProductName { get; set; } = null!;
/// <summary>
/// 订单金额
/// </summary>
[Column(TypeName = "decimal(10,2)")]
public decimal Amount { get; set; }
/// <summary>
/// 实付金额
/// </summary>
[Column(TypeName = "decimal(10,2)")]
public decimal PayAmount { get; set; }
/// <summary>
/// 支付方式1微信支付 2邀请码
/// </summary>
public int? PayType { get; set; }
/// <summary>
/// 使用的邀请码ID
/// </summary>
public long? InviteCodeId { get; set; }
/// <summary>
/// 状态1待支付 2已支付 3已完成 4退款中 5已退款 6已取消
/// </summary>
public int Status { get; set; } = 1;
/// <summary>
/// 支付时间
/// </summary>
public DateTime? PayTime { get; set; }
/// <summary>
/// 微信支付交易号
/// </summary>
[MaxLength(64)]
public string? TransactionId { get; set; }
/// <summary>
/// 退款时间
/// </summary>
public DateTime? RefundTime { get; set; }
/// <summary>
/// 退款金额
/// </summary>
[Column(TypeName = "decimal(10,2)")]
public decimal? RefundAmount { get; set; }
/// <summary>
/// 退款原因
/// </summary>
[MaxLength(500)]
public string? RefundReason { get; set; }
/// <summary>
/// 备注
/// </summary>
[MaxLength(500)]
public string? Remark { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 更新时间
/// </summary>
public DateTime UpdateTime { get; set; }
/// <summary>
/// 软删除标记
/// </summary>
public bool IsDeleted { get; set; }
/// <summary>
/// 关联的用户
/// </summary>
[ForeignKey(nameof(UserId))]
public virtual User? User { get; set; }
}