rwilcox / odyssey

Rails, React, and deployment patterns
0 stars 0 forks source link

create project and user model #1

Closed rwilcox closed 6 years ago

rwilcox commented 6 years ago

Either do rails scaffold / do it manually, OR put the rails scaffold command you WOULD run as a comment into this ticket and I'll approve or not

jcarvin commented 6 years ago

Here's what I'm thinking:

User Model

rails g scaffold user username:string first_name:string last_name:string email:string company:string title:string

pk username first_name last_name email company title team
1 jdoe john doe jdoe@gmail.com foobar inc. supervisor N/A
2 bsmith ben smith bsmith@gmail.com foobar inc. developer 1234

Project Model

Stories

rails g scaffold story in_order_to:text as:string i_want_to:text i_do:text this_happens:text importance:int comments:text dev_comments:text difficulty:int epic:int user:int dev_team:int

in_order_to as i_want_to i_do this_happens importance comments dev_comments difficulty epic user dev_team
Create a new user story a supervisor be able to click a button and input some data When I click the button to create a new user story Text boxes should appear for me to enter my thoughts/ideas 3 There should also be a way to assign user stories to individual developers/developer teams as well as a way for them to comment and respond foo bar 1 {this would be an integer relating to an epic if applicable.} 1 {int relating to user who is requesting feature} 1234{int relating to dev or dev team}

Other Thoughts

Would it be necessary to have another table for epics or for dev teams? Or do you think that would be excessive?

rwilcox commented 6 years ago

User model:

Story model:

We will need another table for teams. At some very near point in the future we need some kind of table to let stories have other stories that are children of it (ie that's how we see all the stories in an epic). But not for today.

jcarvin commented 6 years ago

Let me know how this looks. If you're happy with it, I'll run them and submit a PR


Changes

user

rails g scaffold user username:string first_name:string last_name:string email:string role:enum

story

rails g scaffold story in_order_to:text as:string i_want_to:text i_do:text this_happens:text importance:int comments:text dev_comments:text difficulty:int story_kind:int author:int

rwilcox commented 6 years ago

If you're into enums use it for story kind too. And maybe importance .

(Not diifucukity I like the ability for that to go super up)

Sent from my iPhone

On Aug 21, 2017, at 19:27, Josh notifications@github.com wrote:

Let me know how this looks. If you're happy with it, I'll run them and submit a PR

Changes

user

rails g scaffold user username:string first_name:string last_name:string email:string role:enum

title:int to role:enum removed company:string story

rails g scaffold story in_order_to:text as:string i_want_to:text i_do:text this_happens:text importance:int comments:text dev_comments:text difficulty:int story_kind:int author:int

user:int to author:int added story_kind:int — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

jcarvin commented 6 years ago

Gotcha! How about:

user

rails g scaffold user username:string first_name:string last_name:string email:string role:enum

story

rails g scaffold story in_order_to:text as:string i_want_to:text i_do:text this_happens:text importance:enum comments:text dev_comments:text difficulty:int story_kind:enum author:int

rwilcox commented 6 years ago

Ship it!

I wouldn't be surprised if the command gave you errors, however. You may need to set those types as integers in your command, then go into the models and manually use an enum declaration.

http://edgeapi.rubyonrails.org/classes/ActiveRecord/Enum.html

rwilcox commented 6 years ago

Closed in PR #14 (although it implemented User and Story... which I didn't really catch until now. Regardless, both of these needed to be done!