1
0
mirror of https://github.com/actix/examples synced 2025-02-03 01:49:05 +01:00
examples/diesel/src/models.rs

15 lines
239 B
Rust
Raw Normal View History

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,
}