TBOTH > team functionality

team functionality

Create a league page:

- League name

STEP1/PAGE1

Basic setup, request a league name, season name(with other standard season data), number of teams. Dynamically added logic that will allow the user to insert teams.

A user can insert a team id and email (email used to verify that the team id can be inserted for use or we need to send a email to verify).
OR
A user can insert a team name, manager first name, manager last name, and manager email address and the team will be created. Do we need to have the user verify before we create the team/season on there behalf?

STEP2/PAGE2

Allow league manager to setup schedule
- Team Name/Manager Name/Manager Email (how do we select existing team?)

STEP3

Email managers informing them a league has been created. Allow team manager to link into Wizard setup to finish creating team.

STEP4/PAGE3

Stop league setup until teams have confirmed that they are agreeing to join?
- Give user that setup league the ability to make edits to all the teams (do we need to limit this person to only have access to the season on that team?)
Give access to team user to allow/not allow league user access to team once team user has taken control
- Do we want to give them the ability to setup all the games?
Yes, I think we want them to setup games and make them linked.... causes issues with current games setting and will require re-work of logic for this specific case.
- Populate standings data.
Build out logic that populates standings with league scores

Data Structures

softball_league
+------------------------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------------------------+--------------+------+-----+---------+----------------+ | softball_league_id | int(11) | NO | PRI | NULL | auto_increment | | softball_league_name | varchar(255) | YES | | NULL | | | softball_league_create_ts | datetime | YES | | NULL | | | softball_league_logo | varchar(255) | YES | | NULL | | | softball_league_create_user | int(11) | YES | | NULL | | | softball_league_modified_ts | datetime | YES | | NULL | | | softball_league_modified_user| int(11) | YES | | NULL | | | softball_league_status | char(1) | YES | | NULL | | +------------------------------+--------------+------+-----+---------+----------------+ CREATE TABLE `softball_league` ( `softball_league_id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , `softball_league_name` VARCHAR( 255 ) NULL , `softball_league_create_ts` DATETIME NULL , `softball_league_logo` VARCHAR( 255 ) NULL , `softball_league_create_user` INT( 11 ) NULL , `softball_league_modified_ts` DATETIME NULL , `softball_league_modified_user` INT( 11 ) NULL , `softball_league_status` CHAR( 1 ) NULL )


softball_league_team
Should we add a season here as well?
+------------------------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------------------------+--------------+------+-----+---------+----------------+ | softball_league_id | int(11) | YES | | NULL | | | softball_team_id | int(11) | YES | | NULL | | +------------------------------+--------------+------+-----+---------+----------------+ CREATE TABLE `softball_league_team` ( `softball_league_id` INT( 11 ) NULL , `softball_team_id` INT( 11 ) NULL )


softball_league_user
+------------------------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------------------------+--------------+------+-----+---------+----------------+ | softball_league_id | int(11) | YES | | NULL | | | user_id | int(11) | YES | | NULL | | +------------------------------+--------------+------+-----+---------+----------------+ CREATE TABLE `softball_league_team` ( `softball_league_id` INT( 11 ) NULL , `user_id` INT( 11 ) NULL )




The original document is available at http://www.tboth.com/wiki/tiki-index.php?page=team%20functionality