pub struct SqliteRevenueRecognitionRepository { /* private fields */ }Available on crate feature
sqlite only.Implementations§
Source§impl SqliteRevenueRecognitionRepository
impl SqliteRevenueRecognitionRepository
pub const fn new(pool: Pool<SqliteConnectionManager>) -> Self
Trait Implementations§
Source§impl RevenueRecognitionRepository for SqliteRevenueRecognitionRepository
impl RevenueRecognitionRepository for SqliteRevenueRecognitionRepository
Source§fn create_contract(
&self,
input: CreateRevenueContract,
) -> Result<RevenueContract>
fn create_contract( &self, input: CreateRevenueContract, ) -> Result<RevenueContract>
Create a new revenue contract with its performance obligations.
Source§fn get_contract(&self, id: Uuid) -> Result<Option<RevenueContract>>
fn get_contract(&self, id: Uuid) -> Result<Option<RevenueContract>>
Get a revenue contract by ID (with obligations).
Source§fn list_contracts(
&self,
filter: RevenueContractFilter,
) -> Result<Vec<RevenueContract>>
fn list_contracts( &self, filter: RevenueContractFilter, ) -> Result<Vec<RevenueContract>>
List revenue contracts with filter.
Source§fn update_contract(
&self,
id: Uuid,
input: UpdateRevenueContract,
) -> Result<RevenueContract>
fn update_contract( &self, id: Uuid, input: UpdateRevenueContract, ) -> Result<RevenueContract>
Update a revenue contract (partial); status changes are transition-guarded.
Source§fn list_obligations(
&self,
contract_id: Uuid,
) -> Result<Vec<PerformanceObligation>>
fn list_obligations( &self, contract_id: Uuid, ) -> Result<Vec<PerformanceObligation>>
List the performance obligations under a contract.
Source§fn generate_schedule(&self, obligation_id: Uuid) -> Result<RevenueSchedule>
fn generate_schedule(&self, obligation_id: Uuid) -> Result<RevenueSchedule>
Generate and persist the recognition schedule for an obligation,
replacing any previously deferred (unrecognized) entries.
Source§fn get_schedule(&self, obligation_id: Uuid) -> Result<Option<RevenueSchedule>>
fn get_schedule(&self, obligation_id: Uuid) -> Result<Option<RevenueSchedule>>
Get the persisted recognition schedule for an obligation, if generated.
Source§fn recognize_period(
&self,
obligation_id: Uuid,
through: NaiveDate,
) -> Result<RevenueSchedule>
fn recognize_period( &self, obligation_id: Uuid, through: NaiveDate, ) -> Result<RevenueSchedule>
Recognize all deferred entries with a period start on or before
through, advancing the obligation’s recognized amount (and the
contract status when fully recognized).Auto Trait Implementations§
impl !RefUnwindSafe for SqliteRevenueRecognitionRepository
impl !UnwindSafe for SqliteRevenueRecognitionRepository
impl Freeze for SqliteRevenueRecognitionRepository
impl Send for SqliteRevenueRecognitionRepository
impl Sync for SqliteRevenueRecognitionRepository
impl Unpin for SqliteRevenueRecognitionRepository
impl UnsafeUnpin for SqliteRevenueRecognitionRepository
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