StaticinitializeThe Prorm instance
Override the default table name 'consent_records'
StaticgrantRecord a new consent grant. If an active consent already exists for the same subject + purpose, a new record is created (audit trail is preserved).
StaticwithdrawWithdraw consent for a subject + purpose. Sets withdrawnAt on the most recent active consent record.
true if a consent record was found and updated, false if none existed.
StaticisCheck whether an active (non-withdrawn) consent exists.
StaticgetGet the full consent history for a subject (all purposes).
StaticgetGet active consents for a subject grouped by purpose.
StaticgetList all subjects who have active consent for a specific purpose. Useful for marketing campaign validation.
Initialize the ConsentRecord model and sync the table. Call once at application startup.