pub struct ProjectMilestone {
pub id: String,
pub project_id: String,
pub wbs_id: Option<String>,
pub name: String,
pub planned_date: NaiveDate,
pub actual_date: Option<NaiveDate>,
pub status: MilestoneStatus,
pub payment_amount: Decimal,
pub weight: Decimal,
pub sequence: u32,
}Expand description
A project milestone.
Fields§
§id: StringUnique milestone ID
project_id: StringProject ID
wbs_id: Option<String>WBS element ID (optional)
name: StringMilestone name
planned_date: NaiveDatePlanned completion date
actual_date: Option<NaiveDate>Actual completion date (if completed)
status: MilestoneStatusCurrent status
payment_amount: DecimalPayment amount tied to milestone (if any)
weight: DecimalCompletion weight for EVM (0.0 to 1.0)
sequence: u32Sequence order
Implementations§
Source§impl ProjectMilestone
impl ProjectMilestone
Sourcepub fn new(
id: impl Into<String>,
project_id: impl Into<String>,
name: impl Into<String>,
planned_date: NaiveDate,
sequence: u32,
) -> Self
pub fn new( id: impl Into<String>, project_id: impl Into<String>, name: impl Into<String>, planned_date: NaiveDate, sequence: u32, ) -> Self
Creates a new milestone.
Sourcepub fn with_payment(self, amount: Decimal) -> Self
pub fn with_payment(self, amount: Decimal) -> Self
Sets the payment amount tied to this milestone.
Sourcepub fn with_weight(self, weight: Decimal) -> Self
pub fn with_weight(self, weight: Decimal) -> Self
Sets the EVM weight.
Sourcepub fn is_overdue_on(&self, date: NaiveDate) -> bool
pub fn is_overdue_on(&self, date: NaiveDate) -> bool
Returns true if the milestone is overdue on the given date.
Sourcepub fn days_variance(&self) -> Option<i64>
pub fn days_variance(&self) -> Option<i64>
Returns the number of days late (negative if early or not yet complete).
Trait Implementations§
Source§impl Clone for ProjectMilestone
impl Clone for ProjectMilestone
Source§fn clone(&self) -> ProjectMilestone
fn clone(&self) -> ProjectMilestone
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProjectMilestone
impl Debug for ProjectMilestone
Source§impl<'de> Deserialize<'de> for ProjectMilestone
impl<'de> Deserialize<'de> for ProjectMilestone
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ProjectMilestone
impl Serialize for ProjectMilestone
Source§impl ToNodeProperties for ProjectMilestone
impl ToNodeProperties for ProjectMilestone
Source§fn node_type_name(&self) -> &'static str
fn node_type_name(&self) -> &'static str
Entity type name (snake_case), e.g.
"uncertain_tax_position".Source§fn node_type_code(&self) -> u16
fn node_type_code(&self) -> u16
Numeric entity type code for registry, e.g.
416.Source§fn to_node_properties(&self) -> HashMap<String, GraphPropertyValue>
fn to_node_properties(&self) -> HashMap<String, GraphPropertyValue>
Convert all fields to a property map with camelCase keys.
Auto Trait Implementations§
impl Freeze for ProjectMilestone
impl RefUnwindSafe for ProjectMilestone
impl Send for ProjectMilestone
impl Sync for ProjectMilestone
impl Unpin for ProjectMilestone
impl UnsafeUnpin for ProjectMilestone
impl UnwindSafe for ProjectMilestone
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more