diff --git a/src/inventory/domain/mod.rs b/src/inventory/domain/mod.rs index 89649c4..cb92726 100644 --- a/src/inventory/domain/mod.rs +++ b/src/inventory/domain/mod.rs @@ -5,7 +5,7 @@ // aggregates pub mod category_aggregate; pub mod product_aggregate; -//pub mod stock_aggregate; +pub mod stock_aggregate; pub mod store_aggregate; // commands diff --git a/src/inventory/domain/stock_aggregate.rs b/src/inventory/domain/stock_aggregate.rs new file mode 100644 index 0000000..cda309f --- /dev/null +++ b/src/inventory/domain/stock_aggregate.rs @@ -0,0 +1,24 @@ +// SPDX-FileCopyrightText: 2024 Aravinth Manivannan +// +// SPDX-License-Identifier: AGPL-3.0-or-later + +use derive_builder::Builder; +use derive_getters::Getters; +use serde::{Deserialize, Serialize}; +use time::OffsetDateTime; +use uuid::Uuid; + +use super::product_aggregate::Quantity; + +// stock keeping unit +// TODO: will implement later, have to figure out how to print SKU label and during billing. +#[derive( + Clone, Debug, Serialize, Deserialize, Eq, PartialEq, Ord, PartialOrd, Builder, Getters, +)] +pub struct SKU { + id: String, + product_id: Uuid, + expiry: Option, + sold: bool, + quantity: Quantity, +}