use serde::Deserialize;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum QrCodeAction {
Temporary,
Permanent,
TemporaryStr,
PermanentStr,
}
impl QrCodeAction {
pub fn as_str(&self) -> &'static str {
match self {
Self::Temporary => "QR_SCENE",
Self::Permanent => "QR_LIMIT_SCENE",
Self::TemporaryStr => "QR_STR_SCENE",
Self::PermanentStr => "QR_LIMIT_STR_SCENE",
}
}
}
#[derive(Debug, Clone, Deserialize)]
pub struct QrCodeResponse {
pub ticket: String,
pub expire_seconds: Option<i64>,
pub url: String,
}
#[derive(Debug, Clone, Deserialize)]
pub struct ShortUrlResponse {
pub short_url: String,
}