Fromrow added for player

This commit is contained in:
Franklin 2023-01-24 19:12:30 -04:00
parent 2fc2540321
commit 35639161bf
3 changed files with 1173 additions and 2 deletions

1169
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -14,6 +14,9 @@ repository = "https://github.com/franklinblanco/league-types.git"
serde = { version = "1.0", features = ["derive"] }
chrono = { version = "0.4", features = [ "serde" ] }
rust_decimal = "1.26"
sqlx = { version = "0.6", features = [ "runtime-tokio-native-tls" , "mysql" ] }
tokio = { version = "1", features = ["full"] }
err = { git = "https://github.com/franklinblanco/err.git" }
dev-dtos = { git = "https://github.com/franklinblanco/user-svc-dtos-rust.git" }

View File

@ -1,10 +1,11 @@
use chrono::{Utc, DateTime, NaiveDate};
use serde::{Serialize, Deserialize};
use sqlx::FromRow;
use crate::dto::player::PlayerForCreationDto;
//TODO: Remove sensitive information from player struct
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, PartialOrd, Ord, Default)]
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, PartialOrd, Ord, Default, FromRow)]
pub struct Player {
pub id: u32,
pub time_created: DateTime<Utc>,