pub struct Member {Show 14 fields
pub id: Uuid,
pub display_name: String,
pub email: String,
pub department: Option<String>,
pub days_recorded: i64,
pub worked_seconds: i64,
pub paused_seconds: i64,
pub last_day: Option<NaiveDate>,
pub day_open: bool,
pub last_seen_at: Option<DateTime<Utc>>,
pub agents: i64,
pub work_rate: Decimal,
pub norm_seconds: i64,
pub days_away: i64,
}Expand description
One person’s period, as the dashboard’s table shows it.
Fields§
§id: Uuid§display_name: String§email: String§department: Option<String>§days_recorded: i64Days worked in the range. Zero is a real answer.
Days the person was away are not counted here - they have their own figure below, and a field that mixed them would make “four days, twenty hours” describe somebody who worked two of them. The pair is what the row reads from.
worked_seconds: i64Seconds worked across the range: the span of each finished day less
what was paused in it. Open days contribute nothing - a day still
running has no total to add (the same rule /me/days follows).
paused_seconds: i64§last_day: Option<NaiveDate>The most recent date with a workday, so “no data” can be told from “nothing since the 12th”.
day_open: boolWhether a day is open right now on the employee’s own calendar.
last_seen_at: Option<DateTime<Utc>>When any of this person’s agents last delivered anything.
The honest half of “who is working now”: the server knows when it last heard from a machine, not whether someone is at it. Live status needs heartbeats, which is its own milestone.
agents: i64Live agent tokens. Zero explains a silent row without guessing.
work_rate: DecimalThis person’s share of a full day. Carried so a row that is half the team’s hours can be read as half time rather than as half-hearted.
norm_seconds: i64What the range asked of this person, in seconds: the calendar at their rate, with the days they were away taken out (ADR 0017).
Not a column of the query: the calendar is one set of rows for the whole team, so the norm is computed once per person in Rust rather than joined per row.
days_away: i64Days in the range the person was on leave or ill, so a row short of its norm can be read without opening it.
Trait Implementations§
Source§impl<'a, R: Row> FromRow<'a, R> for Memberwhere
&'a str: ColumnIndex<R>,
Uuid: Decode<'a, R::Database> + Type<R::Database>,
String: Decode<'a, R::Database> + Type<R::Database>,
Option<String>: Decode<'a, R::Database> + Type<R::Database>,
i64: Decode<'a, R::Database> + Type<R::Database>,
Option<NaiveDate>: Decode<'a, R::Database> + Type<R::Database>,
bool: Decode<'a, R::Database> + Type<R::Database>,
Option<DateTime<Utc>>: Decode<'a, R::Database> + Type<R::Database>,
Decimal: Decode<'a, R::Database> + Type<R::Database>,
impl<'a, R: Row> FromRow<'a, R> for Memberwhere
&'a str: ColumnIndex<R>,
Uuid: Decode<'a, R::Database> + Type<R::Database>,
String: Decode<'a, R::Database> + Type<R::Database>,
Option<String>: Decode<'a, R::Database> + Type<R::Database>,
i64: Decode<'a, R::Database> + Type<R::Database>,
Option<NaiveDate>: Decode<'a, R::Database> + Type<R::Database>,
bool: Decode<'a, R::Database> + Type<R::Database>,
Option<DateTime<Utc>>: Decode<'a, R::Database> + Type<R::Database>,
Decimal: Decode<'a, R::Database> + Type<R::Database>,
Auto Trait Implementations§
impl Freeze for Member
impl RefUnwindSafe for Member
impl Send for Member
impl Sync for Member
impl Unpin for Member
impl UnsafeUnpin for Member
impl UnwindSafe for Member
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more