feat: Add reminder functionality to ContractSigner model

- Added `last_reminder_mail_sent_at` field to track reminder
  timestamps.
- Implemented `can_send_reminder` to check if a reminder can be
  sent based on a 30-minute cooldown.
- Added `reminder_cooldown_remaining` to get remaining cooldown
  time.
- Added `mark_reminder_sent` to update reminder timestamp.
- Added example demonstrating reminder functionality in
  `legal_contract_example.rs`.
- Added tests for reminder functionality in
  `test_reminder_functionality.rs`.
- Updated Rhai scripts to include reminder-related functions and
  tests.
- Improved formatting and clarity in example code.
This commit is contained in:
Mahmoud-Emad
2025-06-10 15:41:49 +03:00
parent 20c075ec51
commit 970299b1a4
6 changed files with 828 additions and 173 deletions

View File

@@ -56,6 +56,7 @@ pub mut:
status SignerStatus
signed_at ourtime.OurTime // Optional in Rust, OurTime can be zero
comments string // Optional in Rust, string can be empty
last_reminder_mail_sent_at ourtime.OurTime // Unix timestamp of last reminder sent
}
// SignerStatus defines the status of a contract signer