will fix later :)
This commit is contained in:
@@ -7,7 +7,6 @@ edition = "2021"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
dotenv = "0.15"
|
dotenv = "0.15"
|
||||||
chrono = "0.2.25"
|
|
||||||
common = { path = "../common"}
|
common = { path = "../common"}
|
||||||
yew = { version = "0.20.0", features = ["csr"] }
|
yew = { version = "0.20.0", features = ["csr"] }
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
use crate::pog::SqlStruct;
|
use crate::pog::SqlStruct;
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use chrono::NaiveDate;
|
use serde::{Deserialize, Serialize};
|
||||||
|
use sqlx::types::chrono::NaiveDate;
|
||||||
use sqlx::{types::Json, PgPool};
|
use sqlx::{types::Json, PgPool};
|
||||||
|
|
||||||
|
#[derive(Serialize, Deserialize, Debug, Clone, sqlx::FromRow)]
|
||||||
pub struct Driver {
|
pub struct Driver {
|
||||||
pub id: i32,
|
pub id: i32,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub address: String,
|
pub address: String,
|
||||||
|
#[serde_as(as = "Json<NaiveDate>")]
|
||||||
pub reg_date: NaiveDate,
|
pub reg_date: NaiveDate,
|
||||||
|
#[serde_as(as = "Json<NaiveDate>")]
|
||||||
pub birthdate: NaiveDate,
|
pub birthdate: NaiveDate,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user