will fix later :)

This commit is contained in:
LinlyBoi
2022-12-31 13:06:02 +02:00
parent 3a42785fde
commit 7fab1257a9
2 changed files with 5 additions and 2 deletions

View File

@@ -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"

View File

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