2023-06-27 10:38:53 +00:00
|
|
|
#[cfg(feature = "full")]
|
|
|
|
use crate::schema::captcha_answer;
|
2023-08-24 15:27:00 +00:00
|
|
|
use chrono::{DateTime, Utc};
|
2023-06-27 10:38:53 +00:00
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
use serde_with::skip_serializing_none;
|
|
|
|
use uuid::Uuid;
|
|
|
|
|
|
|
|
#[skip_serializing_none]
|
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
2023-11-21 13:42:28 +00:00
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Selectable))]
|
2023-06-27 10:38:53 +00:00
|
|
|
#[cfg_attr(feature = "full", diesel(table_name = captcha_answer))]
|
2023-11-21 13:42:28 +00:00
|
|
|
#[cfg_attr(feature = "full", diesel(check_for_backend(diesel::pg::Pg)))]
|
2023-06-27 10:38:53 +00:00
|
|
|
pub struct CaptchaAnswer {
|
|
|
|
pub uuid: Uuid,
|
|
|
|
pub answer: String,
|
2023-08-24 15:27:00 +00:00
|
|
|
pub published: DateTime<Utc>,
|
2023-06-27 10:38:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[skip_serializing_none]
|
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
2023-11-21 13:42:28 +00:00
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Selectable))]
|
2023-06-27 10:38:53 +00:00
|
|
|
#[cfg_attr(feature = "full", diesel(table_name = captcha_answer))]
|
2023-11-21 13:42:28 +00:00
|
|
|
#[cfg_attr(feature = "full", diesel(check_for_backend(diesel::pg::Pg)))]
|
2023-06-27 10:38:53 +00:00
|
|
|
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,
|
|
|
|
}
|