28 lines
682 B
Rust
28 lines
682 B
Rust
use chrono::{DateTime, Utc};
|
|
use serde::{Deserialize, Serialize};
|
|
use uuid::Uuid;
|
|
|
|
#[derive(Debug, Clone, Serialize, Deserialize, sqlx::FromRow)]
|
|
pub struct StoredQuery {
|
|
pub id: Uuid,
|
|
pub identifier: String,
|
|
pub sql_template: String,
|
|
pub description: Option<String>,
|
|
pub created_at: DateTime<Utc>,
|
|
pub updated_at: DateTime<Utc>,
|
|
}
|
|
|
|
#[allow(dead_code)]
|
|
#[derive(Debug, Deserialize)]
|
|
pub struct CreateQuery {
|
|
pub identifier: String,
|
|
pub sql_template: String,
|
|
pub description: Option<String>,
|
|
}
|
|
|
|
#[allow(dead_code)]
|
|
#[derive(Debug, Deserialize)]
|
|
pub struct UpdateQuery {
|
|
pub sql_template: Option<String>,
|
|
pub description: Option<String>,
|
|
}
|