added structs for the defined tables

This commit is contained in:
gulliver 2021-05-30 23:14:50 +02:00
parent f34d59dec9
commit dfdec4d8a7

View File

@ -0,0 +1,88 @@
use super::schema::posts;
#[derive(Serialize, Queryable)]
pub struct user {
id: i64,
nickname: String,
pronouns: String,
address_1_name: String,
address_2_additional: String,
address_4_street: String,
adress_house_number: String,
adress_city_code: String,
adress_country: String,
Ehrenaemter: String,
gravatar_email: String,
Freitext: String,
}
#[derive(Serialize, Queryable)]
pub struct user_skill {
id: i64,
user_id: i64,
skill_id: i64,
level: i64,
}
#[derive(Serialize, Queryable)]
pub struct user_language {
id: i64,
user_id: i64,
language_id: i64,
level: i64,
}
#[derive(Serialize, Queryable)]
pub struct skill {
id: i64,
name: String,
}
#[derive(Serialize, Queryable)]
pub struct user_experience {
id: i64,
user_id: i64,
description: String,
start: Date,
end: Date,
}
#[derive(Serialize, Queryable)]
pub struct user_search_topic {
id: i64,
user_id: i64,
topic_id: i64,
}
#[derive(Serialize, Queryable)]
pub struct user_contact {
id: i64,
user_id: i64,
contact_type_id: i64,
content_: String,
}
#[derive(Serialize, Queryable)]
pub struct topic {
id: i64,
name: String,
}
#[derive(Serialize, Queryable)]
pub struct language {
id: i64,
name: String,
}
#[derive(Serialize, Queryable)]
pub struct experience {
id: i64,
name: String,
}
#[derive(Serialize, Queryable)]
pub struct contact_type {
id: i64,
name: String,
}