DMIT-2018 / 2018-sep-2022-a01-workbook-jthompsonnait

2018-sep-2022-a01-workbook-jthompsonnait created by GitHub Classroom
2 stars 2 forks source link

Task #6

Open jthompsonnait opened 2 years ago

jthompsonnait commented 2 years ago

Changes

Added unit test

jthompsonnait commented 2 years ago

Query Models

Artist and Album Tracks fetch (Track_FetchTracksBy)

public class TrackSelection
{
    public int TrackId {get; set;}
    public string SongName {get; set;}
    public string AlbumTitle{get; set;}
    public string ArtistName{get; set;}
    public int Milliseconds {get; set;}
    public decimal Price {get; set;}
}

Current Playlist fetch (PlaylistTrack_FetchPlaylist)

public class PlaylistTrackInfo 
{
    public int TrackId {get; set;}
    public int TrackNumber {get; set;}
    public string SongName {get; set;}
    public int Milliseconds {get; set;}
}

Command Models

Add Track

No model class, individual parameters

Remove/Move Tracks (shared command model due to the web page handling of BindProperty)

Remove Tracks

for the Remove Tracks functionality, the SelectedTrack and TrackId will be required for transactional processing

Move Tracks (re-sequence playlist)

for the Move Tracks functionality, the TrackId, TrackNumber and TrackInput will be required for transactional processing

public class PlaylistTrackTRX
{
    public bool SelectedTrack {get; set;}
    public int TrackId {get; set;}
    public int TrackNumber {get; set;}
    public int TrackInput {get; set;}
    public string WhoKnowWhat {get; set;}
}

Changes

Added WhoKnowWhat to PlaylistTrackTRX

jthompsonnait commented 2 years ago

Business Processing Requirements

Add Track

void PlaylistTrackService_AddTrack(string playlistname, string username, int trackid)

Changes

jthompsonnait commented 2 years ago

Examples

This is the the Assignment that will be completed when the tasks have been checked

Changes

Remove Clear Table Create Data Model Employee.

jthompsonnait commented 2 years ago

Data Model CSQRS

These are all the classes that will be used for the form. This holds all the public data that would be used in the program

Register Employee

Employee

public class Employee
 {
    public int Employee_ID {get; set;}
    public string First_Name {get; set;}
    public string Last_Name {get set;}
    public int HomePhone {get; set;}
} 

Employee Skills

These are the skills that we would be registering the employees by

public class EmployeeSkills
{
    public int Employee_ID {get; set;}
    public string Skill {get; set;}
    public int Skill_ID {get; set;} 
    public int Hourly_Wage {get; set;}
    public int YearsOfExperience {get; set;}
}

Commands

Registering an Employee

In order to register a new Employee we would need to register the employee with at least one skill and years of Experience from 1-50 inclusively

 public class Reg_Employee
{
    public int Skill_ID {get; set;} 
    public int Level {get; set;}
    public int Hourly_Wage {get; set;}
    public int YearsOfExperience {get; set;}
}

Changes

Remove the following fields from the Reg_Employee public int Employee_ID {get; set;} public string First_Name {get; set;} public string Last_Name {get set;} public int HomePhone {get; set;}

Add the following field to Reg_Employee Level

jthompsonnait commented 2 years ago

Buisness Rules and Requirements

This comment outlines all the business standards and rules that have been set by the business. It discusses all the rules that must be followed when registering an employee or registering an employee's skill

Registering A New Employee

When registering an employee the employee must not already exist in the table, the employee must have at least one skill and must have a Year of experience between one and fifty inclusively.

  • check if the employee Exists
  • if the employee exists throw an Exception
  • If the employee doesn't exist
  • check if the Employee has at least one skill
  • check If the Employee has an hourly wage
  • check if the Employee has Years of experience in the skill
  • if the Employee has all these attributes
  • Register the Employee and Their skill

Changes

Added workflow for exceptions