ordabok/src/db/models/users.rs

17 lines
396 B
Rust
Raw Normal View History

2023-01-03 15:11:43 +00:00
use diesel::prelude::*;
use super::super::schema::{userfollows, users};
#[derive(Queryable, Insertable, Debug, Clone, PartialEq, Eq)]
pub struct User {
pub id: String,
pub username: String,
}
#[derive(Queryable, Insertable, Debug, Clone, PartialEq, Eq)]
#[diesel(table_name = userfollows)]
pub struct UserFollow {
pub id: i32,
pub follower: String,
pub following: String,
}