reifydb_core/interface/catalog/token.rs
1// SPDX-License-Identifier: Apache-2.0
2// Copyright (c) 2025 ReifyDB
3
4use reifydb_type::value::{datetime::DateTime, identity::IdentityId};
5use serde::{Deserialize, Serialize};
6
7pub type TokenId = u64;
8
9#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
10pub struct Token {
11 pub id: TokenId,
12 pub token: String,
13 pub identity: IdentityId,
14 pub expires_at: Option<DateTime>,
15 pub created_at: DateTime,
16}