first commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
namespace Fitness_core_BE.DTOs.Customer
|
||||
{
|
||||
public class CreateCustomerRequest
|
||||
{
|
||||
// Customer details
|
||||
public string CusName { get; set; } = string.Empty;
|
||||
|
||||
// User details
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
public string Email { get; set; } = string.Empty;
|
||||
public string PhoneNumber { get; set; } = string.Empty;
|
||||
public bool IsActive { get; set; } = true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace Fitness_core_BE.DTOs.Customer
|
||||
{
|
||||
public class CustomerDto
|
||||
{
|
||||
public Guid CusId { get; set; }
|
||||
public string CusName { get; set; } = string.Empty;
|
||||
public Guid FKUserId { get; set; }
|
||||
public string? UserName { get; set; }
|
||||
public string? UserEmail { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
namespace Fitness_core_BE.DTOs.Customer
|
||||
{
|
||||
public record FollowedPlanDto(Guid PlanId, string? Name, bool IsFollowing, DateTime? CompletedDate);
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
using Fitness_core_BE.Models;
|
||||
|
||||
namespace Fitness_core_BE.DTOs.Customer
|
||||
{
|
||||
/// <summary>
|
||||
/// One row per gym member for GET api/client/customers. Deliberate superset of
|
||||
/// the previous CustomerSubscription row shape so the frontend change is additive:
|
||||
/// group members each get their own row pointing at the shared subscription.
|
||||
/// </summary>
|
||||
public class MemberListRowDto
|
||||
{
|
||||
public Guid SubscriptionId { get; set; }
|
||||
public Guid FKCustomerPlanId { get; set; }
|
||||
public Guid FKCustomerId { get; set; }
|
||||
public DateTime OnboardDate { get; set; }
|
||||
public DateTime? ExpiryDate { get; set; }
|
||||
public DateTime? RenewalDate { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public Models.Customer? Customer { get; set; }
|
||||
|
||||
public bool IsPrimary { get; set; }
|
||||
/// <summary>False when the member has been unassigned from their plan but is still a member of the gym.</summary>
|
||||
public bool IsPlanAssigned { get; set; } = true;
|
||||
public string? PlanName { get; set; }
|
||||
public string PlanScope { get; set; } = "Individual";
|
||||
public int MemberCount { get; set; } = 1;
|
||||
public int MemberLimit { get; set; } = 1;
|
||||
public decimal InvoiceAmount { get; set; }
|
||||
public decimal PaidAmount { get; set; }
|
||||
public decimal Balance { get; set; }
|
||||
public string PaymentStatus { get; set; } = "Pending";
|
||||
public bool AllowSplitPayments { get; set; }
|
||||
|
||||
// Linked fingerprint/device-access enrollment, if any (name may be null when the
|
||||
// device didn't report one at enrollment time).
|
||||
public int? FingerprintId { get; set; }
|
||||
public string? FingerprintName { get; set; }
|
||||
public long? AccessProfileId { get; set; }
|
||||
public string? AccessNumber { get; set; }
|
||||
public string AccessProvisionStatus { get; set; } = "NotConfigured";
|
||||
public string ActualAccessState { get; set; } = "Unknown";
|
||||
public string DesiredAccessState { get; set; } = "Enabled";
|
||||
public int FingerprintCount { get; set; }
|
||||
public string? AccessLastError { get; set; }
|
||||
|
||||
public bool IsLocked { get; set; }
|
||||
public string? LockReason { get; set; }
|
||||
|
||||
/// <summary>Face-photo enrolment on the gym's access terminals.</summary>
|
||||
public bool HasFacePhoto { get; set; }
|
||||
/// <summary>"None" | "Pending" | "Synced" | "Failed".</summary>
|
||||
public string FacePhotoStatus { get; set; } = "None";
|
||||
public string? FacePhotoError { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace Fitness_core_BE.DTOs.Customer
|
||||
{
|
||||
public class UpdateCustomerRequest
|
||||
{
|
||||
// Customer details
|
||||
public string? CusName { get; set; }
|
||||
|
||||
// User details
|
||||
public string? UserName { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? PhoneNumber { get; set; }
|
||||
public bool? IsActive { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user