-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jk mar4 #17
Open
jessicakilby
wants to merge
13
commits into
nss-evening-cohort-04:master
Choose a base branch
from
jessicakilby:jk-mar4
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+129
−1
Open
Jk mar4 #17
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
17a9ffa
added additional classes to models
jessicakilby d41c3e5
setting up new classes
jessicakilby 62d61cf
added ERD file from VP
jessicakilby b732809
adding erd to readme
jessicakilby 90bed92
still trying to add
jessicakilby 8f5534e
cleanup
jessicakilby 1810e1d
gah
jessicakilby 322e1d1
well, the readme is fine
jessicakilby 5b5fc9f
now erd gone from readme
jessicakilby a5319fa
brushing things up
jessicakilby f084571
changes made in class sat mar 4
jessicakilby 4378558
cleanup and removed unnecessary files
jessicakilby 6352cba
.csproj file
jessicakilby File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using FakeTrello.Models; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Web; | ||
|
||
namespace FakeTrello.DAL | ||
{ | ||
public class FakeTrelloContext : ApplicationDbContext | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel.DataAnnotations; | ||
using System.Linq; | ||
using System.Web; | ||
|
||
namespace FakeTrello.Models | ||
{ | ||
public class Board | ||
{ | ||
[Key] | ||
public int BoardId { get; set; } | ||
|
||
[MaxLength(50)] | ||
public string BoardName { get; set; } | ||
|
||
[MaxLength(50)] | ||
public string URL { get; set; } | ||
|
||
// Auxiliary = not required to drive/define relationship | ||
public TrelloUser Owner { get; set; } | ||
|
||
public List<List> Lists { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel.DataAnnotations; | ||
using System.Linq; | ||
using System.Web; | ||
|
||
namespace FakeTrello.Models | ||
{ | ||
public class Card | ||
{ | ||
[Key] | ||
public int CardId { get; set; } | ||
|
||
public string Title { get; set; } | ||
|
||
public string Description { get; set; } | ||
|
||
//Auxilliary: given a card instance, return the list it belongs to. | ||
public List BelongsTo { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel.DataAnnotations; | ||
using System.Linq; | ||
using System.Web; | ||
|
||
namespace FakeTrello.Models | ||
{ | ||
public class List | ||
{ | ||
[Key] | ||
public int ListId { get; set; } | ||
|
||
[MaxLength(50)] | ||
public string ListName { get; set; } | ||
|
||
//does this need to be added? | ||
public Board BelongsToBoard { get; set; } | ||
|
||
public List<Card> Cards { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel.DataAnnotations; | ||
using System.Linq; | ||
using System.Web; | ||
|
||
//Entity is our Object Relational Mapper (ORM) So it knows how to interpret this information | ||
|
||
namespace FakeTrello.Models | ||
{ | ||
public class TrelloUser | ||
{ | ||
[Key] //help tell db system what constraints to take, applies to first property it hits going down | ||
public int TrelloUserId { get; set; } //Primary Key | ||
|
||
//stacking of properties applies multiple annotations | ||
//to the following property. failed = database failed constraint | ||
[MinLength(10)] | ||
[MaxLength(50)] | ||
public string Email { get; set; } | ||
|
||
[MaxLength(50)] | ||
public string Username { get; set; } | ||
|
||
[MaxLength(50)] | ||
public string Password { get; set; } | ||
|
||
[MaxLength(50)] | ||
public string FirstName { get; set; } | ||
|
||
[MaxLength(50)] | ||
public string LastName { get; set; } | ||
|
||
public ApplicationUser BaseUser { get; set; } // creates one to one relationship to another table | ||
|
||
public List<Board> Boards { get; set; } // 1 to many (boards) relationship. Navigation property. Does join sql statement for you. Entity knows how to interpret that relationship. | ||
|
||
} | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,4 @@ | |
|
||
### Fake Trello ERD | ||
|
||
[ERD goes here] | ||
![Fake Trello Picture](/FakeTrello.jpg?raw=true) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explore how you would link a user (owner) or users (contributors or people who have been tagged) to a Card. You've got all the classes you need already, so think about how you would add those links with new properties in your Card class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@katerebekah Would it be something like this?
public TrelloUser Contributer { get; set; }
public TrelloUser Owner { get; set; }