mirror of
https://github.com/actix/examples
synced 2025-02-08 20:06:07 +01:00
12 lines
320 B
Rust
12 lines
320 B
Rust
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,
|
|
}
|