ql_apimanager_backend/Apimanager_backend/Models/UserPackage.cs

34 lines
813 B
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.

namespace Apimanager_backend.Models
{
public class UserPackage
{/// <summary>
/// 主键,自增
/// </summary>
public int Id { get; set; }
/// <summary>
/// 外键用户ID
/// </summary>
public int UserId { get; set; }
/// <summary>
/// 外键套餐ID
/// </summary>
public int PackageId { get; set; }
/// <summary>
/// 剩余调用次数
/// </summary>
public int RemainingCalls { get; set; }
/// <summary>
/// 购买时间
/// </summary>
public DateTime PurchasedAt { get; set; } = DateTime.UtcNow; // timestamp
//导航属性
public User? User { get; set; }
public Apipackage? Package { get; set; }
}
}