first commit

This commit is contained in:
Dhananjaya99
2026-09-28 11:44:26 +05:30
parent 721743ae6b
commit bffc9b1686
424 changed files with 46474 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
namespace Fitness_core_BE.Models.IOs
{
public record AdminExerciseInput(string Name, string? BreathIn, string? BreathOut, string? Position, string? Reps, int? Sets, string? Duration, string? VideoUrl, string? Description);
public record AdminWorkoutDayInput(string Day, string? Description, string? SuitableFor, string? Duration, string? WarmUp, string? Cooldown, List<AdminExerciseInput> Exercises);
public record AdminWorkoutSuggestionRequest(string Name, string Category, string? CategoryDescription, string? Description, List<AdminWorkoutDayInput> Days);
public record AdminFoodInput(string Name, string? Quantity);
public record AdminMealInput(string Name, string? Description, decimal? Calories, decimal? Protein, decimal? Carbohydrates, decimal? Fats, string? ServingSize, string? PreparationNotes, List<AdminFoodInput> Foods);
public record AdminMealSuggestionRequest(string Name, string Category, string? CategoryDescription, string? Description, List<AdminMealInput> Meals);
}
+15
View File
@@ -0,0 +1,15 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Fitness_core_BE.Models.IOs
{
[NotMapped]
public class ApiRequest
{
public string FunctionName { get; set; }
public object Payload { get; set; }
public string Reference { get; set; }
}
}
+15
View File
@@ -0,0 +1,15 @@
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace Fitness_core_BE.Models.IOs
{
[NotMapped]
public class ApiResponse<T>
{
public int StatusCode { get; set; }
[Required]
public string Message { get; set; }
[Required]
public T Data { get; set; }
}
}
+80
View File
@@ -0,0 +1,80 @@
namespace Fitness_core_BE.Models.IOs
{
public record PagedResult<T>(List<T> Items, int Total, int Page, int PageSize); //commonly tabel use
// Shared OTP-send response shape -- used by the client's own contact-detail-change OTP flow
// (ClientService.SendContactOtp via AuthOtpResponseParser), not onboarding-specific despite
// originally living in that file.
public record SendOtpResult(string ReferenceNumber, int ExpiresInSeconds, int ResendAllowedInSeconds);
// ---------- Admin: client directory ----------
public record ClientSummary(Guid ClientId, string? ClientName, string? City, string? PaymentTrack, bool IsActive, DateTime CreatedAt);
public record ClientDirectoryQuery(string? Search, int Page = 1, int PageSize = 20);
// ---------- Admin: access-device pairing & status ----------
public record PairingCodeResult(string Code, DateTime ExpiresAt);
// IsOnline is inferred from the client's on-prem bridge agent's last heartbeat — the cloud
// never talks to a device directly. AccessDevice isn't tied to a specific agent, so every
// device under a client shares the same IsOnline signal (see AdminClientDirectoryService).
public record AdminAgentDto(Guid AgentId, string Name, bool IsActive, DateTime? LastSeenAt, bool IsOnline, DateTime CreatedAt);
public record AdminDeviceDto(
Guid DeviceId,
string DeviceName,
bool IsActive,
DateTime? LastSeenAt,
bool IsOnline,
DateTime? PresenceExpiresAt,
bool IsClaimed,
DateTime CreatedAt);
public record AdminClientDevicesResult(List<AdminAgentDto> Agents, List<AdminDeviceDto> Devices);
// ---------- Client's own customers / staff ----------
public record CreateCustomerWithPlansRequest(
string Fullname, string UserName, string Email, string MobileNumber, string? Nic, string Gender, string? Birthday,
List<Guid>? WorkoutPlanIds, List<Guid>? MealPlanIds, Guid? CustomerPlanId,
DateTime? OnboardDate, bool ChargePayment = true,
// Set true only on the resubmit after staff has confirmed "yes, link this existing
// platform customer to my gym" -- see ClientService.CreateCustomerWithPlans.
bool ConfirmLink = false,
string? DiscountType = null, decimal? DiscountValue = null);
// MobileNumber (not PhoneNumber) -- must match the frontend's MemberInput.mobileNumber
// JSON key, same convention CreateCustomerWithPlansRequest above already uses. A prior
// mismatch here (PhoneNumber) silently bound to null on every edit, since ASP.NET Core's
// JSON binder does not fuzzy-match differently-named keys -- every customer phone edit was
// wiping the number instead of changing it.
public record UpdateCustomerByClientRequest(
string Fullname, string UserName, string Email, string? Nic, string? Gender, string? Birthday,
string? MobileNumber);
// "Parent" path: starts a brand new subscription for a customer who was created without
// a plan, with them as the primary member.
public record AssignCustomerPlanRequest(
Guid CustomerPlanId, DateTime? ExpiryDate, DateTime? OnboardDate, bool ChargePayment = true,
string? DiscountType = null, decimal? DiscountValue = null);
// Switches an existing Individual-scope subscription to a different Individual-scope plan.
public record ChangeMembershipPlanRequest(Guid CustomerPlanId);
// ---------- Client's own gym profile (post-activation) ----------
public record EquipmentCountDto(string Name, int Count);
public record UpdateGymProfileRequest(
string? BusinessName, string? Address, string? City, string? Description,
bool? HasAc, List<EquipmentCountDto>? Equipment);
// ---------- Gym-specific Terms & Conditions authoring ----------
public record PublishGymTermsRequest(string Content);
// ---------- Client's own contact detail change (OTP-verified) ----------
public record SendContactOtpRequest(string Type, string Identifier);
public record VerifyContactOtpRequest(string Type, string Identifier, string ReferenceNumber, string OtpCode);
// ---------- Member medical details unlock ----------
public record MedicalUnlockRequest(string Password);
// GymRoleId optional -- must belong to the caller's own client (validated in StaffService).
// Left null, the new staff member has no dashboard access until a role is assigned later.
public record CreateStaffRequest(string UserName, string Email, string PhoneNumber, string? StaffPosition, string? Department, DateTime? HireDate, Guid? GymRoleId = null);
public record UpdateStaffRequest(string? UserName, string? Email, string? PhoneNumber, string? StaffPosition, string? Department);
}
+17
View File
@@ -0,0 +1,17 @@
namespace Fitness_core_BE.Models.IOs
{
public class SmsRequest
{
public string api_key { get; set; } = string.Empty;
public string phone_number { get; set; } = string.Empty;
public string msg_text { get; set; } = string.Empty;
}
public class OtpResponse
{
public int StatusCode { get; set; }
public string Message { get; set; } = string.Empty;
public string? ApiResponse { get; set; }
public string? Error { get; set; }
}
}