Skip to main content

keystate_core/model/entities/
role.rs

1//! The `Role` entity.
2
3use serde::{Deserialize, Serialize};
4use serde_json::Value;
5
6/// A role.
7#[derive(Debug, Clone, PartialEq, Default, Serialize, Deserialize)]
8pub struct Role {
9    /// Stable internal identifier — the sort key for deterministic output and
10    /// the identity key where the backend has no separate human-facing name.
11    #[serde(default)]
12    pub id: String,
13    /// The role's name.
14    #[serde(default)]
15    pub name: String,
16    /// Backend-faithful representation.
17    #[serde(default)]
18    pub native: Value,
19}