using TakeoutSaaS.Domain.Tenants.Enums;
using TakeoutSaaS.Shared.Abstractions.Entities;

namespace TakeoutSaaS.Domain.Tenants.Entities;

/// <summary>
/// 租户订阅变更历史记录。
/// </summary>
public sealed class TenantSubscriptionHistory : AuditableEntityBase
{
    /// <summary>
    /// 关联的租户 ID。
    /// </summary>
    public long TenantId { get; set; }

    /// <summary>
    /// 关联的订阅 ID。
    /// </summary>
    public long TenantSubscriptionId { get; set; }

    /// <summary>
    /// 变更前套餐 ID。
    /// </summary>
    public long FromPackageId { get; set; }

    /// <summary>
    /// 变更后套餐 ID。
    /// </summary>
    public long ToPackageId { get; set; }

    /// <summary>
    /// 变更类型。
    /// </summary>
    public SubscriptionChangeType ChangeType { get; set; }

    /// <summary>
    /// 生效时间。
    /// </summary>
    public DateTime EffectiveFrom { get; set; }

    /// <summary>
    /// 到期时间。
    /// </summary>
    public DateTime EffectiveTo { get; set; }

    /// <summary>
    /// 金额。
    /// </summary>
    public decimal? Amount { get; set; }

    /// <summary>
    /// 货币。
    /// </summary>
    public string? Currency { get; set; }

    /// <summary>
    /// 备注。
    /// </summary>
    public string? Notes { get; set; }
}
