2022-05-03 17:44:13 +00:00
|
|
|
use crate::newtypes::LocalUserId;
|
2021-12-15 19:49:59 +00:00
|
|
|
|
2022-05-03 17:44:13 +00:00
|
|
|
#[cfg(feature = "full")]
|
|
|
|
use crate::schema::email_verification;
|
|
|
|
|
|
|
|
#[derive(Clone)]
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Identifiable))]
|
|
|
|
#[cfg_attr(feature = "full", table_name = "email_verification")]
|
2021-12-15 19:49:59 +00:00
|
|
|
pub struct EmailVerification {
|
|
|
|
pub id: i32,
|
|
|
|
pub local_user_id: LocalUserId,
|
|
|
|
pub email: String,
|
|
|
|
pub verification_code: String,
|
|
|
|
pub published: chrono::NaiveDateTime,
|
|
|
|
}
|
|
|
|
|
2022-05-03 17:44:13 +00:00
|
|
|
#[cfg_attr(feature = "full", derive(Insertable, AsChangeset))]
|
|
|
|
#[cfg_attr(feature = "full", 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,
|
|
|
|
}
|