Spaces:
Sleeping
Sleeping
Yuyuqt
feat: add user management, book management, categories management, membership management, and borrowing management
87c9973 Download LibraryManagement.Backend/Features/Subscriptions/SubscriptionModels.cs from Yuruyuruu/LibraryManagement: direct link, hf CLI and curl.
- Browser
- Download file 979 Bytes
-
https://huggingface.co/spaces/Yuruyuruu/LibraryManagement/resolve/93d516ebdfdf29b5f35ac2ae1405fa1876462cdc/LibraryManagement.Backend/Features/Subscriptions/SubscriptionModels.cs
- Command line
-
hf download hf://spaces/Yuruyuruu/LibraryManagement@93d516ebdfdf29b5f35ac2ae1405fa1876462cdc/LibraryManagement.Backend/Features/Subscriptions/SubscriptionModels.cs
-
curl -L -o SubscriptionModels.cs https://huggingface.co/spaces/Yuruyuruu/LibraryManagement/resolve/93d516ebdfdf29b5f35ac2ae1405fa1876462cdc/LibraryManagement.Backend/Features/Subscriptions/SubscriptionModels.cs
979 Bytes
| using System; | |
| namespace LibraryManagement.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 class SubscriptionDto | |
| { | |
| public int Id { get; set; } | |
| public int UserId { get; set; } | |
| public int MembershipId { get; set; } | |
| public string MembershipType { 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; } | |
| } | |
| } | |