mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-28 01:52:57 +01:00
15 lines
239 B
Rust
15 lines
239 B
Rust
use super::schema::users;
|
|
|
|
#[derive(Serialize, Queryable)]
|
|
pub struct User {
|
|
pub id: String,
|
|
pub name: String,
|
|
}
|
|
|
|
#[derive(Insertable)]
|
|
#[table_name = "users"]
|
|
pub struct NewUser<'a> {
|
|
pub id: &'a str,
|
|
pub name: &'a str,
|
|
}
|