Files
Core_Be/Models/Client.cs
Dhananjaya99 bffc9b1686 first commit
2026-09-28 11:44:26 +05:30

47 lines
1.7 KiB
C#

using Fitness_core_BE.Models;
using Fitness_core_BE.Models.Enums;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Collections.Generic;
namespace Fitness_core_BE.Models
{
public class Client
{
[Key]
public Guid ClientId { get; set; }
public string? ClientName { get; set; }
public Guid FKUserId { get; set; }
[ForeignKey("FKUserId")]
public virtual User User { get; set; }
public string? ClientPhone { get; set; }
public string? ClientEmail { get; set; }
public PaymentTrack? PaymentTrack { get; set; }
// Payment-Service's Platform.Id for this client, minted the first time this
// client needs to take a gateway-routed payment (see PaymentServiceClient).
public Guid? FKPaymentPlatformId { get; set; }
// Payment-Service ApiKey/HmacSecret returned alongside FKPaymentPlatformId when the
// platform was minted. Needed to sign card/payment/refund calls (RequireHmacValidation
// on Payment-Service's side) — provisioning only ever returns these once.
public string? ClientPaymentApiKey { get; set; }
public string? ClientPaymentHmacSecret { get; set; }
// Days a member can go without payment before OverdueLockJob auto-locks their
// fingerprint access. Client-configurable (see req 7); null defaults to
// DefaultLockAfterDaysOverdue; an explicit 0 disables auto-lock for this client.
public int? LockAfterDaysOverdue { get; set; }
public const int DefaultLockAfterDaysOverdue = 2;
public virtual ICollection<ClientBusiness> ClientBusinesses { get; set; } = new List<ClientBusiness>();
}
}