using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace Fitness_core_BE.Models { /// A gym's own Terms & Conditions, authored in the client portal. Only one row per /// (ClientId, IsActive=true) at a time — publishing a new version deactivates the old one so /// CustomerTermsAcceptance rows keep pointing at the exact version they accepted. public class ClientTerms { [Key] public Guid ClientTermsId { get; set; } public Guid FKClientId { get; set; } [ForeignKey("FKClientId")] public virtual Client? Client { get; set; } public int Version { get; set; } = 1; public string Content { get; set; } = string.Empty; public bool IsActive { get; set; } = true; public DateTime CreatedAt { get; set; } = DateTime.UtcNow; } }