use crate::{
actor::{ActorId, ActorType},
tenant::TenantId,
};
#[cfg(feature = "schema")]
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
#[deprecated(since = "1.1.0", note = "Use ActorType instead")]
pub type SubjectKind = ActorType;
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]
pub struct Subject {
#[serde(alias = "kind")]
pub actor_type: ActorType,
#[serde(alias = "subject_id")]
pub actor_id: ActorId,
pub tenant: TenantId,
#[serde(default)]
pub claims: serde_json::Map<String, serde_json::Value>,
}