From 6a6b5aa2343144429c81f72cc753f735f4733bd6 Mon Sep 17 00:00:00 2001 From: Chris Rollings Date: Mon, 25 Mar 2019 17:05:22 +0000 Subject: [PATCH] Update redirectURL --- .../ClientApp/src/app/auth/auth.service.ts | 2 +- .../20190325150337_fourth.Designer.cs | 422 ++++++++++++++++++ .../Migrations/20190325150337_fourth.cs | 266 +++++++++++ .../RCBoatDBContextModelSnapshot.cs | 36 +- Code/groupH_M32COM.Angular/localdatabase.db | Bin 106496 -> 106496 bytes 5 files changed, 707 insertions(+), 19 deletions(-) create mode 100644 Code/groupH_M32COM.Angular/Migrations/20190325150337_fourth.Designer.cs create mode 100644 Code/groupH_M32COM.Angular/Migrations/20190325150337_fourth.cs diff --git a/Code/groupH_M32COM.Angular/ClientApp/src/app/auth/auth.service.ts b/Code/groupH_M32COM.Angular/ClientApp/src/app/auth/auth.service.ts index ef41a25..0a043ab 100644 --- a/Code/groupH_M32COM.Angular/ClientApp/src/app/auth/auth.service.ts +++ b/Code/groupH_M32COM.Angular/ClientApp/src/app/auth/auth.service.ts @@ -37,7 +37,7 @@ export class AuthService { clientID: 'E02Ls5Bl6mYQK48j9MdQyyETFXcIygwj', domain: 'groupm32com.auth0.com', responseType: 'token id_token', - redirectUri: 'http://localhost:4200/callback', + redirectUri: environment.apiUrl + 'callback', scope: 'openid email profile', audience: 'https://api.rcboat.com' }); diff --git a/Code/groupH_M32COM.Angular/Migrations/20190325150337_fourth.Designer.cs b/Code/groupH_M32COM.Angular/Migrations/20190325150337_fourth.Designer.cs new file mode 100644 index 0000000..9f5b3fb --- /dev/null +++ b/Code/groupH_M32COM.Angular/Migrations/20190325150337_fourth.Designer.cs @@ -0,0 +1,422 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using groupH_M32COM.Angular.DatabaseClasses; + +namespace groupH_M32COM.Angular.Migrations +{ + [DbContext(typeof(RCBoatDBContext))] + [Migration("20190325150337_fourth")] + partial class fourth + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "2.1.8-servicing-32085"); + + modelBuilder.Entity("groupH_M32COM.Angular.Models.Boat", b => + { + b.Property("ID") + .ValueGeneratedOnAdd(); + + b.Property("Description") + .IsRequired() + .HasMaxLength(100) + .IsUnicode(false); + + b.Property("ImagePath"); + + b.Property("Model"); + + b.HasKey("ID"); + + b.ToTable("Boats"); + + b.HasData( + new { ID = 1, Description = "Blue and shiny and very fast ayyyyeeee", ImagePath = "images/Boat8.png", Model = 1 }, + new { ID = 2, Description = "Use your power to row your damn boat", ImagePath = "images/RowBoat1.jpg", Model = 2 }, + new { ID = 3, Description = "I don't exactly know what is this lol", ImagePath = "images/SpeedBoat2.jpg", Model = 0 }, + new { ID = 4, Description = "As long as the sun shines the boat moves", ImagePath = "images/SolarBoat2.jpg", Model = 3 }, + new { ID = 5, Description = "I don't exactly know what is this lol", ImagePath = "images/SpeedBoat2.jpg", Model = 0 }, + new { ID = 6, Description = "As long as the sun shines the boat moves", ImagePath = "images/SolarBoat2.jpg", Model = 3 } + ); + }); + + modelBuilder.Entity("groupH_M32COM.Angular.Models.CrewMember", b => + { + b.Property("ID") + .ValueGeneratedOnAdd(); + + b.Property("BoatID"); + + b.Property("DOB"); + + b.Property("Email") + .IsRequired(); + + b.Property("FirstName") + .HasMaxLength(100) + .IsUnicode(false); + + b.Property("ImagePath"); + + b.Property("LastName") + .HasMaxLength(100) + .IsUnicode(false); + + b.Property("Password"); + + b.Property("Phone"); + + b.Property("Role"); + + b.Property("Username") + .HasMaxLength(20) + .IsUnicode(false); + + b.HasKey("ID"); + + b.HasIndex("BoatID"); + + b.ToTable("CrewMembers"); + + b.HasData( + new { ID = 1, BoatID = 1, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "AdamDavis@G.Com", FirstName = "Adam", LastName = "Davis", Password = "dadas", Phone = "14521256", Role = 0, Username = "Captin Davis" }, + new { ID = 2, BoatID = 1, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "JoBob@G.Com", FirstName = "Jo", LastName = "Bob", Password = "dadas", Phone = "14521256", Role = 1, Username = "Enginer Jo" }, + new { ID = 3, BoatID = 1, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "PhillCrack@G.Com", FirstName = "Phill", LastName = "Crack", Password = "dadas", Phone = "14521256", Role = 3, Username = "Recover Phill" }, + new { ID = 4, BoatID = 2, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "PatY@G.Com", FirstName = "Patrick", LastName = "Yang", Password = "dadas", Phone = "14521256", Role = 0, Username = "Captin Yang" }, + new { ID = 5, BoatID = 2, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "ChanBing@G.Com", FirstName = "Chandler", LastName = "Bing", Password = "dadas", Phone = "14521256", Role = 1, Username = "Enginer Bing" }, + new { ID = 6, BoatID = 2, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "JoeyT@G.Com", FirstName = "Joey", LastName = "Trib", Password = "dadas", Phone = "14521256", Role = 3, Username = "Recover Joey" }, + new { ID = 7, BoatID = 3, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "KeirenN@G.Com", FirstName = "Keiren", LastName = "Norman", Password = "dadas", Phone = "14521256", Role = 0, Username = "Captin Norman" }, + new { ID = 8, BoatID = 3, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "MirzaK@G.Com", FirstName = "Mirza", LastName = "Kirby", Password = "dadas", Phone = "14521256", Role = 1, Username = "Enginer Kirby" }, + new { ID = 9, BoatID = 3, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "JoeyT@G.Com", FirstName = "Jumpman", LastName = "Mario", Password = "dadas", Phone = "14521256", Role = 3, Username = "Recover Mario" }, + new { ID = 10, BoatID = 4, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "ZeldaL@G.Com", FirstName = "Zelda", LastName = "Link", Password = "dadas", Phone = "14521256", Role = 0, Username = "Captin Zelda" }, + new { ID = 11, BoatID = 4, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "Ganon@G.Com", FirstName = "Ganon", LastName = "Dorf", Password = "dadas", Phone = "14521256", Role = 1, Username = "Enginer Ganon" }, + new { ID = 12, BoatID = 4, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "DK@G.Com", FirstName = "Donkey", LastName = "Kong", Password = "dadas", Phone = "14521256", Role = 3, Username = "Recover DK" }, + new { ID = 13, BoatID = 5, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "SimonB@G.Com", FirstName = "Simon", LastName = "Belmont", Password = "dadas", Phone = "14521256", Role = 0, Username = "Captin Simon" }, + new { ID = 14, BoatID = 5, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "RichterB@G.Com", FirstName = "Richter", LastName = "Belmont", Password = "dadas", Phone = "14521256", Role = 1, Username = "Enginer Richter" }, + new { ID = 15, BoatID = 5, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "ChrisL@G.Com", FirstName = "Chris", LastName = "Lee", Password = "dadas", Phone = "14521256", Role = 3, Username = "Recover Lee" }, + new { ID = 16, BoatID = 6, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "FalconP@G.Com", FirstName = "Falcon", LastName = "Punch", Password = "dadas", Phone = "14521256", Role = 0, Username = "Captin Falcon" }, + new { ID = 17, BoatID = 6, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "StarF@G.Com", FirstName = "Star", LastName = "Fox", Password = "dadas", Phone = "14521256", Role = 1, Username = "Enginer Fox" }, + new { ID = 18, BoatID = 6, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "FalcoStar@G.Com", FirstName = "Star", LastName = "Falco", Password = "dadas", Phone = "14521256", Role = 3, Username = "Recover Falco" } + ); + }); + + modelBuilder.Entity("groupH_M32COM.Angular.Models.Event", b => + { + b.Property("ID") + .ValueGeneratedOnAdd(); + + b.Property("Description") + .IsRequired() + .HasMaxLength(100) + .IsUnicode(false); + + b.Property("End_Date"); + + b.Property("EventType"); + + b.Property("ImagePath"); + + b.Property("LocationID"); + + b.Property("StartDate"); + + b.Property("WinningBoatId"); + + b.HasKey("ID"); + + b.HasIndex("LocationID"); + + b.HasIndex("WinningBoatId"); + + b.ToTable("Events"); + + b.HasData( + new { ID = 1, Description = "3-Day long ELECTRIC MOTOR powered boats race at well-known and beautiful BoatLand of Coventry, UK. The event is made of 6 phases at the end of which the boat with the maximum points will be declared winner. Unique prizes specially set for that unique event!!", End_Date = new DateTime(2019, 3, 27, 23, 59, 59, 0, DateTimeKind.Unspecified), EventType = 0, ImagePath = "images/Motor Boat Race2.png", LocationID = 1, StartDate = new DateTime(2019, 3, 25, 9, 0, 0, 0, DateTimeKind.Unspecified), WinningBoatId = 1 }, + new { ID = 2, Description = "3-Day and half long ROW ENGINE powered boats race in the warm waters of BirmimBoatMania aquarium of Birmingham, UK. Made of 6 phases where the 4 boats with the maximum points will be compete in the finals for the first place. It is a winner takes all event!!", End_Date = new DateTime(2019, 3, 29, 23, 59, 59, 0, DateTimeKind.Unspecified), EventType = 0, ImagePath = "images/RowBoat2.jpg", LocationID = 2, StartDate = new DateTime(2019, 3, 26, 12, 0, 0, 0, DateTimeKind.Unspecified), WinningBoatId = 2 }, + new { ID = 3, Description = "Half-A-Day long ELECTRIC MOTOR powered boats race in the savage waters of BrightonBlue resort of Brighton, UK.Selection and Finals phases would take place during the event.Rough selections forecast as nothing less than perfect would go through!", End_Date = new DateTime(2019, 3, 28, 19, 59, 59, 0, DateTimeKind.Unspecified), EventType = 0, ImagePath = "images/Motor Boat Race.png", LocationID = 3, StartDate = new DateTime(2019, 3, 28, 13, 0, 0, 0, DateTimeKind.Unspecified), WinningBoatId = 3 }, + new { ID = 4, Description = "2-Day ROW ENGINE powered boats race in the famous Thames of London, UK.Relaxed event of 4 phases, the reward would be fun, friendship, solidarity, and contribution to Non Profit Organisations.Come along with all your folks!!", End_Date = new DateTime(2019, 3, 27, 19, 59, 59, 0, DateTimeKind.Unspecified), EventType = 0, ImagePath = "images/RowBoat3.jpg", LocationID = 4, StartDate = new DateTime(2019, 3, 26, 8, 0, 0, 0, DateTimeKind.Unspecified), WinningBoatId = 4 }, + new { ID = 5, Description = "4-Hours long SAILBOATS race in the warm waters of BirmimBoatMania aquarium of Birmingham, UK. Relaxed event of 2 phases along with the winds, the reward would be fun, friendship, solidarity, and contribution to Non Profit Organisations. Event opened to everybody! Come have some fun!!", End_Date = new DateTime(2019, 3, 29, 15, 59, 59, 0, DateTimeKind.Unspecified), EventType = 0, ImagePath = "images/Sailboat Race event.png", LocationID = 5, StartDate = new DateTime(2019, 3, 29, 11, 0, 0, 0, DateTimeKind.Unspecified), WinningBoatId = 5 }, + new { ID = 6, Description = "Half-A-Day long SOLAR powered boats race in the fierce waters of the sunny BoatPit of Derby, UK. Selection and Finals phases would take place during the event. Can your boat tame those waters and the sunlight to be the best?!", End_Date = new DateTime(2019, 3, 30, 15, 59, 59, 0, DateTimeKind.Unspecified), EventType = 0, ImagePath = "images/SolarBoat1.jpg", LocationID = 6, StartDate = new DateTime(2019, 3, 30, 10, 0, 0, 0, DateTimeKind.Unspecified), WinningBoatId = 6 } + ); + }); + + modelBuilder.Entity("groupH_M32COM.Angular.Models.EventDetailBoat", b => + { + b.Property("EventId"); + + b.Property("BoatId"); + + b.Property("BoatPosition"); + + b.HasKey("EventId", "BoatId"); + + b.HasIndex("BoatId"); + + b.ToTable("EventDetailBoat"); + + b.HasData( + new { EventId = 1, BoatId = 1, BoatPosition = 0 }, + new { EventId = 2, BoatId = 2, BoatPosition = 0 }, + new { EventId = 3, BoatId = 3, BoatPosition = 0 }, + new { EventId = 4, BoatId = 4, BoatPosition = 0 }, + new { EventId = 5, BoatId = 5, BoatPosition = 0 }, + new { EventId = 6, BoatId = 6, BoatPosition = 0 } + ); + }); + + modelBuilder.Entity("groupH_M32COM.Angular.Models.EventDetailPrizes", b => + { + b.Property("EventId"); + + b.Property("PrizeId"); + + b.HasKey("EventId", "PrizeId"); + + b.HasIndex("PrizeId"); + + b.ToTable("EventDetailPrizes"); + + b.HasData( + new { EventId = 1, PrizeId = 1 }, + new { EventId = 1, PrizeId = 7 }, + new { EventId = 1, PrizeId = 8 }, + new { EventId = 2, PrizeId = 2 }, + new { EventId = 2, PrizeId = 9 }, + new { EventId = 2, PrizeId = 10 }, + new { EventId = 3, PrizeId = 3 }, + new { EventId = 4, PrizeId = 4 }, + new { EventId = 5, PrizeId = 5 }, + new { EventId = 6, PrizeId = 6 } + ); + }); + + modelBuilder.Entity("groupH_M32COM.Angular.Models.EventDetailPromotion", b => + { + b.Property("EventId"); + + b.Property("PromotionId"); + + b.HasKey("EventId", "PromotionId"); + + b.HasIndex("PromotionId"); + + b.ToTable("EventDetailPromotion"); + + b.HasData( + new { EventId = 1, PromotionId = 1 }, + new { EventId = 2, PromotionId = 1 }, + new { EventId = 4, PromotionId = 1 }, + new { EventId = 2, PromotionId = 2 }, + new { EventId = 3, PromotionId = 3 }, + new { EventId = 4, PromotionId = 4 }, + new { EventId = 4, PromotionId = 5 }, + new { EventId = 5, PromotionId = 5 }, + new { EventId = 6, PromotionId = 6 } + ); + }); + + modelBuilder.Entity("groupH_M32COM.Angular.Models.EventPrize", b => + { + b.Property("ID") + .ValueGeneratedOnAdd(); + + b.Property("Note") + .IsRequired() + .HasMaxLength(100); + + b.Property("PrizeMoney"); + + b.Property("WinningPosition"); + + b.HasKey("ID"); + + b.ToTable("EventPrizes"); + + b.HasData( + new { ID = 1, Note = "Fiirst gets 1000!! Just roar your boat Engine!!", PrizeMoney = 1000, WinningPosition = 0 }, + new { ID = 7, Note = "Second gets 750!!", PrizeMoney = 750, WinningPosition = 1 }, + new { ID = 8, Note = "Third gets 500!!", PrizeMoney = 500, WinningPosition = 2 }, + new { ID = 2, Note = "Need extra cash? Come and compete in this boat race!! Winner gets £2000", PrizeMoney = 2000, WinningPosition = 0 }, + new { ID = 9, Note = "Need extra cash? Come and compete in this boat race!! Second gets £1000", PrizeMoney = 1000, WinningPosition = 1 }, + new { ID = 10, Note = "Need extra cash? Come and compete in this boat race!! Third gets £500", PrizeMoney = 500, WinningPosition = 2 }, + new { ID = 3, Note = "Show your strength and win cash!!", PrizeMoney = 1500, WinningPosition = 0 }, + new { ID = 4, Note = "This annual event gives out the best prize!! £3000 as donation to Non-profit organisations in the name of the winner", PrizeMoney = 3000, WinningPosition = 0 }, + new { ID = 5, Note = "Show off your ability to ride that boat and help Non-profit Associations with the prize!!", PrizeMoney = 1000, WinningPosition = 0 }, + new { ID = 6, Note = "Have a boat but no place to show off? We got a place for you.", PrizeMoney = 2000, WinningPosition = 0 } + ); + }); + + modelBuilder.Entity("groupH_M32COM.Angular.Models.Location", b => + { + b.Property("ID") + .ValueGeneratedOnAdd(); + + b.Property("City") + .IsRequired() + .HasMaxLength(100); + + b.Property("Country") + .IsRequired() + .HasMaxLength(100); + + b.Property("PostCode") + .IsRequired() + .HasMaxLength(100); + + b.Property("imagePath"); + + b.HasKey("ID"); + + b.ToTable("Locations"); + + b.HasData( + new { ID = 1, City = "Coventry", Country = "England", PostCode = "cv19ll", imagePath = "images/Location.png" }, + new { ID = 2, City = "Birmingham", Country = "England", PostCode = "b11aa", imagePath = "images/Location5.png" }, + new { ID = 3, City = "Brighton", Country = "England", PostCode = "bn1ae", imagePath = "images/Location2.png" }, + new { ID = 4, City = "London", Country = "England", PostCode = "e17ae", imagePath = "images/Location7.png" }, + new { ID = 5, City = "Birmingham", Country = "England", PostCode = "b11aa", imagePath = "images/Location8.png" }, + new { ID = 6, City = "Derby", Country = "England", PostCode = "de10aq", imagePath = "images/Location4.png" } + ); + }); + + modelBuilder.Entity("groupH_M32COM.Angular.Models.Promotion", b => + { + b.Property("ID") + .ValueGeneratedOnAdd(); + + b.Property("ContactNumber") + .IsRequired(); + + b.Property("Description") + .IsRequired() + .HasMaxLength(100) + .IsUnicode(false); + + b.Property("ImagePath"); + + b.Property("PromotionType"); + + b.Property("PromotionalManagerName") + .IsRequired(); + + b.Property("SponsorID"); + + b.HasKey("ID"); + + b.HasIndex("SponsorID"); + + b.ToTable("Promotions"); + + b.HasData( + new { ID = 1, ContactNumber = "54654654", Description = "You can be the winner!!", ImagePath = "images/Promo Spons7.png", PromotionType = 0, PromotionalManagerName = "Timmy" }, + new { ID = 2, ContactNumber = "123123123", Description = "Just do it!", ImagePath = "images/Promo Spons4.png", PromotionType = 0, PromotionalManagerName = "Jimmy" }, + new { ID = 3, ContactNumber = "789789789", Description = "Impossible Is Nothing, you are the winner", ImagePath = "images/Promo Spons5.png", PromotionType = 0, PromotionalManagerName = "Bimmy" }, + new { ID = 4, ContactNumber = "147147147", Description = "Teamwork makes the dream work", ImagePath = "images/Promo Spons2.png", PromotionType = 0, PromotionalManagerName = "Clyde" }, + new { ID = 5, ContactNumber = "258258258", Description = "Luck is what happens when preparation meets opportunity.", ImagePath = "images/Promo Spons3.png", PromotionType = 0, PromotionalManagerName = "Pinky" }, + new { ID = 6, ContactNumber = "54654654", Description = "Be the king of boat race!!", ImagePath = "images/Power Boat Promo.png", PromotionType = 0, PromotionalManagerName = "Jimmy" } + ); + }); + + modelBuilder.Entity("groupH_M32COM.Angular.Models.SponsorShip", b => + { + b.Property("ID") + .ValueGeneratedOnAdd(); + + b.Property("CompanyName") + .IsRequired() + .HasMaxLength(100); + + b.Property("SponsorAmount"); + + b.Property("imagePath"); + + b.HasKey("ID"); + + b.ToTable("SponsorShips"); + + b.HasData( + new { ID = 1, CompanyName = "McDonald's", SponsorAmount = 5000 }, + new { ID = 2, CompanyName = "Costa", SponsorAmount = 2000 }, + new { ID = 3, CompanyName = "Tesco", SponsorAmount = 3000 }, + new { ID = 4, CompanyName = "Pepsi", SponsorAmount = 5000 }, + new { ID = 5, CompanyName = "Sainsbury's", SponsorAmount = 2000 }, + new { ID = 6, CompanyName = "KFC", SponsorAmount = 3000 } + ); + }); + + modelBuilder.Entity("groupH_M32COM.Angular.Models.CrewMember", b => + { + b.HasOne("groupH_M32COM.Angular.Models.Boat", "Boat") + .WithMany("CrewMembers") + .HasForeignKey("BoatID") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("groupH_M32COM.Angular.Models.Event", b => + { + b.HasOne("groupH_M32COM.Angular.Models.Location", "Location") + .WithMany() + .HasForeignKey("LocationID") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("groupH_M32COM.Angular.Models.Boat", "WinningBoat") + .WithMany() + .HasForeignKey("WinningBoatId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("groupH_M32COM.Angular.Models.EventDetailBoat", b => + { + b.HasOne("groupH_M32COM.Angular.Models.Boat", "Boat") + .WithMany("EventBoats") + .HasForeignKey("BoatId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("groupH_M32COM.Angular.Models.Event", "Event") + .WithMany("EventBoats") + .HasForeignKey("EventId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("groupH_M32COM.Angular.Models.EventDetailPrizes", b => + { + b.HasOne("groupH_M32COM.Angular.Models.Event", "Event") + .WithMany("EventPrizes") + .HasForeignKey("EventId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("groupH_M32COM.Angular.Models.EventPrize", "Prize") + .WithMany("EventPrizes") + .HasForeignKey("PrizeId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("groupH_M32COM.Angular.Models.EventDetailPromotion", b => + { + b.HasOne("groupH_M32COM.Angular.Models.Event", "Event") + .WithMany("EventPromotions") + .HasForeignKey("EventId") + .OnDelete(DeleteBehavior.Cascade); + + b.HasOne("groupH_M32COM.Angular.Models.Promotion", "Promotion") + .WithMany("EventPromotions") + .HasForeignKey("PromotionId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("groupH_M32COM.Angular.Models.Promotion", b => + { + b.HasOne("groupH_M32COM.Angular.Models.SponsorShip", "Sponsor") + .WithMany() + .HasForeignKey("SponsorID"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Code/groupH_M32COM.Angular/Migrations/20190325150337_fourth.cs b/Code/groupH_M32COM.Angular/Migrations/20190325150337_fourth.cs new file mode 100644 index 0000000..d398570 --- /dev/null +++ b/Code/groupH_M32COM.Angular/Migrations/20190325150337_fourth.cs @@ -0,0 +1,266 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace groupH_M32COM.Angular.Migrations +{ + public partial class fourth : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 1, + column: "DOB", + value: new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 2, + column: "DOB", + value: new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 3, + column: "DOB", + value: new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 4, + column: "DOB", + value: new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 5, + column: "DOB", + value: new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 6, + column: "DOB", + value: new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 7, + column: "DOB", + value: new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 8, + column: "DOB", + value: new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 9, + column: "DOB", + value: new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 10, + column: "DOB", + value: new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 11, + column: "DOB", + value: new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 12, + column: "DOB", + value: new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 13, + column: "DOB", + value: new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 14, + column: "DOB", + value: new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 15, + column: "DOB", + value: new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 16, + column: "DOB", + value: new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 17, + column: "DOB", + value: new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 18, + column: "DOB", + value: new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local)); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 1, + column: "DOB", + value: new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 2, + column: "DOB", + value: new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 3, + column: "DOB", + value: new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 4, + column: "DOB", + value: new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 5, + column: "DOB", + value: new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 6, + column: "DOB", + value: new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 7, + column: "DOB", + value: new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 8, + column: "DOB", + value: new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 9, + column: "DOB", + value: new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 10, + column: "DOB", + value: new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 11, + column: "DOB", + value: new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 12, + column: "DOB", + value: new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 13, + column: "DOB", + value: new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 14, + column: "DOB", + value: new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 15, + column: "DOB", + value: new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 16, + column: "DOB", + value: new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 17, + column: "DOB", + value: new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local)); + + migrationBuilder.UpdateData( + table: "CrewMembers", + keyColumn: "ID", + keyValue: 18, + column: "DOB", + value: new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local)); + } + } +} diff --git a/Code/groupH_M32COM.Angular/Migrations/RCBoatDBContextModelSnapshot.cs b/Code/groupH_M32COM.Angular/Migrations/RCBoatDBContextModelSnapshot.cs index f1eb5da..b6a4fa8 100644 --- a/Code/groupH_M32COM.Angular/Migrations/RCBoatDBContextModelSnapshot.cs +++ b/Code/groupH_M32COM.Angular/Migrations/RCBoatDBContextModelSnapshot.cs @@ -83,24 +83,24 @@ namespace groupH_M32COM.Angular.Migrations b.ToTable("CrewMembers"); b.HasData( - new { ID = 1, BoatID = 1, DOB = new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local), Email = "AdamDavis@G.Com", FirstName = "Adam", LastName = "Davis", Password = "dadas", Phone = "14521256", Role = 0, Username = "Captin Davis" }, - new { ID = 2, BoatID = 1, DOB = new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local), Email = "JoBob@G.Com", FirstName = "Jo", LastName = "Bob", Password = "dadas", Phone = "14521256", Role = 1, Username = "Enginer Jo" }, - new { ID = 3, BoatID = 1, DOB = new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local), Email = "PhillCrack@G.Com", FirstName = "Phill", LastName = "Crack", Password = "dadas", Phone = "14521256", Role = 3, Username = "Recover Phill" }, - new { ID = 4, BoatID = 2, DOB = new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local), Email = "PatY@G.Com", FirstName = "Patrick", LastName = "Yang", Password = "dadas", Phone = "14521256", Role = 0, Username = "Captin Yang" }, - new { ID = 5, BoatID = 2, DOB = new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local), Email = "ChanBing@G.Com", FirstName = "Chandler", LastName = "Bing", Password = "dadas", Phone = "14521256", Role = 1, Username = "Enginer Bing" }, - new { ID = 6, BoatID = 2, DOB = new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local), Email = "JoeyT@G.Com", FirstName = "Joey", LastName = "Trib", Password = "dadas", Phone = "14521256", Role = 3, Username = "Recover Joey" }, - new { ID = 7, BoatID = 3, DOB = new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local), Email = "KeirenN@G.Com", FirstName = "Keiren", LastName = "Norman", Password = "dadas", Phone = "14521256", Role = 0, Username = "Captin Norman" }, - new { ID = 8, BoatID = 3, DOB = new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local), Email = "MirzaK@G.Com", FirstName = "Mirza", LastName = "Kirby", Password = "dadas", Phone = "14521256", Role = 1, Username = "Enginer Kirby" }, - new { ID = 9, BoatID = 3, DOB = new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local), Email = "JoeyT@G.Com", FirstName = "Jumpman", LastName = "Mario", Password = "dadas", Phone = "14521256", Role = 3, Username = "Recover Mario" }, - new { ID = 10, BoatID = 4, DOB = new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local), Email = "ZeldaL@G.Com", FirstName = "Zelda", LastName = "Link", Password = "dadas", Phone = "14521256", Role = 0, Username = "Captin Zelda" }, - new { ID = 11, BoatID = 4, DOB = new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local), Email = "Ganon@G.Com", FirstName = "Ganon", LastName = "Dorf", Password = "dadas", Phone = "14521256", Role = 1, Username = "Enginer Ganon" }, - new { ID = 12, BoatID = 4, DOB = new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local), Email = "DK@G.Com", FirstName = "Donkey", LastName = "Kong", Password = "dadas", Phone = "14521256", Role = 3, Username = "Recover DK" }, - new { ID = 13, BoatID = 5, DOB = new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local), Email = "SimonB@G.Com", FirstName = "Simon", LastName = "Belmont", Password = "dadas", Phone = "14521256", Role = 0, Username = "Captin Simon" }, - new { ID = 14, BoatID = 5, DOB = new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local), Email = "RichterB@G.Com", FirstName = "Richter", LastName = "Belmont", Password = "dadas", Phone = "14521256", Role = 1, Username = "Enginer Richter" }, - new { ID = 15, BoatID = 5, DOB = new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local), Email = "ChrisL@G.Com", FirstName = "Chris", LastName = "Lee", Password = "dadas", Phone = "14521256", Role = 3, Username = "Recover Lee" }, - new { ID = 16, BoatID = 6, DOB = new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local), Email = "FalconP@G.Com", FirstName = "Falcon", LastName = "Punch", Password = "dadas", Phone = "14521256", Role = 0, Username = "Captin Falcon" }, - new { ID = 17, BoatID = 6, DOB = new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local), Email = "StarF@G.Com", FirstName = "Star", LastName = "Fox", Password = "dadas", Phone = "14521256", Role = 1, Username = "Enginer Fox" }, - new { ID = 18, BoatID = 6, DOB = new DateTime(2019, 3, 25, 14, 35, 34, 871, DateTimeKind.Local), Email = "FalcoStar@G.Com", FirstName = "Star", LastName = "Falco", Password = "dadas", Phone = "14521256", Role = 3, Username = "Recover Falco" } + new { ID = 1, BoatID = 1, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "AdamDavis@G.Com", FirstName = "Adam", LastName = "Davis", Password = "dadas", Phone = "14521256", Role = 0, Username = "Captin Davis" }, + new { ID = 2, BoatID = 1, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "JoBob@G.Com", FirstName = "Jo", LastName = "Bob", Password = "dadas", Phone = "14521256", Role = 1, Username = "Enginer Jo" }, + new { ID = 3, BoatID = 1, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "PhillCrack@G.Com", FirstName = "Phill", LastName = "Crack", Password = "dadas", Phone = "14521256", Role = 3, Username = "Recover Phill" }, + new { ID = 4, BoatID = 2, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "PatY@G.Com", FirstName = "Patrick", LastName = "Yang", Password = "dadas", Phone = "14521256", Role = 0, Username = "Captin Yang" }, + new { ID = 5, BoatID = 2, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "ChanBing@G.Com", FirstName = "Chandler", LastName = "Bing", Password = "dadas", Phone = "14521256", Role = 1, Username = "Enginer Bing" }, + new { ID = 6, BoatID = 2, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "JoeyT@G.Com", FirstName = "Joey", LastName = "Trib", Password = "dadas", Phone = "14521256", Role = 3, Username = "Recover Joey" }, + new { ID = 7, BoatID = 3, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "KeirenN@G.Com", FirstName = "Keiren", LastName = "Norman", Password = "dadas", Phone = "14521256", Role = 0, Username = "Captin Norman" }, + new { ID = 8, BoatID = 3, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "MirzaK@G.Com", FirstName = "Mirza", LastName = "Kirby", Password = "dadas", Phone = "14521256", Role = 1, Username = "Enginer Kirby" }, + new { ID = 9, BoatID = 3, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "JoeyT@G.Com", FirstName = "Jumpman", LastName = "Mario", Password = "dadas", Phone = "14521256", Role = 3, Username = "Recover Mario" }, + new { ID = 10, BoatID = 4, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "ZeldaL@G.Com", FirstName = "Zelda", LastName = "Link", Password = "dadas", Phone = "14521256", Role = 0, Username = "Captin Zelda" }, + new { ID = 11, BoatID = 4, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "Ganon@G.Com", FirstName = "Ganon", LastName = "Dorf", Password = "dadas", Phone = "14521256", Role = 1, Username = "Enginer Ganon" }, + new { ID = 12, BoatID = 4, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "DK@G.Com", FirstName = "Donkey", LastName = "Kong", Password = "dadas", Phone = "14521256", Role = 3, Username = "Recover DK" }, + new { ID = 13, BoatID = 5, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "SimonB@G.Com", FirstName = "Simon", LastName = "Belmont", Password = "dadas", Phone = "14521256", Role = 0, Username = "Captin Simon" }, + new { ID = 14, BoatID = 5, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "RichterB@G.Com", FirstName = "Richter", LastName = "Belmont", Password = "dadas", Phone = "14521256", Role = 1, Username = "Enginer Richter" }, + new { ID = 15, BoatID = 5, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "ChrisL@G.Com", FirstName = "Chris", LastName = "Lee", Password = "dadas", Phone = "14521256", Role = 3, Username = "Recover Lee" }, + new { ID = 16, BoatID = 6, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "FalconP@G.Com", FirstName = "Falcon", LastName = "Punch", Password = "dadas", Phone = "14521256", Role = 0, Username = "Captin Falcon" }, + new { ID = 17, BoatID = 6, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "StarF@G.Com", FirstName = "Star", LastName = "Fox", Password = "dadas", Phone = "14521256", Role = 1, Username = "Enginer Fox" }, + new { ID = 18, BoatID = 6, DOB = new DateTime(2019, 3, 25, 15, 3, 36, 883, DateTimeKind.Local), Email = "FalcoStar@G.Com", FirstName = "Star", LastName = "Falco", Password = "dadas", Phone = "14521256", Role = 3, Username = "Recover Falco" } ); }); diff --git a/Code/groupH_M32COM.Angular/localdatabase.db b/Code/groupH_M32COM.Angular/localdatabase.db index acd638a0182b65824553813b8f897b8006ba170f..5a824da76a3f9771fb6feaab78a9357866d03852 100644 GIT binary patch delta 432 zcmZoTz}9epZGtqT&qNt#MxTudOZa(M_+1$IFYqtqFXngIEGS^YudmC(Y;JC3U}$Mz zY-DO^YG7<^9-o$9T2zu@q-UsSpY-C_zy17_>q5#mCnGF2T_|Ncf z=AXG)(4doFN|M=}5vwUIn>X91L~)y185mm`o9S6t7*AH3<%`0vn&pVXKQ_xBg|9H% z1BG8a+Yg0*22Eam4yt^`9B&l$=jOPg@a5)uqVS8*_{Zk@pvcS43r68r&qHRYOZd5%`HLC&FYqtqFWy|JkjlTgSbm}aP;fH?|1@T=#cy6@aPRR5{XN42kPK8pLA M&(EKJem