Set of administration tools for 42l's infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.2 KiB

use chrono::prelude::*;
#[derive(Queryable, Debug, Clone)]
pub struct User {
pub id: i32,
pub username: Option<Vec<u8>>,
pub recovery_email: Vec<u8>,
pub notify_email: Vec<u8>,
pub password: String,
pub sub_newsletter: bool,
pub sub_ag: bool,
pub blocked: i16,
pub max_emails: i16,
pub max_alias: i16,
pub gitea_id: Option<i64>,
pub nextcloud_username: Option<String>,
pub username_plain: String,
}
#[derive(Queryable, Debug, PartialEq, Serialize, Deserialize)]
pub struct Alias {
pub id: i32,
pub user_id: i32,
pub from_email: String,
pub to_email: String,
}
#[derive(Queryable, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Email {
pub id: i32,
pub user_id: i32,
pub address: String,
}
#[derive(Queryable)]
pub struct Adhesions {
pub id: i32,
pub user_id: i32,
pub adh_date: NaiveDate,
}
#[derive(Queryable, Serialize, Deserialize, Debug)]
pub struct EmailDomains {
pub id: i32,
pub fqdn: String,
pub free_access: bool,
pub owner: i32,
}
#[derive(Queryable, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct EmailGroups {
pub user_id: i32,
pub email_domains_id: i32,
}