namespace PowderCoating.Core.Entities; /// /// Immutable audit record of a company admin accepting the SMS terms of service. /// One record is written each time a user accepts (including re-accepts after a terms update). /// The most recent record whose matches /// AppConstants.SmsTermsVersion is the authoritative acceptance for that company. /// Never soft-deleted — this is a legal audit trail. /// public class CompanySmsAgreement : BaseEntity { /// The Identity user ID of the admin who clicked "I Agree". public string AgreedByUserId { get; set; } = string.Empty; /// Display name snapshot of the user at the time of agreement (for audit readability after user changes). public string AgreedByUserName { get; set; } = string.Empty; /// UTC timestamp of acceptance. public DateTime AgreedAt { get; set; } /// Client IP address at the time of acceptance. Stored for legal/fraud purposes. public string? IpAddress { get; set; } /// HTTP User-Agent header at the time of acceptance. public string? UserAgent { get; set; } /// /// The version of the SMS terms that was accepted (matches AppConstants.SmsTermsVersion /// at the moment of acceptance). When the platform bumps this version, existing records become /// stale and the company must re-accept. /// public string TermsVersion { get; set; } = string.Empty; }