Commit Graph

104 Commits

Author SHA1 Message Date
Mahmoud-Emad
970299b1a4 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.
2025-06-10 15:41:49 +03:00
Mahmoud-Emad
20c075ec51 feat: Add JSON serialization/deserialization to Event struct
- Added `to_json` method to serialize Event to JSON string.
- Added `from_json` method to deserialize Event from JSON string.
- This allows for easier data exchange and persistence.
2025-06-03 15:32:28 +03:00
Mahmoud-Emad
8e2354df43 feat: Enhance calendar example with Event and Calendar features
- Add EventStatus enum to represent event states (Draft, Published, Cancelled).
- Extend Event model with color, category, reminder, timezone, created_by, all_day and is_recurring fields.
- Add color and description fields to Calendar model.
- Enhance calendar example to demonstrate new features, including event status changes, and detailed calendar information.
- Improve example output for clarity and comprehensiveness.
- Add owner_id and is_public fields to Calendar model for enhanced management.
2025-05-28 13:09:05,630 - INFO - Commit message copied to clipboard.
2025-05-28 14:01:25 +03:00
Mahmoud-Emad
331915c6cb feat: Enhance calendar example with user and attendee management
- Add user creation and management to the calendar example.
- Integrate user IDs into attendees for improved data integrity.
- Improve event manipulation by adding and removing attendees by ID.
- Enhance calendar example to demonstrate event and calendar retrieval.
- Enhance the calendar example with database storage for events.
- Modify the calendar example to manage events by ID instead of title.
2025-05-28 12:52:32 +03:00
Mahmoud-Emad
d8e3d48caa feat: Improve database handling of model indices
- Ensure all model types always have a primary key index entry.
- Simplify `get_all()` implementation by relying on primary key index.
- Remove redundant code in `get_all()` for finding all object IDs.
- Improve error handling and clarity in database operations.
2025-05-27 21:15:08 +03:00
Mahmoud-Emad
972d0982b0 feat: Enhance governance proposal model with activity tracking
- Add `Activity` model to track proposal creation and voting.
- Include `ActivityType` enum for different activity types.
- Improve `Proposal` model to record voting with comments.
- Refactor `models/governance` module for better organization.
2025-05-27 20:47:34 +03:00
timurgordon
2a2d69dafb fix 2025-05-27 11:34:44 +03:00
timurgordon
0da512484f fix merge issues and rhai examples wip 2025-05-22 23:57:33 +03:00
timurgordon
93950bcab4 Merge branch 'development_add_incremental_mode_to_heromodels' 2025-05-22 18:24:11 +03:00
timurgordon
478f497316 improve model rhai scripts legibility 2025-05-22 17:55:08 +03:00
timurgordon
99f5d16f31 cleanup and remove ignored tmp db dirs 2025-05-22 17:53:44 +03:00
timurgordon
56ec505874 implement more models and rhai examples 2025-05-22 03:57:03 +03:00
Mahmoud-Emad
a71a966989 feat: Add an example about how to create a vote with comment 2025-05-21 14:50:55 +03:00
Mahmoud-Emad
bebb35e686 feat: Added optional vote comment to the proposal vote fields 2025-05-21 12:41:16 +03:00
Mahmoud-Emad
bd3c0c1932 fix: Support passing the proposal status 2025-05-21 11:26:13 +03:00
Mahmoud-Emad
8997d92e41 feat: Add created_at, updated_at fields in the db proposal model 2025-05-21 09:57:25 +03:00
Mahmoud-Emad
5327d1f00c fix: Add creator_name field to the proposal model 2025-05-21 09:37:45 +03:00
Mahmoud-Emad
4c0c7be574 feat: Add get_all method to list all db objects based on the object model 2025-05-21 09:13:58 +03:00
timurgordon
aa8ef90f9f add flow and contract models 2025-05-20 21:59:45 +03:00
Mahmoud Emad
bd36d6bda0 test: Add shell script to run all examples 2025-05-17 16:10:37 +03:00
Mahmoud Emad
e4c50ca9d7 fix: Fix all examples 2025-05-17 16:03:00 +03:00
Mahmoud Emad
57f59da43e fix: Use incremental ID 2025-05-17 13:47:17 +03:00
Mahmoud Emad
a676854251 fix: Use incremental ID 2025-05-17 13:00:05 +03:00
Mahmoud Emad
bde5db0e52 feat: Support incremental mode:
- Support incremental mode in heromodels
- Updated the example to refelct the changes
- Updated the tests to reflect the changes
2025-05-17 11:12:09 +03:00
timurgordon
bd4770b99b add rhai client macros 2025-05-16 16:10:43 +03:00
timurgordon
cdbfc80ee4 add adapter macros 2025-05-16 16:09:55 +03:00
timurgordon
b2d06e9a24 update cargo toml 2025-05-16 16:08:44 +03:00
timurgordon
c77d08033e start porting model specs into heromodels 2025-05-13 01:58:35 +03:00
timurgordon
52528ca99f added and updated models 2025-05-12 01:54:47 +03:00
f388fde388 ... 2025-05-09 13:27:35 +03:00
04ee493cd9 ... 2025-05-09 12:56:03 +03:00
99bc97b104 model spec 2025-05-09 12:42:42 +03:00
Lee Smet
d8b40b6995
simplify DB constructor
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2025-04-25 14:15:52 +02:00
Lee Smet
b8e1449ddb
Restructure crates for correct proc macro usage
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2025-04-25 13:58:17 +02:00
Lee Smet
96a1ecd974
Update macro to use #[index] attributes
- Also use proper types for index.
 - Update DB interface to be more flexible for index params

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2025-04-25 13:26:15 +02:00
Lee Smet
dc93518a35
Add proc macro to implement models
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2025-04-25 11:02:00 +02:00
Lee Smet
1343e61e0f
Expand index trait to also include key type
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2025-04-23 15:09:54 +02:00
Lee Smet
276cf3c8d8
Add alternative DB interface and implementation
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2025-04-23 13:53:10 +02:00
1708e6dd06 ... 2025-04-22 12:53:17 +04:00
cad285fd59 ... 2025-04-22 08:24:17 +04:00
d75de1e73c ... 2025-04-22 07:50:03 +04:00
6443c6b647 ... 2025-04-22 06:26:05 +04:00
f993d74ea1 ... 2025-04-22 06:11:35 +04:00
6d64b7b651 ... 2025-04-21 11:46:23 +02:00
537cf58b6f ... 2025-04-21 10:51:04 +02:00
6757a62fec ... 2025-04-21 06:26:56 +02:00
3b5f9c6012 ... 2025-04-21 05:02:57 +02:00
98af5a3b02 ... 2025-04-21 03:39:00 +02:00
d32a41d579 ... 2025-04-21 03:26:38 +02:00
10831fd260 ... 2025-04-20 10:11:23 +02:00