Skip to content

Commit 539026d

Browse files
authored
Merge pull request #63 from Jim-Hodapp-Coaching/fix_inconsistent_status_string_representation
Make the status enum strings match the DB schema's strings
2 parents 9daf850 + ab491de commit 539026d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

docs/db/refactor_platform_rs.dbml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ Table refactor_platform.actions {
8989
}
9090

9191
enum status {
92+
not_started
9293
in_progress
9394
completed
9495
wont_do

entity/src/status.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ use serde::{Deserialize, Serialize};
44
#[derive(Debug, Clone, Eq, PartialEq, EnumIter, Deserialize, Serialize, DeriveActiveEnum)]
55
#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "status")]
66
pub enum Status {
7-
#[sea_orm(string_value = "InProgress")]
7+
#[sea_orm(string_value = "not_started")]
8+
NotStarted,
9+
#[sea_orm(string_value = "in_progress")]
810
InProgress,
9-
#[sea_orm(string_value = "Completed")]
11+
#[sea_orm(string_value = "completed")]
1012
Completed,
11-
#[sea_orm(string_value = "WontDo")]
13+
#[sea_orm(string_value = "wont_do")]
1214
WontDo,
1315
}
1416

0 commit comments

Comments
 (0)