fix: Add creator_name field to the proposal model
This commit is contained in:
@@ -102,7 +102,9 @@ impl Ballot {
|
||||
#[model] // Has base.Base in V spec
|
||||
pub struct Proposal {
|
||||
pub base_data: BaseModelData,
|
||||
pub creator_id: String, // User ID of the proposal creator
|
||||
pub creator_id: String, // User ID of the proposal creator
|
||||
pub creator_name: String, // User name of the proposal creator
|
||||
|
||||
pub title: String,
|
||||
pub description: String,
|
||||
pub status: ProposalStatus,
|
||||
@@ -129,6 +131,7 @@ impl Proposal {
|
||||
pub fn new(
|
||||
id: Option<u32>,
|
||||
creator_id: impl ToString,
|
||||
creator_name: impl ToString,
|
||||
title: impl ToString,
|
||||
description: impl ToString,
|
||||
vote_start_date: DateTime<Utc>,
|
||||
@@ -142,6 +145,7 @@ impl Proposal {
|
||||
Self {
|
||||
base_data,
|
||||
creator_id: creator_id.to_string(),
|
||||
creator_name: creator_name.to_string(),
|
||||
title: title.to_string(),
|
||||
description: description.to_string(),
|
||||
status: ProposalStatus::Draft,
|
||||
|
Reference in New Issue
Block a user