feat: place holder stock aggregate
This commit is contained in:
parent
ffa44dc399
commit
0ddeec2374
2 changed files with 25 additions and 1 deletions
|
@ -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
|
||||
|
|
24
src/inventory/domain/stock_aggregate.rs
Normal file
24
src/inventory/domain/stock_aggregate.rs
Normal file
|
@ -0,0 +1,24 @@
|
|||
// SPDX-FileCopyrightText: 2024 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
//
|
||||
// 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<OffsetDateTime>,
|
||||
sold: bool,
|
||||
quantity: Quantity,
|
||||
}
|
Loading…
Reference in a new issue