This commit is contained in:
maurice committed 2026-11-14 17:25:55 +01:00
1 parent 377bd1e198
commit 139404b70f
17 files changed
+672 -48

No files matched your search

+19 -6
View File
@@ -1,8 +1,21 @@
/**
* Paste type
*/
#[repr(u8)]
#[derive(sqlx::FromRow)]
pub struct Paste {
pub id: String,
#[sqlx(rename = "type")]
pub paste_type: PasteType,
pub content: String,
pub language: Option<String>,
pub expiration: Option<i64>,
pub max_views: Option<i64>,
pub views: i64,
pub created_at: i64,
pub updated_at: Option<i64>,
pub owner: Option<String>,
}
#[derive(sqlx::Type)]
#[repr(i64)]
pub enum PasteType {
TextV1 = 0,
UrlV1 = 100
}
UrlV1 = 100,
}