Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
modified Customer and added Employee Model
  • Loading branch information
Jeremy Mill committed Nov 2, 2015
1 parent 2869898 commit 786f504
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 0 deletions.
1 change: 1 addition & 0 deletions TeamDBAwesome/TeamDBAwesome/Models/Customer.cs
Expand Up @@ -55,5 +55,6 @@ namespace TeamDBAwesome.Models
//both of these are just ints
public int SupportRepId;
public int PersonID;
public int CustomerID;
}
}
65 changes: 65 additions & 0 deletions TeamDBAwesome/TeamDBAwesome/Models/Employee.cs
@@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace TeamDBAwesome.Models
{
public class Employee
{
//alpha upper and lowercase, spaces, dots and dashes from 2 to 20 chars
[RegularExpression(@"^([A-Za-z\s\.-]{2,20})$")]
public string FName;

//alpha upper and lowercase, spaces, dots and dashes from 2 to 20 chars
[RegularExpression(@"^([A-Za-z\s\.-]{2,20})$")]
public string LName;

//alpha upper and lowercase, spaces, dots, dashes, numbers, colons, pounds and commas from 2 to 70 chars
[RegularExpression(@"^([A-z\s\-\d\.\#\:\,]{2,70})$")]
public string Address;

//alpha upper and lowercase, spaces, dots and dashes from 2 to 40 chars
[RegularExpression(@"^([A-Za-z\s\.-]{2,40})$")]
public string City;

//alpha upper and lowercase, spaces, dots and dashes from 2 to 40 chars
[RegularExpression(@"^([A-Za-z\s\.-]{2,40})$")]
public string State;

//5-15 digit long numbers
[RegularExpression(@"^(\d{5,15})$")]
public string Post;

//alpha upper and lowercase, spaces, dots and dashes from 2 to 40 chars
[RegularExpression(@"^([A-Za-z\s\.-]{2,40})$")]
public string Country;

//match a 10-15 digit long number
[RegularExpression(@"^(\d{10,15})$")]
public string Phone;

//match a 10-15 digit long number
[RegularExpression(@"^(\d{10,15})$")]
public string Fax;

//an Email Address
[EmailAddress]
public string Email;

//alpha upper and lowercase, spaces, dots and dashes from 2 to 80 chars
[RegularExpression(@"^([A-Za-z\s\.-]{2,30})$")]
public string Title;

public DateTime BirthDate;

public DateTime HireDate;


//both of these are just ints
public int ReportsTo;
public int PersonID;
public int EmployeeID;
}
}
Binary file modified chinookmodel.mwb
Binary file not shown.
Binary file modified chinookmodel.mwb.bak
Binary file not shown.

0 comments on commit 786f504

Please sign in to comment.