diff --git a/README.md b/README.md index b5151fb..8e2da42 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Jira Clone +# scrumtask-cli ## IMPORTANT NOTE diff --git a/src/models.rs b/src/models.rs index 78fc371..c1e957f 100644 --- a/src/models.rs +++ b/src/models.rs @@ -1,28 +1,48 @@ +use std::collections::HashMap; + pub enum Status { - // TODO: add fields (make sure the fields are public) + Open, + InProgress, + Resolved, + Closed, } pub struct Epic { - // TODO: add fields (make sure the fields are public) + pub name: String, + pub description: String, + pub status: Status, + pub stories: Vec, } impl Epic { pub fn new(name: String, description: String) -> Self { - todo!() // by default the status should be set to open and the stories should be an empty vector + Self { + name, + description, + status: Status::Open, + stories: vec![] + } } } pub struct Story { - // TODO: add fields (make sure the fields are public) + pub name: String, + pub description: String, + pub status: Status, } impl Story { pub fn new(name: String, description: String) -> Self { - todo!() // by default the status should be set to open + Self { + name, + description, + status: Status::Open, + } } } pub struct DBState { - // This struct represents the entire db state which includes the last_item_id, epics, and stories - // TODO: add fields (make sure the fields are public) -} \ No newline at end of file + pub last_item_id: u32, + pub epics: HashMap, + pub stories: HashMap, +}