obscura-server 0.9.0

A server for relaying secure messages using the Signal Protocol
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use time::OffsetDateTime;
use uuid::Uuid;

#[derive(Debug, sqlx::FromRow)]
pub struct DeviceRecord {
    pub(crate) id: Uuid,
    pub(crate) user_id: Uuid,
    pub(crate) name: Option<String>,
    pub(crate) created_at: Option<OffsetDateTime>,
}

impl From<DeviceRecord> for crate::domain::device::Device {
    fn from(record: DeviceRecord) -> Self {
        Self { id: record.id, user_id: record.user_id, name: record.name, created_at: record.created_at }
    }
}