WIP
This commit is contained in:
17 files changed
+672
-48
No files matched your search
+19
-6
@@ -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,
|
||||
}
|
||||
Reference in new issue
Block a user