Skip to content

Commit 9435d95

Browse files
committed
use time type in time model
1 parent 3dff2fb commit 9435d95

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/interface/role.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::fmt::Write;
55

66
use crate::client::client;
77
use crate::model::role;
8-
use crate::model::{enums, types};
8+
use crate::model::types;
99

1010
/// Retrieves a specific Ruddr Role object by id, and deserializes it to the corresponding model struct.
1111
/// [API Documentation](https://ruddr.readme.io/reference/get-a-project-role)

src/model/time.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ pub struct TimeEntry {
3232
pub cost_currency: Option<String>,
3333
pub cost_per_hour: Option<f64>,
3434
pub created_at: types::Timestamp,
35-
pub start_time: Option<String>,
36-
pub end_time: Option<String>,
35+
pub start_time: Option<types::Time>,
36+
pub end_time: Option<types::Time>,
3737
pub member: shared::Entity,
3838
pub project: Option<shared::Project>,
3939
pub role: Option<shared::Entity>,

src/model/time/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ fn test_time_deserialize() {
7272
cost_currency: Some(String::from("USD")),
7373
cost_per_hour: Some(50.0),
7474
created_at: types::Timestamp(String::from("2022-03-11T16:13:40.715Z")),
75-
start_time: Some(String::from("01:00")),
76-
end_time: Some(String::from("03:00")),
75+
start_time: Some(types::Time(String::from("01:00"))),
76+
end_time: Some(types::Time(String::from("03:00"))),
7777
member: shared::Entity {
7878
id: types::UUID(String::from("ec5543de-3b0f-47a0-b8ef-a6e18dc4b885")),
7979
name: String::from("John Smith"),

0 commit comments

Comments
 (0)