pub struct EmployeeChangeEvent {
pub employee_id: String,
pub event_date: NaiveDate,
pub event_type: EmployeeEventType,
pub old_value: Option<String>,
pub new_value: Option<String>,
pub effective_date: NaiveDate,
}Expand description
A single entry in an employee’s change history.
Captures point-in-time changes to an employee record (hire, promotion,
salary adjustment, transfer, or termination). The old_value /
new_value fields carry a string representation of the changed attribute
(e.g., job level code, salary amount, department name) to keep the schema
generic and easy to consume from downstream analytics.
Fields§
§employee_id: StringEmployee this event belongs to.
event_date: NaiveDateCalendar date on which the event was recorded in the HR system.
event_type: EmployeeEventTypeType of HR event.
old_value: Option<String>Previous value of the changed attribute (None for the Hired event).
new_value: Option<String>New value of the changed attribute.
effective_date: NaiveDateDate from which the change is effective (may differ from event_date
for retroactive or future-dated transactions).
Implementations§
Trait Implementations§
Source§impl Clone for EmployeeChangeEvent
impl Clone for EmployeeChangeEvent
Source§fn clone(&self) -> EmployeeChangeEvent
fn clone(&self) -> EmployeeChangeEvent
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 EmployeeChangeEvent
impl Debug for EmployeeChangeEvent
Source§impl<'de> Deserialize<'de> for EmployeeChangeEvent
impl<'de> Deserialize<'de> for EmployeeChangeEvent
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
Auto Trait Implementations§
impl Freeze for EmployeeChangeEvent
impl RefUnwindSafe for EmployeeChangeEvent
impl Send for EmployeeChangeEvent
impl Sync for EmployeeChangeEvent
impl Unpin for EmployeeChangeEvent
impl UnsafeUnpin for EmployeeChangeEvent
impl UnwindSafe for EmployeeChangeEvent
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