mirror of
https://github.com/actix/examples
synced 2025-06-27 09:29:02 +02:00
refactor: use confik instead of config
This commit is contained in:
11
databases/postgres/src/models.rs
Normal file
11
databases/postgres/src/models.rs
Normal file
@ -0,0 +1,11 @@
|
||||
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,
|
||||
}
|
Reference in New Issue
Block a user