From ea2931990ca88ab3d46f41b2e36bdff9029ebe4b Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Wed, 18 Dec 2024 18:10:59 +0530 Subject: [PATCH] feat: define type aliases for billing ports&adapters --- src/billing/adapters/types.rs | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/billing/adapters/types.rs diff --git a/src/billing/adapters/types.rs b/src/billing/adapters/types.rs new file mode 100644 index 0000000..316a085 --- /dev/null +++ b/src/billing/adapters/types.rs @@ -0,0 +1,45 @@ +// SPDX-FileCopyrightText: 2024 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + +// SPDX-FileCopyrightText: 2024 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later +#![allow(dead_code)] + +use std::sync::Arc; + +use actix_web::web::Data; +use cqrs_es::persist::ViewRepository; +use postgres_es::PostgresCqrs; + +use crate::billing::{ + adapters::{ + input::web::RoutesRepository, + output::db::postgres::{ + bill_view::BillView, line_item_view::LineItemView, store_view::StoreView, + BillingDBPostgresAdapter, + }, + }, + application::services::BillingServicesObj, + domain::{bill_aggregate::Bill, line_item_aggregate::LineItem, store_aggregate::Store}, +}; + +pub type WebBillingRoutesRepository = Data>; + +pub type WebBillingServiceObj = Data; + +pub type BillingBillCqrsExec = Arc>; +pub type WebBillingBillCqrsExec = Data; +pub type BillingBillCqrsView = Arc>; +pub type WebBillingBillCqrsView = Data; + +pub type BillingLineItemCqrsExec = Arc>; +pub type WebBillingLineItemCqrsExec = Data; +pub type BillingLineItemCqrsView = Arc>; +pub type WebBillingLineItemCqrsView = Data; + +pub type BillingStoreCqrsExec = Arc>; +pub type WebBillingStoreCqrsExec = Data; +pub type BillingStoreCqrsView = Arc>; +pub type WebBillingStoreCqrsView = Data;