obscura-server 0.6.2

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
use crate::domain::attachment::Attachment;
use time::OffsetDateTime;
use uuid::Uuid;

#[derive(Debug, sqlx::FromRow)]
pub struct AttachmentRecord {
    pub(crate) id: Uuid,
    pub(crate) expires_at: OffsetDateTime,
}

impl From<AttachmentRecord> for Attachment {
    fn from(record: AttachmentRecord) -> Self {
        Self { id: record.id, expires_at: record.expires_at }
    }
}