From bd34170d6e219a5440dbdb8249b8f89915477eae Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Fri, 17 May 2024 23:26:40 +0530 Subject: [PATCH] feat: define identity domain aggregate --- src/identity/domain/aggregate.rs | 18 ++++++++++++++++++ src/identity/domain/mod.rs | 2 ++ 2 files changed, 20 insertions(+) create mode 100644 src/identity/domain/aggregate.rs diff --git a/src/identity/domain/aggregate.rs b/src/identity/domain/aggregate.rs new file mode 100644 index 0000000..2b07605 --- /dev/null +++ b/src/identity/domain/aggregate.rs @@ -0,0 +1,18 @@ +// 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}; + +#[derive( + Clone, Default, Debug, Serialize, Deserialize, Eq, PartialEq, Ord, PartialOrd, Getters, Builder, +)] +pub struct User { + username: String, + email: String, + hashed_password: String, + is_verified: bool, + is_admin: bool, +} diff --git a/src/identity/domain/mod.rs b/src/identity/domain/mod.rs index 56f60de..0ca608e 100644 --- a/src/identity/domain/mod.rs +++ b/src/identity/domain/mod.rs @@ -1,3 +1,5 @@ // SPDX-FileCopyrightText: 2024 Aravinth Manivannan // // SPDX-License-Identifier: AGPL-3.0-or-later + +pub mod aggregate;