cb753b045f
* Group imports with rustfmt * Running cargo fmt again. Co-authored-by: Felix Ableitner <me@nutomic.com>
30 lines
1 KiB
Rust
30 lines
1 KiB
Rust
use crate::newtypes::{LocalUserId, PersonId};
|
|
#[cfg(feature = "full")]
|
|
use crate::schema::registration_application;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
|
#[cfg_attr(feature = "full", derive(Queryable, Identifiable))]
|
|
#[cfg_attr(feature = "full", diesel(table_name = registration_application))]
|
|
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,
|
|
}
|
|
|
|
#[cfg_attr(feature = "full", derive(Insertable))]
|
|
#[cfg_attr(feature = "full", diesel(table_name = registration_application))]
|
|
pub struct RegistrationApplicationInsertForm {
|
|
pub local_user_id: LocalUserId,
|
|
pub answer: String,
|
|
}
|
|
|
|
#[cfg_attr(feature = "full", derive(AsChangeset))]
|
|
#[cfg_attr(feature = "full", diesel(table_name = registration_application))]
|
|
pub struct RegistrationApplicationUpdateForm {
|
|
pub admin_id: Option<Option<PersonId>>,
|
|
pub deny_reason: Option<Option<String>>,
|
|
}
|