core: type workspace and secret timestamps

This commit is contained in:
a.tolmachev
2026-04-13 05:59:11 +00:00
parent 03cb109b40
commit c736b4f5a8
17 changed files with 243 additions and 139 deletions
+10 -10
View File
@@ -1478,8 +1478,8 @@ mod tests {
display_name: "Extra Workspace".to_owned(),
status: crank_core::WorkspaceStatus::Active,
settings: json!({"region":"eu"}),
created_at: "2026-03-25T12:00:00Z".to_owned(),
updated_at: "2026-03-25T12:00:00Z".to_owned(),
created_at: timestamp("2026-03-25T12:00:00Z"),
updated_at: timestamp("2026-03-25T12:00:00Z"),
};
let mut user = User {
id: UserId::new("user_extra_01"),
@@ -1544,8 +1544,8 @@ mod tests {
display_name: "Profile Workspace".to_owned(),
status: crank_core::WorkspaceStatus::Active,
settings: json!({}),
created_at: "2026-03-25T12:00:00Z".to_owned(),
updated_at: "2026-03-25T12:00:00Z".to_owned(),
created_at: timestamp("2026-03-25T12:00:00Z"),
updated_at: timestamp("2026-03-25T12:00:00Z"),
};
let other_workspace = Workspace {
id: WorkspaceId::new("ws_profile_02"),
@@ -1553,8 +1553,8 @@ mod tests {
display_name: "Other Workspace".to_owned(),
status: crank_core::WorkspaceStatus::Active,
settings: json!({}),
created_at: "2026-03-25T12:01:00Z".to_owned(),
updated_at: "2026-03-25T12:01:00Z".to_owned(),
created_at: timestamp("2026-03-25T12:01:00Z"),
updated_at: timestamp("2026-03-25T12:01:00Z"),
};
let user_id = registry
.upsert_bootstrap_user("profile@example.com", "Owner", "hashed-password")
@@ -1611,8 +1611,8 @@ mod tests {
display_name: "Session Workspace".to_owned(),
status: crank_core::WorkspaceStatus::Active,
settings: json!({}),
created_at: "2026-03-25T12:00:00Z".to_owned(),
updated_at: "2026-03-25T12:00:00Z".to_owned(),
created_at: timestamp("2026-03-25T12:00:00Z"),
updated_at: timestamp("2026-03-25T12:00:00Z"),
};
let user_id = registry
.upsert_bootstrap_user("session@example.com", "Owner", "hashed-password")
@@ -1666,8 +1666,8 @@ mod tests {
display_name: "Keys Workspace".to_owned(),
status: crank_core::WorkspaceStatus::Active,
settings: json!({}),
created_at: "2026-03-25T12:00:00Z".to_owned(),
updated_at: "2026-03-25T12:00:00Z".to_owned(),
created_at: timestamp("2026-03-25T12:00:00Z"),
updated_at: timestamp("2026-03-25T12:00:00Z"),
};
let api_key = PlatformApiKey {
id: PlatformApiKeyId::new("key_01"),