2022-05-03 17:44:13 +00:00
|
|
|
use crate::newtypes::{LocalUserId, PersonId};
|
2021-12-15 19:49:59 +00:00
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
|
2022-05-03 17:44:13 +00:00
|
|
|
#[cfg(feature = "full")]
|
|
|
|
use crate::schema::registration_application;
|
|
|
|
|
|
|
|
#[derive(Clone, PartialEq, Debug, Serialize, Deserialize)]
|
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Identifiable))]
|
|
|
|
#[cfg_attr(feature = "full", table_name = "registration_application")]
|
2021-12-15 19:49:59 +00:00
|
|
|
pub struct RegistrationApplication {
|
|
|
|
pub id: i32,
|
|
|
|
pub local_user_id: LocalUserId,
|
|
|
|
pub answer: String,
|
|
|
|
pub admin_id: Option<PersonId>,
|
|
|
|
pub deny_reason: Option<String>,
|
|
|
|
pub published: chrono::NaiveDateTime,
|
|
|
|
}
|
|
|
|
|
2022-05-03 17:44:13 +00:00
|
|
|
#[derive(Default)]
|
|
|
|
#[cfg_attr(feature = "full", derive(Insertable, AsChangeset))]
|
|
|
|
#[cfg_attr(feature = "full", table_name = "registration_application")]
|
2021-12-15 19:49:59 +00:00
|
|
|
pub struct RegistrationApplicationForm {
|
|
|
|
pub local_user_id: Option<LocalUserId>,
|
|
|
|
pub answer: Option<String>,
|
|
|
|
pub admin_id: Option<PersonId>,
|
|
|
|
pub deny_reason: Option<Option<String>>,
|
|
|
|
}
|