pub struct NewBankAccountRow<'a> {
pub id: Uuid,
pub branch_id: Option<Uuid>,
pub bank_id: Uuid,
pub account_name: &'a str,
pub account_number: &'a str,
pub gl_account_id: Uuid,
pub clearing_account_id: Uuid,
pub currency: &'a str,
pub account_type: &'a str,
}Expand description
The exact row a bank-account registration writes.
Mirrors the raw column shape rather than the BankAccount entity: account_type binds as &str
and is cast at the DB ($10::bank_account_type), so a bad value fails as a DB error rather than a
deserialize panic. is_default/status are not fields — the INSERT hard-codes false/'active'.
currency/account_type are already defaulted by the caller, so they are not optional here.
Fields§
§id: Uuid§branch_id: Option<Uuid>§bank_id: Uuid§account_name: &'a str§account_number: &'a str§gl_account_id: UuidThe GL account the bank balance itself lives in.
clearing_account_id: UuidThe account a settlement debits/credits until the statement confirms it — the account bank clearing nets to zero.
currency: &'a str§account_type: &'a strAuto Trait Implementations§
impl<'a> Freeze for NewBankAccountRow<'a>
impl<'a> RefUnwindSafe for NewBankAccountRow<'a>
impl<'a> Send for NewBankAccountRow<'a>
impl<'a> Sync for NewBankAccountRow<'a>
impl<'a> Unpin for NewBankAccountRow<'a>
impl<'a> UnsafeUnpin for NewBankAccountRow<'a>
impl<'a> UnwindSafe for NewBankAccountRow<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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