first commit
This commit is contained in:
@@ -0,0 +1,103 @@
|
||||
using Fitness_core_BE.Models;
|
||||
|
||||
namespace Fitness_core_BE.Interfaces
|
||||
{
|
||||
public interface IAccessDeviceRepo
|
||||
{
|
||||
Task<object> AddDeviceAsync(AccessDevice device);
|
||||
Task<AccessDevice> RemoveDeviceAsync(Guid clientId);
|
||||
Task<AccessDevice> GetDeviceByDId(Guid deviceId);
|
||||
Task<AccessDevice?> GetDeviceByIdAsync(Guid deviceId, CancellationToken ct = default);
|
||||
Task<AccessDevice?> GetDeviceByHardwareIdAsync(
|
||||
Guid clientId,
|
||||
string hardwareId,
|
||||
CancellationToken ct = default);
|
||||
Task<AccessDevice?> GetActiveDeviceForClientAsync(
|
||||
Guid clientId,
|
||||
Guid deviceId,
|
||||
CancellationToken ct = default);
|
||||
Task<List<AccessDevice>> GetAgentDevicesAsync(
|
||||
Guid clientId,
|
||||
Guid agentId,
|
||||
IReadOnlyCollection<Guid> deviceIds,
|
||||
CancellationToken ct = default);
|
||||
Task<AccessDevice> GetDeviceByCId(Guid clientId);
|
||||
Task<CustomerAccess> AddCustomerAccessAsync(CustomerAccess customerAccess);
|
||||
Task<CustomerAccess> GetByIdAsync(int deviceUserId);
|
||||
Task<CustomerAccess?> GetByDeviceAndUserIdAsync(Guid deviceId, int deviceUserId);
|
||||
Task<CustomerAccess> GetByCusGuidAsync(Guid CusId);
|
||||
Task<CustomerAccess> UpdateAsync(CustomerAccess customerAccess);
|
||||
Task<List<AccessDevice>> GetDevicesByClientAsync(Guid clientId);
|
||||
Task<bool> DeviceBelongsToClientAsync(Guid deviceId, Guid clientId);
|
||||
Task<Customer?> GetCustomerByIdAsync(Guid customerId, CancellationToken ct = default);
|
||||
Task<Staff?> GetStaffByIdAsync(Guid clientId, Guid staffId, CancellationToken ct = default);
|
||||
/// <summary>
|
||||
/// The other active customers sharing this customer's active group/couple
|
||||
/// subscriptions at this gym (excludes the customer themselves). Empty for an
|
||||
/// Individual plan, so callers can cascade unconditionally.
|
||||
/// </summary>
|
||||
Task<List<Guid>> GetCoMembersOnSharedSubscriptionsAsync(
|
||||
Guid clientId,
|
||||
Guid customerId,
|
||||
CancellationToken ct = default);
|
||||
Task<bool> IsActiveCustomerMemberAsync(
|
||||
Guid clientId,
|
||||
Guid customerId,
|
||||
CancellationToken ct = default);
|
||||
Task<Guid?> GetLatestActiveClientIdForCustomerAsync(
|
||||
Guid customerId,
|
||||
CancellationToken ct = default);
|
||||
Task<AccessProfile?> GetAccessProfileAsync(
|
||||
Guid clientId,
|
||||
Guid userId,
|
||||
CancellationToken ct = default);
|
||||
Task<AccessProfile?> GetAccessStatusProfileAsync(
|
||||
Guid clientId,
|
||||
Guid userId,
|
||||
CancellationToken ct = default);
|
||||
Task<List<AccessProfile>> GetAccessProfilesByClientAsync(
|
||||
Guid clientId,
|
||||
CancellationToken ct = default);
|
||||
Task AddAccessProfileAsync(AccessProfile profile, CancellationToken ct = default);
|
||||
Task<AccessDeviceBinding?> GetBindingAsync(
|
||||
long accessProfileId,
|
||||
Guid deviceId,
|
||||
CancellationToken ct = default);
|
||||
Task<AccessDeviceBinding?> GetBindingByEmployeeNoAsync(
|
||||
Guid deviceId,
|
||||
string employeeNo,
|
||||
CancellationToken ct = default);
|
||||
Task<List<AccessDeviceBinding>> GetBindingsForDeviceAsync(
|
||||
Guid deviceId,
|
||||
CancellationToken ct = default);
|
||||
Task AddBindingAsync(AccessDeviceBinding binding, CancellationToken ct = default);
|
||||
Task<bool> IsDeviceEmployeeNoOccupiedAsync(
|
||||
Guid deviceId,
|
||||
string employeeNo,
|
||||
Guid exceptUserId,
|
||||
CancellationToken ct = default);
|
||||
Task<List<UnlinkedDeviceEnrollment>> GetDuplicateUnlinkedEnrollmentsAsync(
|
||||
Guid deviceId,
|
||||
string employeeNo,
|
||||
int deviceUserId,
|
||||
CancellationToken ct = default);
|
||||
Task<UnlinkedDeviceEnrollment?> GetUnlinkedEnrollmentByEmployeeNoAsync(
|
||||
Guid deviceId,
|
||||
string employeeNo,
|
||||
CancellationToken ct = default);
|
||||
Task AddUnlinkedEnrollmentAsync(
|
||||
UnlinkedDeviceEnrollment enrollment,
|
||||
CancellationToken ct = default);
|
||||
Task<Guid?> GetCustomerIdForUserAtClientAsync(
|
||||
Guid userId,
|
||||
Guid clientId,
|
||||
CancellationToken ct = default);
|
||||
Task<bool> IsDeviceCommandableAsync(Guid deviceId, CancellationToken ct = default);
|
||||
|
||||
// Fingerprint-enrolled-directly-on-device reconciliation (req 3).
|
||||
Task UpsertUnlinkedEnrollmentAsync(Guid deviceId, int deviceUserId, string? reportedName);
|
||||
Task<List<UnlinkedDeviceEnrollment>> GetUnlinkedEnrollmentsByClientAsync(Guid clientId);
|
||||
Task<UnlinkedDeviceEnrollment?> GetUnlinkedEnrollmentByIdAsync(Guid id);
|
||||
Task<bool> CustomerAccessIdExistsAsync(int id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user