Spaces:
Sleeping
Sleeping
File size: 1,271 Bytes
068485b 25f925e 068485b da13799 068485b 7fe61c9 068485b da13799 068485b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | using System;
namespace Backend.Features.Subscriptions
{
public class MembershipDto
{
public int Id { get; set; }
public string Type { get; set; } = string.Empty;
public int MaxBooks { get; set; }
public int BorrowingDays { get; set; }
public decimal Price { get; set; }
public string Currency { get; set; } = "MMK";
public int DurationMonths { get; set; }
public string? RewardId { get; set; }
}
public class SubscriptionDto
{
public Guid Id { get; set; }
public Guid UserId { get; set; }
public int MembershipId { get; set; }
public string MembershipType { get; set; } = string.Empty;
public string UserEmail { get; set; } = string.Empty;
public string UserName { get; set; } = string.Empty;
public DateTime StartDate { get; set; }
public DateTime ExpiryDate { get; set; }
public bool IsActive { get; set; }
public bool IsExpired => DateTime.UtcNow > ExpiryDate;
}
public class SubscribeRequest
{
public int MembershipId { get; set; }
}
public class AdminSubscribeRequest
{
public Guid UserId { get; set; }
public int MembershipId { get; set; }
}
}
|