2022-05-03 17:44:13 +00:00
|
|
|
use crate::newtypes::LocalUserId;
|
|
|
|
#[cfg(feature = "full")]
|
|
|
|
use crate::schema::email_verification;
|
2023-08-24 15:27:00 +00:00
|
|
|
use chrono::{DateTime, Utc};
|
2022-05-03 17:44:13 +00:00
|
|
|
|
|
|
|
#[derive(Clone)]
|
2023-11-21 13:42:28 +00:00
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Selectable, Identifiable))]
|
2022-09-26 14:09:32 +00:00
|
|
|
#[cfg_attr(feature = "full", diesel(table_name = email_verification))]
|
2023-11-21 13:42:28 +00:00
|
|
|
#[cfg_attr(feature = "full", diesel(check_for_backend(diesel::pg::Pg)))]
|
2021-12-15 19:49:59 +00:00
|
|
|
pub struct EmailVerification {
|
|
|
|
pub id: i32,
|
|
|
|
pub local_user_id: LocalUserId,
|
|
|
|
pub email: String,
|
2023-11-21 13:42:28 +00:00
|
|
|
pub verification_token: String,
|
2023-08-24 15:27:00 +00:00
|
|
|
pub published: DateTime<Utc>,
|
2021-12-15 19:49:59 +00:00
|
|
|
}
|
|
|
|
|
2022-05-03 17:44:13 +00:00
|
|
|
#[cfg_attr(feature = "full", derive(Insertable, AsChangeset))]
|
2022-09-26 14:09:32 +00:00
|
|
|
#[cfg_attr(feature = "full", diesel(table_name = email_verification))]
|
2021-12-15 19:49:59 +00:00
|
|
|
pub struct EmailVerificationForm {
|
|
|
|
pub local_user_id: LocalUserId,
|
|
|
|
pub email: String,
|
|
|
|
pub verification_token: String,
|
|
|
|
}
|