mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-01 16:51:21 +00:00
35 lines
1.2 KiB
Rust
35 lines
1.2 KiB
Rust
#[cfg(feature = "full")]
|
|
use crate::schema::captcha_answer;
|
|
use chrono::{DateTime, Utc};
|
|
use serde::{Deserialize, Serialize};
|
|
use serde_with::skip_serializing_none;
|
|
use uuid::Uuid;
|
|
|
|
#[skip_serializing_none]
|
|
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
|
#[cfg_attr(feature = "full", derive(Queryable, Selectable))]
|
|
#[cfg_attr(feature = "full", diesel(table_name = captcha_answer))]
|
|
#[cfg_attr(feature = "full", diesel(check_for_backend(diesel::pg::Pg)))]
|
|
pub struct CaptchaAnswer {
|
|
pub uuid: Uuid,
|
|
pub answer: String,
|
|
pub published: DateTime<Utc>,
|
|
}
|
|
|
|
#[skip_serializing_none]
|
|
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
|
#[cfg_attr(feature = "full", derive(Queryable, Selectable))]
|
|
#[cfg_attr(feature = "full", diesel(table_name = captcha_answer))]
|
|
#[cfg_attr(feature = "full", diesel(check_for_backend(diesel::pg::Pg)))]
|
|
pub struct CheckCaptchaAnswer {
|
|
pub uuid: Uuid,
|
|
pub answer: String,
|
|
}
|
|
|
|
#[skip_serializing_none]
|
|
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
|
#[cfg_attr(feature = "full", derive(Insertable, AsChangeset))]
|
|
#[cfg_attr(feature = "full", diesel(table_name = captcha_answer))]
|
|
pub struct CaptchaAnswerForm {
|
|
pub answer: String,
|
|
}
|