1
0
mirror of https://github.com/actix/examples synced 2025-02-13 05:52:20 +01:00

12 lines
320 B
Rust
Raw Normal View History

2024-07-07 02:01:13 +01:00
use serde::{Deserialize, Serialize};
use tokio_pg_mapper_derive::PostgresMapper;
#[derive(Deserialize, PostgresMapper, Serialize)]
#[pg_mapper(table = "users")] // singular 'user' is a keyword..
pub struct User {
pub email: String,
pub first_name: String,
pub last_name: String,
pub username: String,
}