fabaccess-bffh/bffhd/sql/models.rs

16 lines
315 B
Rust
Raw Normal View History

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