2022-05-03 17:44:13 +00:00
|
|
|
use crate::newtypes::LocalUserId;
|
|
|
|
#[cfg(feature = "full")]
|
|
|
|
use crate::schema::password_reset_request;
|
2023-08-24 15:27:00 +00:00
|
|
|
use chrono::{DateTime, Utc};
|
2022-05-03 17:44:13 +00:00
|
|
|
|
2022-09-26 14:09:32 +00:00
|
|
|
#[derive(PartialEq, Eq, Debug)]
|
2022-05-03 17:44:13 +00:00
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Identifiable))]
|
2022-09-26 14:09:32 +00:00
|
|
|
#[cfg_attr(feature = "full", diesel(table_name = password_reset_request))]
|
2020-12-21 13:38:34 +00:00
|
|
|
pub struct PasswordResetRequest {
|
|
|
|
pub id: i32,
|
2023-08-02 17:02:53 +00:00
|
|
|
pub token: String,
|
2023-08-24 15:27:00 +00:00
|
|
|
pub published: DateTime<Utc>,
|
2021-03-18 20:25:21 +00:00
|
|
|
pub local_user_id: LocalUserId,
|
2020-12-21 13:38:34 +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 = password_reset_request))]
|
2020-12-21 13:38:34 +00:00
|
|
|
pub struct PasswordResetRequestForm {
|
2021-03-18 20:25:21 +00:00
|
|
|
pub local_user_id: LocalUserId,
|
2023-08-02 17:02:53 +00:00
|
|
|
pub token: String,
|
2020-12-21 13:38:34 +00:00
|
|
|
}
|