Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
4476df9
Added first ERD
roessnakhan Sep 20, 2016
436c28f
A few more changes.
roessnakhan Sep 20, 2016
b89f172
Update
roessnakhan Sep 20, 2016
8174c56
Delete ERD.mwb.bak
roessnakhan Sep 20, 2016
691d2cb
Delete .DS_Store
roessnakhan Sep 20, 2016
940677e
Merge pull request #1 from roessnakhan/master
roessnakhan Sep 21, 2016
1914c3b
Added more changes
roessnakhan Sep 22, 2016
4ffcbe2
Merge remote-tracking branch 'origin/master'
roessnakhan Sep 22, 2016
6746301
Pulled
roessnakhan Sep 22, 2016
6ae91a1
Merge remote-tracking branch 'bhanurayini/master'
roessnakhan Sep 22, 2016
5579aa0
Some changes
roessnakhan Sep 22, 2016
eb455d1
Merge pull request #2 from roessnakhan/master
roessnakhan Sep 22, 2016
1fef2aa
More changes & Readme
roessnakhan Sep 22, 2016
ea8e5ba
Merge remote-tracking branch 'bhanurayini/master'
roessnakhan Sep 22, 2016
244b04a
Merge pull request #3 from roessnakhan/master
roessnakhan Sep 22, 2016
3020b1a
Update artifacts.md
roessnakhan Sep 22, 2016
3a7927c
Merge pull request #4 from roessnakhan/master
roessnakhan Sep 22, 2016
c047f1b
Update artifacts.md
roessnakhan Sep 22, 2016
4caae87
Merge pull request #5 from roessnakhan/master
roessnakhan Sep 22, 2016
a83933e
Merge remote-tracking branch 'origin/master'
roessnakhan Sep 22, 2016
52f4375
Added e-mail to ERD, readme
roessnakhan Sep 22, 2016
c7d9b65
Merge pull request #6 from roessnakhan/master
roessnakhan Sep 22, 2016
d05da12
Added parent_guardian field on Person
roessnakhan Sep 22, 2016
ffe2816
Merge pull request #7 from roessnakhan/master
roessnakhan Sep 22, 2016
f3c2425
Update artifacts.md
roessnakhan Sep 22, 2016
2d6996a
Merge pull request #8 from roessnakhan/master
roessnakhan Sep 22, 2016
9c3ef10
Added height/weight to person eval.
roessnakhan Sep 22, 2016
7ddfb04
Merge pull request #9 from roessnakhan/master
roessnakhan Sep 22, 2016
bdbee93
Stuff from class
roessnakhan Sep 22, 2016
aea43e4
Merge pull request #10 from roessnakhan/master
roessnakhan Sep 22, 2016
4cc7628
Team Manager Instructions
roessnakhan Sep 23, 2016
13c5929
Merge pull request #11 from roessnakhan/master
roessnakhan Sep 23, 2016
bc48e29
Rebuilt & Refined ERD from Spec
roessnakhan Sep 26, 2016
146546d
Minor Edit to Refined ERD
roessnakhan Sep 26, 2016
973caae
Merge pull request #12 from roessnakhan/master
roessnakhan Sep 26, 2016
d0d14a0
Added Stat Record
roessnakhan Sep 26, 2016
1e42503
Merge pull request #13 from roessnakhan/master
roessnakhan Sep 26, 2016
50d7682
Slight update
roessnakhan Sep 26, 2016
11e6cdd
Merge pull request #14 from roessnakhan/master
roessnakhan Sep 26, 2016
c2617d9
Yup
roessnakhan Sep 26, 2016
b9d40de
Merge remote-tracking branch 'bhanurayini/master'
roessnakhan Sep 26, 2016
1f7d82a
First App Push
roessnakhan Sep 26, 2016
68bf560
Some additions
roessnakhan Sep 26, 2016
ce90264
More changes
roessnakhan Sep 26, 2016
6056bd7
Just added some to my terminal log file
roessnakhan Sep 27, 2016
83e9d3a
Merge branch 'master' of https://github.com/WebArchitectureExperts/te…
roessnakhan Sep 27, 2016
aeef7fc
Merge branch 'master' of https://github.com/WebArchitectureExperts/te…
roessnakhan Sep 27, 2016
c958ae0
Moved things around
roessnakhan Sep 27, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added .DS_Store
Binary file not shown.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,13 @@

# Ignore Byebug command history file.
.byebug_history

artifacts/ERD_refined.mwb.bak

artifacts/ERD.mwb.bak

.DS_Store

.DS_Store

.DS_Store
Binary file added artifacts/ERD.mwb
Binary file not shown.
Binary file added artifacts/ERD.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added artifacts/ERD_refined.mwb
Binary file not shown.
Binary file added artifacts/ERD_refined.pdf
Binary file not shown.
Binary file added artifacts/Instructions.pdf
Binary file not shown.
Binary file added artifacts/TeamManager.pdf
Binary file not shown.
177 changes: 177 additions & 0 deletions artifacts/Terminal Lines.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
=== Terminal/Command Line ===

== Scaffolds ==
rails g scaffold organization org_name

rails g scaffold team team_name age_group wins:integer loses:integer ties:integer team_start:date team_end:date is_archived:boolean

rails g scaffold person first_name last_name dob:date gender ethnicity

rails g scaffold address addr1 addr2 city state country zip address_type

rails g scaffold phone phone_number phone_type

rails g scaffold parent person:references

rails g scaffold child person:references

rails g scaffold staff person:references

rails g scaffold manager person:references

rails g scaffold coach license_num license_exp:date person:references

rails g scaffold team_has_coaches coach_type person:references team:references

rails g scaffold event event_name event_type event_start_time:datetime event_end_time:datetime

rails g scaffold player_stats jersey_number player_bio:text height:integer weight:integer person:references team:references

rails g scaffold stat_record record_value:text record_type record_date:datetime references:player_stats

rails g scaffold payment_type payment_type check_num cc_num acct_num routing_num

rails g scaffold fees fee_amt paid_amt created_on:datetime paid_on:datetime references:payment_type

rails g home index

== Migrations ==
rails g migration CreateJoinTablePeoplePhones people phones
rails g migration CreateJoinTablePeopleAddresses people addresses
rails g migration CreateJoinTableParentsChildren parents children
rails g migration CreateJoinTablePeopleFees people fees
rails g migration CreateJoinTableManagersTeams managers teams
rails g migration CreateJoinTablePeopleTeams people teams
rails g migration CreateJoinTableStaffsOrganizations staffs organizations
rails g migration CreateJoinTableEventsOrganizations events organizations
rails g migration CreateJoinTableEventsTeams events teams
rails g migration CreateJoinTableTeamsOrganizations teams organizations

=== Application Records ===
class Address < ApplicationRecord
has_and_belongs_to_many :people
validates_presence_of :addr1
validates_presence_of :addr2
validates_presence_of :city
validates_presence_of :state
validates_presence_of :country
validates_presence_of :zip
validates_presence_of :address_type
end

class Child < ApplicationRecord
belongs_to :person
has_and_belongs_to_many :parent
end

class Coach < ApplicationRecord
belongs_to :person
validates_presence_of :license_num
validates_presence_of :license_exp
end

class Event < ApplicationRecord
has_many :organization
has_many :team
validates_presence_of :event_name
validates_presence_of :event_type
validates_presence_of :event_start_time
validates_presence_of :event_end_time
end

class Fee < ApplicationRecord
belongs_to :person
has_one :payment_type
validates_presence_of :fee_amt
validates_presence_of :created_on
end

class Manager < ApplicationRecord
belongs_to :person
has_many :team
end

class Organization < ApplicationRecord
has_many :team
has_many :staff
has_many :event
validates_presence_of :org_name
end

class Parent < ApplicationRecord
belongs_to :person
has_many :child
end

class PaymentType < ApplicationRecord
belongs_to :fee
validates_presence_of :payment_type
end

class Person < ApplicationRecord
has_many :phone
has_and_belongs_to_many :addresses
has_many :team
has_many :fee
validates_presence_of :first_name
validates_presence_of :last_name
validates_presence_of :dob
validates_presence_of :gender
end

class Phone < ApplicationRecord
belongs_to :person
validates_presence_of :phone_number
validates_presence_of :phone_type
end

class PlayerStat < ApplicationRecord
belongs_to :person
belongs_to :team
has_many :stat_record, dependent: :destroy
end

class Staff < ApplicationRecord
belongs_to :person
end

class StatRecord < ApplicationRecord
belongs_to :player_stat
end

class TeamHasCoach < ApplicationRecord
belongs_to :person
belongs_to :team
validates_presence_of :coach_type
end

class Team < ApplicationRecord
has_many :person
has_many :manager
has_many :event
belongs_to :organization
validates_presence_of :team_name
validates_presence_of :age_group
end

=== Routes ===
Rails.application.routes.draw do
root 'home#index'
resources :fees
resources :payment_types
resources :stat_records
resources :player_stats
resources :events
resources :team_has_coaches
resources :coaches
resources :managers
resources :staffs
resources :children
resources :parents
resources :phones
resources :addresses
resources :people
resources :teams
resources :organizations
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end
96 changes: 94 additions & 2 deletions artifacts/artifacts.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,95 @@
# Artifacts
# Accompanying Documentation for Team Manager ERD
### Bhanu Rayini, Alexander Roessner, Krithika Saravanan, Karthick Krishnamurthy

Place things like entity-relationship diagrams and documentation in here.
##Organization (organization)
Organization (or Club) for Entire League
* idorganization - ID for the Organization
* name - Organization Name

##Team (team)
One of potentially many teams within an organization
* idteam - ID for the Team
* name - Name of the Team
* team_type - Type of team (competitive teams, versus recreational teams, etc.)
* wins - Number of wins for a team.
* loses - Number of loses for a team.
* ties - Number of ties for a team.
* organization_idorganization - FK for related organization
* age_group - Team age group.

##Team Training Sessions (team_training_sessions)
List of a team's training sessions and date of session.
* team_idteam - FK ID of Team
* team_organization_idorganization - FK ID of Organization
* training_date - Date of training session.

##Person Roles (person_roles)
Join table for a person and their potential roles in a team and organization. Team roster can be pulled from this in SQL select statement.
* roles_idroles - FK ID from Roles
* person_idperson - FK ID from Person
* organization_idorganization - FK ID from Organization
* team_idteam - FK ID from Team
* team_organization_idorganization - FK Related Organization ID from Team table (might be redundant, but autogenerated by MySQL Workbench).

##Roles (roles)
Different roles one can have in the database - one might hold multiple roles.
* idroles - Role ID
* isCoach - Is a coach (Yes/No)
* isPlayer - Is a player (Yes/No)
* isParent - Is a parent (Yes/No)
* isAdmin - Is an administrator (Yes/No)
* isManager - Is a manager (Yes/No)

##Person Evaluation (person_evaluation)
Small database to hold evaluations of a player. Currently limited to a body (memo) of the evaluation and a date/time of said evaluation.
* idperson_evaluation - ID of evaluation
* evaluation_memo - Content of evaluation
* evaluation_height - Height of individual at time of evaluation.
* evaluation_weight - Weight of individual at time of evaluation.
* evaluation_date - Date of evaluation
* person_idperson - FK Persion ID

##Person (person)
Person/User of this database.
* idperson - ID of Person
* first_name - First name of person.
* last_name - Last name of person.
* dob - Date of birth.
* gender - Gender
* ethn - Ethnicity
* email - Person's e-mail
* parent_guardian_person_id - Possibly null, but a referenced Person ID to one's parent or legal guardian.
* jersey_number - Jersey Number
* bio - Biography

##Scholarships (scholarships)
Scholarships a person may hold.
* idscholarships - Scholarship ID
* scholarship_name - Name of scholarship
* scholarship_ammt - Amount of scholarship
* person_idperson - FK of Person ID

##Person Has Address (person_has_address)
Join table of Person & Address.
* person_idperson - FK ID of Person
* address_idaddress - FK ID of Address

##Address (address)
Address
* idaddress - ID of Address
* addr1 - Address Line #1
* addr2 - Address Line #2
* city - City
* state - State
* country - Country
* ZIP - ZIP/Postal Code

##Person Has Phone (person_has_phone)
Join table for phone and person.
* person_idperson - FK ID of Person
* phone_idphone - FK ID of Phone

##Phone (phone)
Phone number.
* idphone - ID of phone
* phone-num - The phone number.
21 changes: 21 additions & 0 deletions artifacts/team-manager/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'

# Ignore bundler config.
/.bundle

# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep

# Ignore Byebug command history file.
.byebug_history
49 changes: 49 additions & 0 deletions artifacts/team-manager/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
source 'https://rubygems.org'

# Rolify
gem 'rolify'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.0', '>= 5.0.0.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
end

group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console'
gem 'listen', '~> 3.0.5'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Loading