fix: Add creator_name field to the proposal model

This commit is contained in:
Mahmoud-Emad
2025-05-21 09:37:45 +03:00
parent 4c0c7be574
commit 5327d1f00c
3 changed files with 152 additions and 68 deletions

View File

@@ -13,12 +13,13 @@ fn main() {
// Create a new proposal with auto-generated ID
let mut proposal = Proposal::new(
None, // id (auto-generated)
"user_creator_123", // creator_id
"Community Fund Allocation for Q3", // title
None, // id (auto-generated)
"user_creator_123",
"Ahmed fared", // creator_id
"Community Fund Allocation for Q3", // title
"Proposal to allocate funds for community projects in the third quarter.", // description
Utc::now(), // vote_start_date
Utc::now() + Duration::days(14), // vote_end_date (14 days from now)
Utc::now(), // vote_start_date
Utc::now() + Duration::days(14), // vote_end_date (14 days from now)
);
println!(
@@ -125,6 +126,7 @@ fn main() {
let mut private_proposal = Proposal::new(
None, // auto-generated ID
"user_admin_001",
"Wael Ghonem",
"Internal Team Restructure Vote",
"Vote on proposed internal team changes.",
Utc::now(),