32 lines
1.2 KiB
C#
32 lines
1.2 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using Fitness_core_BE.Models;
|
|
|
|
namespace Fitness_core_BE.Models
|
|
{
|
|
public class ClientCard
|
|
{
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
public int CardId { get; set; }
|
|
|
|
public int JobId { get; set; }
|
|
public Guid FK_ClientId { get; set; }
|
|
[ForeignKey("FK_ClientId")]
|
|
public virtual Client Client { get; set; }
|
|
|
|
public string? WalletId { get; set; }
|
|
public string? CardNumber { get; set; }
|
|
public string? CardType { get; set; }
|
|
public string? CardDate { get; set; }
|
|
public bool IsActive { get; set; } = false;
|
|
public bool IsPrimary { get; set; } = false;
|
|
|
|
// Payment-Service's own card identifier — the one thing we keep locally beyond
|
|
// ApiKey/HmacSecret, because ClientInvoice.FKClientCardId needs a stable local row to
|
|
// point at. Everything else about the card (masked PAN, brand, expiry, live status)
|
|
// is fetched from Payment-Service on demand, never cached here.
|
|
public string? CardToken { get; set; }
|
|
}
|
|
}
|