polyphony_types/entities/
security_key.rs1use serde::{Deserialize, Serialize};
2
3use crate::utils::Snowflake;
4
5#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
6pub struct SecurityKey {
7 pub id: String,
8 pub user_id: String,
9 pub key_id: String,
10 pub public_key: String,
11 pub counter: u64,
12 pub name: String,
13}
14
15impl Default for SecurityKey {
16 fn default() -> Self {
17 Self {
18 id: Snowflake::generate().to_string(),
19 user_id: String::new(),
20 key_id: String::new(),
21 public_key: String::new(),
22 counter: 0,
23 name: String::new(),
24 }
25 }
26}