oxigdal_security/multitenancy/
mod.rs1pub mod isolation;
4pub mod quotas;
5pub mod tenant;
6
7use serde::{Deserialize, Serialize};
8use std::collections::HashMap;
9
10#[derive(Debug, Clone, Serialize, Deserialize)]
12pub struct TenantConfig {
13 pub tenant_id: String,
15 pub name: String,
17 pub encryption_key_id: Option<String>,
19 pub quotas: HashMap<String, u64>,
21 pub metadata: HashMap<String, String>,
23}
24
25impl TenantConfig {
26 pub fn new(tenant_id: String, name: String) -> Self {
28 Self {
29 tenant_id,
30 name,
31 encryption_key_id: None,
32 quotas: HashMap::new(),
33 metadata: HashMap::new(),
34 }
35 }
36}