feat: define identity domain aggregate
This commit is contained in:
parent
ef2c2fec2f
commit
bd34170d6e
2 changed files with 20 additions and 0 deletions
18
src/identity/domain/aggregate.rs
Normal file
18
src/identity/domain/aggregate.rs
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
// 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};
|
||||||
|
|
||||||
|
#[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,
|
||||||
|
}
|
|
@ -1,3 +1,5 @@
|
||||||
// SPDX-FileCopyrightText: 2024 Aravinth Manivannan <realaravinth@batsense.net>
|
// SPDX-FileCopyrightText: 2024 Aravinth Manivannan <realaravinth@batsense.net>
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
|
pub mod aggregate;
|
||||||
|
|
Loading…
Reference in a new issue