use diesel::{Insertable, Queryable}; use super::schema::users; #[derive(Queryable)] pub struct User { pub id: i32, pub name: String, pub password: Option, } #[derive(Insertable)] #[diesel(table_name = users)] pub struct NewUser<'a> { pub name: &'a str, pub password: Option<&'a str>, }