From 84bf47da8af3eab73e1bfcc9808d5dbf5eab84f4 Mon Sep 17 00:00:00 2001
From: Paul Schneider
Date: Mon, 2 Jan 2017 19:11:13 +0100
Subject: [PATCH 1/8] orthographe
---
Yavsc/Views/SIRENExceptions/Index.cshtml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Yavsc/Views/SIRENExceptions/Index.cshtml b/Yavsc/Views/SIRENExceptions/Index.cshtml
index ee5b3bce..b5b34efb 100644
--- a/Yavsc/Views/SIRENExceptions/Index.cshtml
+++ b/Yavsc/Views/SIRENExceptions/Index.cshtml
@@ -5,7 +5,7 @@
- | Exceptions à la validation des code SIREN |
+ Exceptions à la validation des codes SIREN |
@foreach (var item in Model) {
From 05ab38c9452265513532cb6664c25ba4ad1c7266 Mon Sep 17 00:00:00 2001
From: Paul Schneider
Date: Thu, 5 Jan 2017 14:29:46 +0100
Subject: [PATCH 2/8] fixes a bug in such Pdf generation
---
Yavsc/Helpers/TeXHelpers.cs | 48 ++++++++++++++++++-------------------
1 file changed, 23 insertions(+), 25 deletions(-)
diff --git a/Yavsc/Helpers/TeXHelpers.cs b/Yavsc/Helpers/TeXHelpers.cs
index e3c77559..d0404486 100644
--- a/Yavsc/Helpers/TeXHelpers.cs
+++ b/Yavsc/Helpers/TeXHelpers.cs
@@ -14,7 +14,19 @@ namespace Yavsc.Helpers
public class TeXString : HtmlString
{
- public class Replacement
+ public TeXString(TeXString teXString): base(teXString.ToString())
+ {
+ }
+
+ public TeXString(string str) : base(str)
+ {
+
+
+ }
+
+
+ }
+ public class Replacement
{
string target;
string replacement;
@@ -28,8 +40,9 @@ namespace Yavsc.Helpers
return source.Replace(target, replacement);
}
}
-
- public readonly static Replacement[] SpecialCharsRendering =
+ public static class TeXHelpers
+ {
+ public static readonly Replacement[] SpecialCharsRendering =
{
new Replacement("<","\\textless"),
new Replacement(">","\\textgreater"),
@@ -54,26 +67,16 @@ namespace Yavsc.Helpers
new Replacement("†","\\dag"),
new Replacement("–","\\textendash")
};
-
- public TeXString(string str) : base(TR(str))
- {
-
-
- }
- private static string TR(string source)
+
+ public static TeXString ToTeX(this string source)
{
string result=source;
foreach (var r in SpecialCharsRendering)
{
result = r.Execute(result);
}
- return result;
+ return new TeXString(result);
}
-
- }
-
- public static class TeXHelpers
- {
public static string NewLinesWith(this string target, string separator)
{
var items = target.Split(new char[] { '\n' }).Where(
@@ -85,19 +88,14 @@ namespace Yavsc.Helpers
public static TeXString ToTeX(this string target, string lineSeparator = "\n\\\\")
{
if (target == null) return null;
- return new TeXString(target.NewLinesWith(lineSeparator));
+ return new TeXString( target.ToTeX().ToString().NewLinesWith(lineSeparator) );
}
- public static HtmlString SplitAddressToTeX (this string target)
+ public static TeXString SplitAddressToTeX (this string target)
{
var alines = target.Split(',');
- var texlines = alines.Select(l=>new TeXString(l));
- StringBuilder sb = new StringBuilder();
- foreach (var l in texlines)
- {
- sb.AppendFormat("{0}\\\\\n",l.ToString());
- }
- return new HtmlString(sb.ToString());
+ var texlines = alines.Select(l=>l.ToTeX().ToString());
+ return new TeXString(string.Join("\\\\\n",texlines));
}
public static bool GenerateEstimatePdf(this PdfGenerationViewModel Model)
From 976b59beee06e00423c637b44018dfd0c9c4211e Mon Sep 17 00:00:00 2001
From: Paul Schneider
Date: Fri, 6 Jan 2017 14:02:17 +0100
Subject: [PATCH 3/8] profiles dj, musicien, formation
---
.../ApiControllers/DjProfileApiController.cs | 14 +
Yavsc/ApiControllers/ProfileApiController.cs | 20 +
Yavsc/Controllers/ActivityController.cs | 59 +-
Yavsc/Controllers/InstrumentsController.cs | 121 +++
...28_WFActivityParentAndProfiles.Designer.cs | 908 +++++++++++++++++
...70106092028_WFActivityParentAndProfiles.cs | 286 ++++++
.../20170106113614_ownerProfile.Designer.cs | 915 +++++++++++++++++
.../Migrations/20170106113614_ownerProfile.cs | 292 ++++++
.../20170106122307_Instruments.Designer.cs | 927 ++++++++++++++++++
.../Migrations/20170106122307_Instruments.cs | 286 ++++++
...20170106124548_instrumentation.Designer.cs | 927 ++++++++++++++++++
.../20170106124548_instrumentation.cs | 273 ++++++
.../ApplicationDbContextModelSnapshot.cs | 31 +-
Yavsc/Models/ApplicationDbContext.cs | 2 +
Yavsc/Models/Booking/Instrument.cs | 15 +
Yavsc/Models/Booking/InstrumentRating.cs | 20 +
Yavsc/Models/Booking/MusicalPreference.cs | 7 +-
.../Booking/Profiles/DjPerformerProfile.cs | 15 +
.../Profiles/FormationPerformerProfile.cs | 12 +
.../Profiles/MusicianPerformerProfile.cs | 14 +
Yavsc/Models/Workflow/Activity.cs | 9 +
Yavsc/Models/Workflow/CoWorking.cs | 20 +
.../Yavsc.Resources.YavscLocalisation.fr.resx | 2 +-
Yavsc/Views/Activity/Create.cshtml | 8 +
Yavsc/Views/Activity/Edit.cshtml | 30 +-
Yavsc/Views/Activity/Index.cshtml | 14 +-
Yavsc/Views/Instruments/Create.cshtml | 32 +
Yavsc/Views/Instruments/Delete.cshtml | 28 +
Yavsc/Views/Instruments/Details.cshtml | 24 +
Yavsc/Views/Instruments/Edit.cshtml | 33 +
Yavsc/Views/Instruments/Index.cshtml | 32 +
Yavsc/Views/Manage/ManageLogins.cshtml | 1 +
Yavsc/Views/Shared/_Layout.cshtml | 2 +-
Yavsc/tasks.todo | 3 +
Yavsc/wwwroot/images/booking/mike_b2.jpg | Bin 350044 -> 380910 bytes
35 files changed, 5364 insertions(+), 18 deletions(-)
create mode 100644 Yavsc/ApiControllers/DjProfileApiController.cs
create mode 100644 Yavsc/ApiControllers/ProfileApiController.cs
create mode 100644 Yavsc/Controllers/InstrumentsController.cs
create mode 100644 Yavsc/Migrations/20170106092028_WFActivityParentAndProfiles.Designer.cs
create mode 100644 Yavsc/Migrations/20170106092028_WFActivityParentAndProfiles.cs
create mode 100644 Yavsc/Migrations/20170106113614_ownerProfile.Designer.cs
create mode 100644 Yavsc/Migrations/20170106113614_ownerProfile.cs
create mode 100644 Yavsc/Migrations/20170106122307_Instruments.Designer.cs
create mode 100644 Yavsc/Migrations/20170106122307_Instruments.cs
create mode 100644 Yavsc/Migrations/20170106124548_instrumentation.Designer.cs
create mode 100644 Yavsc/Migrations/20170106124548_instrumentation.cs
create mode 100644 Yavsc/Models/Booking/Instrument.cs
create mode 100644 Yavsc/Models/Booking/InstrumentRating.cs
create mode 100644 Yavsc/Models/Booking/Profiles/DjPerformerProfile.cs
create mode 100644 Yavsc/Models/Booking/Profiles/FormationPerformerProfile.cs
create mode 100644 Yavsc/Models/Booking/Profiles/MusicianPerformerProfile.cs
create mode 100644 Yavsc/Models/Workflow/CoWorking.cs
create mode 100644 Yavsc/Views/Instruments/Create.cshtml
create mode 100644 Yavsc/Views/Instruments/Delete.cshtml
create mode 100644 Yavsc/Views/Instruments/Details.cshtml
create mode 100644 Yavsc/Views/Instruments/Edit.cshtml
create mode 100644 Yavsc/Views/Instruments/Index.cshtml
diff --git a/Yavsc/ApiControllers/DjProfileApiController.cs b/Yavsc/ApiControllers/DjProfileApiController.cs
new file mode 100644
index 00000000..3a252d34
--- /dev/null
+++ b/Yavsc/ApiControllers/DjProfileApiController.cs
@@ -0,0 +1,14 @@
+using Yavsc.Models;
+using Yavsc.Models.Booking;
+using Yavsc.Models.Workflow;
+
+namespace Yavsc.ApiControllers
+{
+ public class DjProfileApiController : ProfileApiController
+ {
+ public DjProfileApiController(ApplicationDbContext context) : base(context)
+ {
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/Yavsc/ApiControllers/ProfileApiController.cs b/Yavsc/ApiControllers/ProfileApiController.cs
new file mode 100644
index 00000000..ce09e44c
--- /dev/null
+++ b/Yavsc/ApiControllers/ProfileApiController.cs
@@ -0,0 +1,20 @@
+using System.Linq;
+using Microsoft.AspNet.Authorization;
+using Microsoft.AspNet.Mvc;
+using Yavsc.Models;
+using Yavsc.Models.Workflow;
+
+namespace Yavsc.ApiControllers
+{
+ [Produces("application/json"),Route("api/profile")]
+ public abstract class ProfileApiController : Controller where T : PerformerProfile
+ {
+ ApplicationDbContext dbContext;
+ public ProfileApiController(ApplicationDbContext context)
+ {
+ dbContext = context;
+ }
+
+
+ }
+}
\ No newline at end of file
diff --git a/Yavsc/Controllers/ActivityController.cs b/Yavsc/Controllers/ActivityController.cs
index 2e3ecdff..50f23f0e 100644
--- a/Yavsc/Controllers/ActivityController.cs
+++ b/Yavsc/Controllers/ActivityController.cs
@@ -1,18 +1,24 @@
+using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNet.Authorization;
using Microsoft.AspNet.Mvc;
+using Microsoft.AspNet.Mvc.Rendering;
+using Microsoft.Data.Entity;
+using Microsoft.Extensions.Localization;
using Yavsc.Models;
namespace Yavsc.Controllers
{
- [ServiceFilter(typeof(LanguageActionFilter)),Authorize("AdministratorOnly")]
+ [ServiceFilter(typeof(LanguageActionFilter)), Authorize("AdministratorOnly")]
public class ActivityController : Controller
{
private ApplicationDbContext _context;
+ IStringLocalizer SR;
- public ActivityController(ApplicationDbContext context)
+ public ActivityController(ApplicationDbContext context, IStringLocalizer SR)
{
_context = context;
+ this.SR = SR;
}
// GET: Activity
@@ -21,6 +27,53 @@ namespace Yavsc.Controllers
return View(_context.Activities.ToList());
}
+ private List GetEligibleParent(string code)
+ {
+ // eligibles are those
+ // who are not in descendants
+
+ //
+ var acts = _context.Activities.Where(
+ a=> a.Code != code
+ ).Select(a => new SelectListItem
+ {
+ Text = a.Name,
+ Value = a.Code
+ }).ToList();
+ acts.Add(new SelectListItem { Text=SR["aucun"], Value=null } );
+ if (code == null) return acts;
+ var existing = _context.Activities.Include(a => a.Children).FirstOrDefault(a => a.Code == code);
+ if (existing == null) return acts;
+ var pi = acts.FirstOrDefault(i=>i.Value==existing.ParentCode);
+ // Assert(pi!=null)
+ pi.Selected=true;
+ RecFilterChild(acts, existing);
+ return acts;
+ }
+
+ ///
+ /// Filters a activity selection list
+ /// in order to exculde any descendant
+ /// from the eligible list at the Parent property.
+ /// WARN! results in a infinite loop when
+ /// data is corrupted and there is a circularity
+ /// in the activity hierarchy graph (Parent/Children)
+ ///
+ ///
+ ///
+ private static void RecFilterChild(List list, Activity activity)
+ {
+ if (activity == null) return;
+ if (activity.Children == null) return;
+ if (list.Count==0) return;
+ foreach (var child in activity.Children)
+ {
+ RecFilterChild(list, child);
+ var rem = list.FirstOrDefault(i => i.Value == child.Code);
+ if (rem != null) list.Remove(rem);
+ }
+ }
+
// GET: Activity/Details/5
public IActionResult Details(string id)
{
@@ -41,6 +94,7 @@ namespace Yavsc.Controllers
// GET: Activity/Create
public IActionResult Create()
{
+ ViewBag.ParentCode = GetEligibleParent(null);
return View();
}
@@ -71,6 +125,7 @@ namespace Yavsc.Controllers
{
return HttpNotFound();
}
+ ViewBag.ParentCode = GetEligibleParent(id);
return View(activity);
}
diff --git a/Yavsc/Controllers/InstrumentsController.cs b/Yavsc/Controllers/InstrumentsController.cs
new file mode 100644
index 00000000..eae9f98a
--- /dev/null
+++ b/Yavsc/Controllers/InstrumentsController.cs
@@ -0,0 +1,121 @@
+using System.Linq;
+using Microsoft.AspNet.Mvc;
+using Microsoft.AspNet.Mvc.Rendering;
+using Microsoft.Data.Entity;
+using Yavsc.Models;
+using Yavsc.Models.Booking;
+
+namespace Yavsc.Controllers
+{
+ public class InstrumentsController : Controller
+ {
+ private ApplicationDbContext _context;
+
+ public InstrumentsController(ApplicationDbContext context)
+ {
+ _context = context;
+ }
+
+ // GET: Instruments
+ public IActionResult Index()
+ {
+ return View(_context.Instrument.ToList());
+ }
+
+ // GET: Instruments/Details/5
+ public IActionResult Details(long? id)
+ {
+ if (id == null)
+ {
+ return HttpNotFound();
+ }
+
+ Instrument instrument = _context.Instrument.Single(m => m.Id == id);
+ if (instrument == null)
+ {
+ return HttpNotFound();
+ }
+
+ return View(instrument);
+ }
+
+ // GET: Instruments/Create
+ public IActionResult Create()
+ {
+ return View();
+ }
+
+ // POST: Instruments/Create
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ public IActionResult Create(Instrument instrument)
+ {
+ if (ModelState.IsValid)
+ {
+ _context.Instrument.Add(instrument);
+ _context.SaveChanges();
+ return RedirectToAction("Index");
+ }
+ return View(instrument);
+ }
+
+ // GET: Instruments/Edit/5
+ public IActionResult Edit(long? id)
+ {
+ if (id == null)
+ {
+ return HttpNotFound();
+ }
+
+ Instrument instrument = _context.Instrument.Single(m => m.Id == id);
+ if (instrument == null)
+ {
+ return HttpNotFound();
+ }
+ return View(instrument);
+ }
+
+ // POST: Instruments/Edit/5
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ public IActionResult Edit(Instrument instrument)
+ {
+ if (ModelState.IsValid)
+ {
+ _context.Update(instrument);
+ _context.SaveChanges();
+ return RedirectToAction("Index");
+ }
+ return View(instrument);
+ }
+
+ // GET: Instruments/Delete/5
+ [ActionName("Delete")]
+ public IActionResult Delete(long? id)
+ {
+ if (id == null)
+ {
+ return HttpNotFound();
+ }
+
+ Instrument instrument = _context.Instrument.Single(m => m.Id == id);
+ if (instrument == null)
+ {
+ return HttpNotFound();
+ }
+
+ return View(instrument);
+ }
+
+ // POST: Instruments/Delete/5
+ [HttpPost, ActionName("Delete")]
+ [ValidateAntiForgeryToken]
+ public IActionResult DeleteConfirmed(long id)
+ {
+ Instrument instrument = _context.Instrument.Single(m => m.Id == id);
+ _context.Instrument.Remove(instrument);
+ _context.SaveChanges();
+ return RedirectToAction("Index");
+ }
+ }
+}
diff --git a/Yavsc/Migrations/20170106092028_WFActivityParentAndProfiles.Designer.cs b/Yavsc/Migrations/20170106092028_WFActivityParentAndProfiles.Designer.cs
new file mode 100644
index 00000000..f3f24adc
--- /dev/null
+++ b/Yavsc/Migrations/20170106092028_WFActivityParentAndProfiles.Designer.cs
@@ -0,0 +1,908 @@
+using System;
+using Microsoft.Data.Entity;
+using Microsoft.Data.Entity.Infrastructure;
+using Microsoft.Data.Entity.Metadata;
+using Microsoft.Data.Entity.Migrations;
+using Yavsc.Models;
+
+namespace Yavsc.Migrations
+{
+ [DbContext(typeof(ApplicationDbContext))]
+ [Migration("20170106092028_WFActivityParentAndProfiles")]
+ partial class WFActivityParentAndProfiles
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+ modelBuilder
+ .HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
+
+ modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
+ {
+ b.Property("Id");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken();
+
+ b.Property("Name")
+ .HasAnnotation("MaxLength", 256);
+
+ b.Property("NormalizedName")
+ .HasAnnotation("MaxLength", 256);
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedName")
+ .HasAnnotation("Relational:Name", "RoleNameIndex");
+
+ b.HasAnnotation("Relational:TableName", "AspNetRoles");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ClaimType");
+
+ b.Property("ClaimValue");
+
+ b.Property("RoleId")
+ .IsRequired();
+
+ b.HasKey("Id");
+
+ b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ClaimType");
+
+ b.Property("ClaimValue");
+
+ b.Property("UserId")
+ .IsRequired();
+
+ b.HasKey("Id");
+
+ b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin", b =>
+ {
+ b.Property("LoginProvider");
+
+ b.Property("ProviderKey");
+
+ b.Property("ProviderDisplayName");
+
+ b.Property("UserId")
+ .IsRequired();
+
+ b.HasKey("LoginProvider", "ProviderKey");
+
+ b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole", b =>
+ {
+ b.Property("UserId");
+
+ b.Property("RoleId");
+
+ b.HasKey("UserId", "RoleId");
+
+ b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
+ });
+
+ modelBuilder.Entity("Yavsc.Location", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Address")
+ .IsRequired()
+ .HasAnnotation("MaxLength", 512);
+
+ b.Property("Latitude");
+
+ b.Property("Longitude");
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Model.Bank.BankIdentity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AccountNumber")
+ .HasAnnotation("MaxLength", 15);
+
+ b.Property("BIC")
+ .HasAnnotation("MaxLength", 15);
+
+ b.Property("BankCode")
+ .HasAnnotation("MaxLength", 5);
+
+ b.Property("BankedKey");
+
+ b.Property("IBAN")
+ .HasAnnotation("MaxLength", 33);
+
+ b.Property("WicketCode")
+ .HasAnnotation("MaxLength", 5);
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("OwnerId");
+
+ b.Property("UserId");
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
+ {
+ b.Property("UserId");
+
+ b.Property("ContactCredits");
+
+ b.Property("Credits");
+
+ b.HasKey("UserId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Activity", b =>
+ {
+ b.Property("Code")
+ .HasAnnotation("MaxLength", 512);
+
+ b.Property("ActorDenomination");
+
+ b.Property("Description");
+
+ b.Property("ModeratorGroupName");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasAnnotation("MaxLength", 512);
+
+ b.Property("ParentCode")
+ .HasAnnotation("MaxLength", 512);
+
+ b.Property("Photo");
+
+ b.HasKey("Code");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
+ {
+ b.Property("Id");
+
+ b.Property("AccessFailedCount");
+
+ b.Property("Avatar")
+ .HasAnnotation("MaxLength", 512);
+
+ b.Property("BankInfoId");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken();
+
+ b.Property("DedicatedGoogleCalendar");
+
+ b.Property("DiskQuota");
+
+ b.Property("DiskUsage");
+
+ b.Property("Email")
+ .HasAnnotation("MaxLength", 256);
+
+ b.Property("EmailConfirmed");
+
+ b.Property("FullName")
+ .HasAnnotation("MaxLength", 512);
+
+ b.Property("LockoutEnabled");
+
+ b.Property("LockoutEnd");
+
+ b.Property("NormalizedEmail")
+ .HasAnnotation("MaxLength", 256);
+
+ b.Property("NormalizedUserName")
+ .HasAnnotation("MaxLength", 256);
+
+ b.Property("PasswordHash");
+
+ b.Property("PhoneNumber");
+
+ b.Property("PhoneNumberConfirmed");
+
+ b.Property("PostalAddressId");
+
+ b.Property("SecurityStamp");
+
+ b.Property("TwoFactorEnabled");
+
+ b.Property("UserName")
+ .HasAnnotation("MaxLength", 256);
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedEmail")
+ .HasAnnotation("Relational:Name", "EmailIndex");
+
+ b.HasIndex("NormalizedUserName")
+ .HasAnnotation("Relational:Name", "UserNameIndex");
+
+ b.HasAnnotation("Relational:TableName", "AspNetUsers");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Auth.Client", b =>
+ {
+ b.Property("Id");
+
+ b.Property("Active");
+
+ b.Property("DisplayName");
+
+ b.Property("LogoutRedirectUri")
+ .HasAnnotation("MaxLength", 100);
+
+ b.Property("RedirectUri");
+
+ b.Property("RefreshTokenLifeTime");
+
+ b.Property("Secret");
+
+ b.Property("Type");
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Auth.RefreshToken", b =>
+ {
+ b.Property("Id");
+
+ b.Property("ClientId")
+ .IsRequired()
+ .HasAnnotation("MaxLength", 50);
+
+ b.Property("ExpiresUtc");
+
+ b.Property("IssuedUtc");
+
+ b.Property("ProtectedTicket")
+ .IsRequired();
+
+ b.Property("Subject")
+ .IsRequired()
+ .HasAnnotation("MaxLength", 50);
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BalanceId")
+ .IsRequired();
+
+ b.Property("ExecDate");
+
+ b.Property("Impact");
+
+ b.Property("Reason")
+ .IsRequired();
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ArticleId");
+
+ b.Property("Count");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasAnnotation("MaxLength", 512);
+
+ b.Property("EstimateId");
+
+ b.Property("EstimateTemplateId");
+
+ b.Property("UnitaryCost");
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AttachedFilesString");
+
+ b.Property("AttachedGraphicsString");
+
+ b.Property("ClientId")
+ .IsRequired();
+
+ b.Property("ClientValidationDate");
+
+ b.Property("CommandId");
+
+ b.Property("CommandType");
+
+ b.Property("Description");
+
+ b.Property("OwnerId")
+ .IsRequired();
+
+ b.Property("ProviderValidationDate");
+
+ b.Property("Title");
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Billing.EstimateTemplate", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Description");
+
+ b.Property("OwnerId")
+ .IsRequired();
+
+ b.Property("Title");
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Billing.ExceptionSIREN", b =>
+ {
+ b.Property("SIREN");
+
+ b.HasKey("SIREN");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Blog", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AuthorId");
+
+ b.Property("Content");
+
+ b.Property("Modified");
+
+ b.Property("Photo");
+
+ b.Property("Posted")
+ .ValueGeneratedOnAdd()
+ .HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
+
+ b.Property("Rate");
+
+ b.Property("Title");
+
+ b.Property("Visible");
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ClientId")
+ .IsRequired();
+
+ b.Property("CreationDate")
+ .ValueGeneratedOnAdd()
+ .HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
+
+ b.Property("EventDate");
+
+ b.Property("LocationId");
+
+ b.Property("LocationTypeId");
+
+ b.Property("PerformerId")
+ .IsRequired();
+
+ b.Property("Previsional");
+
+ b.Property("Reason");
+
+ b.Property("ValidationDate");
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Booking.MusicalPreference", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Name")
+ .IsRequired()
+ .HasAnnotation("MaxLength", 255);
+
+ b.Property("OwnerId");
+
+ b.Property("Rate");
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Booking.MusicalTendency", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Name")
+ .IsRequired()
+ .HasAnnotation("MaxLength", 255);
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
+ {
+ b.Property("ConnectionId");
+
+ b.Property("ApplicationUserId");
+
+ b.Property("Connected");
+
+ b.Property("UserAgent");
+
+ b.HasKey("ConnectionId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Circle", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ApplicationUserId");
+
+ b.Property("Name");
+
+ b.Property("OwnerId");
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("CircleId");
+
+ b.Property("MemberId")
+ .IsRequired();
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Contact", b =>
+ {
+ b.Property("OwnerId");
+
+ b.Property("UserId");
+
+ b.Property("ApplicationUserId");
+
+ b.HasKey("OwnerId", "UserId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
+ {
+ b.Property("DeviceId");
+
+ b.Property("DeclarationDate")
+ .ValueGeneratedOnAdd()
+ .HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
+
+ b.Property("DeviceOwnerId");
+
+ b.Property("GCMRegistrationId")
+ .IsRequired();
+
+ b.Property("Model");
+
+ b.Property("Platform");
+
+ b.Property("Version");
+
+ b.HasKey("DeviceId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Market.BaseProduct", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Description");
+
+ b.Property("Discriminator")
+ .IsRequired();
+
+ b.Property("Name");
+
+ b.Property("Public");
+
+ b.HasKey("Id");
+
+ b.HasAnnotation("Relational:DiscriminatorProperty", "Discriminator");
+
+ b.HasAnnotation("Relational:DiscriminatorValue", "BaseProduct");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ContextId");
+
+ b.Property("Description");
+
+ b.Property("Name");
+
+ b.Property("Public");
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
+ {
+ b.Property("UserId");
+
+ b.Property("Avatar");
+
+ b.Property("BillingAddressId");
+
+ b.Property("EMail");
+
+ b.Property("Phone");
+
+ b.Property("UserName");
+
+ b.HasKey("UserId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.OAuth.OAuth2Tokens", b =>
+ {
+ b.Property("UserId");
+
+ b.Property("AccessToken");
+
+ b.Property("Expiration");
+
+ b.Property("ExpiresIn");
+
+ b.Property("RefreshToken");
+
+ b.Property("TokenType");
+
+ b.HasKey("UserId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.PostTag", b =>
+ {
+ b.Property("PostId");
+
+ b.Property("TagId");
+
+ b.HasKey("PostId", "TagId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Relationship.LocationType", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Name");
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Skill", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Name");
+
+ b.Property("Rate");
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Tag", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Name")
+ .IsRequired();
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
+ {
+ b.Property("PerformerId");
+
+ b.Property("AcceptGeoLocalization");
+
+ b.Property("AcceptNotifications");
+
+ b.Property("AcceptPublicContact");
+
+ b.Property("Active");
+
+ b.Property("ActivityCode")
+ .IsRequired();
+
+ b.Property("MaxDailyCost");
+
+ b.Property("MinDailyCost");
+
+ b.Property("OfferId");
+
+ b.Property("OrganizationAddressId");
+
+ b.Property("Rate");
+
+ b.Property("SIREN")
+ .IsRequired()
+ .HasAnnotation("MaxLength", 14);
+
+ b.Property("WebSite");
+
+ b.HasKey("PerformerId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Market.Product", b =>
+ {
+ b.HasBaseType("Yavsc.Models.Market.BaseProduct");
+
+ b.Property("Depth");
+
+ b.Property("Height");
+
+ b.Property("Price");
+
+ b.Property("Weight");
+
+ b.Property("Width");
+
+ b.HasAnnotation("Relational:DiscriminatorValue", "Product");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim", b =>
+ {
+ b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
+ .WithMany()
+ .HasForeignKey("RoleId");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim", b =>
+ {
+ b.HasOne("Yavsc.Models.ApplicationUser")
+ .WithMany()
+ .HasForeignKey("UserId");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin", b =>
+ {
+ b.HasOne("Yavsc.Models.ApplicationUser")
+ .WithMany()
+ .HasForeignKey("UserId");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole", b =>
+ {
+ b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
+ .WithMany()
+ .HasForeignKey("RoleId");
+
+ b.HasOne("Yavsc.Models.ApplicationUser")
+ .WithMany()
+ .HasForeignKey("UserId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
+ {
+ b.HasOne("Yavsc.Models.ApplicationUser")
+ .WithMany()
+ .HasForeignKey("OwnerId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
+ {
+ b.HasOne("Yavsc.Models.ApplicationUser")
+ .WithOne()
+ .HasForeignKey("Yavsc.Models.AccountBalance", "UserId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Activity", b =>
+ {
+ b.HasOne("Yavsc.Models.Activity")
+ .WithMany()
+ .HasForeignKey("ParentCode");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
+ {
+ b.HasOne("Yavsc.Model.Bank.BankIdentity")
+ .WithMany()
+ .HasForeignKey("BankInfoId");
+
+ b.HasOne("Yavsc.Location")
+ .WithMany()
+ .HasForeignKey("PostalAddressId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
+ {
+ b.HasOne("Yavsc.Models.AccountBalance")
+ .WithMany()
+ .HasForeignKey("BalanceId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
+ {
+ b.HasOne("Yavsc.Models.Market.BaseProduct")
+ .WithMany()
+ .HasForeignKey("ArticleId");
+
+ b.HasOne("Yavsc.Models.Billing.Estimate")
+ .WithMany()
+ .HasForeignKey("EstimateId");
+
+ b.HasOne("Yavsc.Models.Billing.EstimateTemplate")
+ .WithMany()
+ .HasForeignKey("EstimateTemplateId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
+ {
+ b.HasOne("Yavsc.Models.Booking.BookQuery")
+ .WithMany()
+ .HasForeignKey("CommandId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Blog", b =>
+ {
+ b.HasOne("Yavsc.Models.ApplicationUser")
+ .WithMany()
+ .HasForeignKey("AuthorId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
+ {
+ b.HasOne("Yavsc.Models.ApplicationUser")
+ .WithMany()
+ .HasForeignKey("ClientId");
+
+ b.HasOne("Yavsc.Location")
+ .WithMany()
+ .HasForeignKey("LocationId");
+
+ b.HasOne("Yavsc.Models.Relationship.LocationType")
+ .WithMany()
+ .HasForeignKey("LocationTypeId");
+
+ b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
+ .WithMany()
+ .HasForeignKey("PerformerId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
+ {
+ b.HasOne("Yavsc.Models.ApplicationUser")
+ .WithMany()
+ .HasForeignKey("ApplicationUserId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Circle", b =>
+ {
+ b.HasOne("Yavsc.Models.ApplicationUser")
+ .WithMany()
+ .HasForeignKey("ApplicationUserId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
+ {
+ b.HasOne("Yavsc.Models.Circle")
+ .WithMany()
+ .HasForeignKey("CircleId");
+
+ b.HasOne("Yavsc.Models.ApplicationUser")
+ .WithMany()
+ .HasForeignKey("MemberId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Contact", b =>
+ {
+ b.HasOne("Yavsc.Models.ApplicationUser")
+ .WithMany()
+ .HasForeignKey("ApplicationUserId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
+ {
+ b.HasOne("Yavsc.Models.ApplicationUser")
+ .WithMany()
+ .HasForeignKey("DeviceOwnerId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
+ {
+ b.HasOne("Yavsc.Models.Activity")
+ .WithMany()
+ .HasForeignKey("ContextId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
+ {
+ b.HasOne("Yavsc.Location")
+ .WithMany()
+ .HasForeignKey("BillingAddressId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.PostTag", b =>
+ {
+ b.HasOne("Yavsc.Models.Blog")
+ .WithMany()
+ .HasForeignKey("PostId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
+ {
+ b.HasOne("Yavsc.Models.Activity")
+ .WithMany()
+ .HasForeignKey("ActivityCode");
+
+ b.HasOne("Yavsc.Models.Market.Service")
+ .WithMany()
+ .HasForeignKey("OfferId");
+
+ b.HasOne("Yavsc.Location")
+ .WithMany()
+ .HasForeignKey("OrganizationAddressId");
+
+ b.HasOne("Yavsc.Models.ApplicationUser")
+ .WithMany()
+ .HasForeignKey("PerformerId");
+ });
+ }
+ }
+}
diff --git a/Yavsc/Migrations/20170106092028_WFActivityParentAndProfiles.cs b/Yavsc/Migrations/20170106092028_WFActivityParentAndProfiles.cs
new file mode 100644
index 00000000..ce5e5d25
--- /dev/null
+++ b/Yavsc/Migrations/20170106092028_WFActivityParentAndProfiles.cs
@@ -0,0 +1,286 @@
+using System;
+using System.Collections.Generic;
+using Microsoft.Data.Entity.Migrations;
+
+namespace Yavsc.Migrations
+{
+ public partial class WFActivityParentAndProfiles : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim_IdentityRole_RoleId", table: "AspNetRoleClaims");
+ migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim_ApplicationUser_UserId", table: "AspNetUserClaims");
+ migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin_ApplicationUser_UserId", table: "AspNetUserLogins");
+ migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole_IdentityRole_RoleId", table: "AspNetUserRoles");
+ migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole_ApplicationUser_UserId", table: "AspNetUserRoles");
+ migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
+ migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
+ migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
+ migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
+ migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
+ migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
+ migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
+ migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
+ migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
+ migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
+ migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
+ migrationBuilder.AddColumn(
+ name: "ParentCode",
+ table: "Activity",
+ nullable: true);
+ migrationBuilder.AddForeignKey(
+ name: "FK_IdentityRoleClaim_IdentityRole_RoleId",
+ table: "AspNetRoleClaims",
+ column: "RoleId",
+ principalTable: "AspNetRoles",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ migrationBuilder.AddForeignKey(
+ name: "FK_IdentityUserClaim_ApplicationUser_UserId",
+ table: "AspNetUserClaims",
+ column: "UserId",
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ migrationBuilder.AddForeignKey(
+ name: "FK_IdentityUserLogin_ApplicationUser_UserId",
+ table: "AspNetUserLogins",
+ column: "UserId",
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ migrationBuilder.AddForeignKey(
+ name: "FK_IdentityUserRole_IdentityRole_RoleId",
+ table: "AspNetUserRoles",
+ column: "RoleId",
+ principalTable: "AspNetRoles",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ migrationBuilder.AddForeignKey(
+ name: "FK_IdentityUserRole_ApplicationUser_UserId",
+ table: "AspNetUserRoles",
+ column: "UserId",
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ migrationBuilder.AddForeignKey(
+ name: "FK_AccountBalance_ApplicationUser_UserId",
+ table: "AccountBalance",
+ column: "UserId",
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ migrationBuilder.AddForeignKey(
+ name: "FK_Activity_Activity_ParentCode",
+ table: "Activity",
+ column: "ParentCode",
+ principalTable: "Activity",
+ principalColumn: "Code",
+ onDelete: ReferentialAction.Restrict);
+ migrationBuilder.AddForeignKey(
+ name: "FK_BalanceImpact_AccountBalance_BalanceId",
+ table: "BalanceImpact",
+ column: "BalanceId",
+ principalTable: "AccountBalance",
+ principalColumn: "UserId",
+ onDelete: ReferentialAction.Cascade);
+ migrationBuilder.AddForeignKey(
+ name: "FK_CommandLine_Estimate_EstimateId",
+ table: "CommandLine",
+ column: "EstimateId",
+ principalTable: "Estimate",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ migrationBuilder.AddForeignKey(
+ name: "FK_BookQuery_ApplicationUser_ClientId",
+ table: "BookQuery",
+ column: "ClientId",
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ migrationBuilder.AddForeignKey(
+ name: "FK_BookQuery_PerformerProfile_PerformerId",
+ table: "BookQuery",
+ column: "PerformerId",
+ principalTable: "PerformerProfile",
+ principalColumn: "PerformerId",
+ onDelete: ReferentialAction.Cascade);
+ migrationBuilder.AddForeignKey(
+ name: "FK_CircleMember_Circle_CircleId",
+ table: "CircleMember",
+ column: "CircleId",
+ principalTable: "Circle",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ migrationBuilder.AddForeignKey(
+ name: "FK_CircleMember_ApplicationUser_MemberId",
+ table: "CircleMember",
+ column: "MemberId",
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ migrationBuilder.AddForeignKey(
+ name: "FK_PostTag_Blog_PostId",
+ table: "PostTag",
+ column: "PostId",
+ principalTable: "Blog",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ migrationBuilder.AddForeignKey(
+ name: "FK_PerformerProfile_Activity_ActivityCode",
+ table: "PerformerProfile",
+ column: "ActivityCode",
+ principalTable: "Activity",
+ principalColumn: "Code",
+ onDelete: ReferentialAction.Cascade);
+ migrationBuilder.AddForeignKey(
+ name: "FK_PerformerProfile_Location_OrganizationAddressId",
+ table: "PerformerProfile",
+ column: "OrganizationAddressId",
+ principalTable: "Location",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ migrationBuilder.AddForeignKey(
+ name: "FK_PerformerProfile_ApplicationUser_PerformerId",
+ table: "PerformerProfile",
+ column: "PerformerId",
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim_IdentityRole_RoleId", table: "AspNetRoleClaims");
+ migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim_ApplicationUser_UserId", table: "AspNetUserClaims");
+ migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin_ApplicationUser_UserId", table: "AspNetUserLogins");
+ migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole_IdentityRole_RoleId", table: "AspNetUserRoles");
+ migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole_ApplicationUser_UserId", table: "AspNetUserRoles");
+ migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
+ migrationBuilder.DropForeignKey(name: "FK_Activity_Activity_ParentCode", table: "Activity");
+ migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
+ migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
+ migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
+ migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
+ migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
+ migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
+ migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
+ migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
+ migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
+ migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
+ migrationBuilder.DropColumn(name: "ParentCode", table: "Activity");
+ migrationBuilder.AddForeignKey(
+ name: "FK_IdentityRoleClaim_IdentityRole_RoleId",
+ table: "AspNetRoleClaims",
+ column: "RoleId",
+ principalTable: "AspNetRoles",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Restrict);
+ migrationBuilder.AddForeignKey(
+ name: "FK_IdentityUserClaim_ApplicationUser_UserId",
+ table: "AspNetUserClaims",
+ column: "UserId",
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Restrict);
+ migrationBuilder.AddForeignKey(
+ name: "FK_IdentityUserLogin_ApplicationUser_UserId",
+ table: "AspNetUserLogins",
+ column: "UserId",
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Restrict);
+ migrationBuilder.AddForeignKey(
+ name: "FK_IdentityUserRole_IdentityRole_RoleId",
+ table: "AspNetUserRoles",
+ column: "RoleId",
+ principalTable: "AspNetRoles",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Restrict);
+ migrationBuilder.AddForeignKey(
+ name: "FK_IdentityUserRole_ApplicationUser_UserId",
+ table: "AspNetUserRoles",
+ column: "UserId",
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Restrict);
+ migrationBuilder.AddForeignKey(
+ name: "FK_AccountBalance_ApplicationUser_UserId",
+ table: "AccountBalance",
+ column: "UserId",
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Restrict);
+ migrationBuilder.AddForeignKey(
+ name: "FK_BalanceImpact_AccountBalance_BalanceId",
+ table: "BalanceImpact",
+ column: "BalanceId",
+ principalTable: "AccountBalance",
+ principalColumn: "UserId",
+ onDelete: ReferentialAction.Restrict);
+ migrationBuilder.AddForeignKey(
+ name: "FK_CommandLine_Estimate_EstimateId",
+ table: "CommandLine",
+ column: "EstimateId",
+ principalTable: "Estimate",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Restrict);
+ migrationBuilder.AddForeignKey(
+ name: "FK_BookQuery_ApplicationUser_ClientId",
+ table: "BookQuery",
+ column: "ClientId",
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Restrict);
+ migrationBuilder.AddForeignKey(
+ name: "FK_BookQuery_PerformerProfile_PerformerId",
+ table: "BookQuery",
+ column: "PerformerId",
+ principalTable: "PerformerProfile",
+ principalColumn: "PerformerId",
+ onDelete: ReferentialAction.Restrict);
+ migrationBuilder.AddForeignKey(
+ name: "FK_CircleMember_Circle_CircleId",
+ table: "CircleMember",
+ column: "CircleId",
+ principalTable: "Circle",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Restrict);
+ migrationBuilder.AddForeignKey(
+ name: "FK_CircleMember_ApplicationUser_MemberId",
+ table: "CircleMember",
+ column: "MemberId",
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Restrict);
+ migrationBuilder.AddForeignKey(
+ name: "FK_PostTag_Blog_PostId",
+ table: "PostTag",
+ column: "PostId",
+ principalTable: "Blog",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Restrict);
+ migrationBuilder.AddForeignKey(
+ name: "FK_PerformerProfile_Activity_ActivityCode",
+ table: "PerformerProfile",
+ column: "ActivityCode",
+ principalTable: "Activity",
+ principalColumn: "Code",
+ onDelete: ReferentialAction.Restrict);
+ migrationBuilder.AddForeignKey(
+ name: "FK_PerformerProfile_Location_OrganizationAddressId",
+ table: "PerformerProfile",
+ column: "OrganizationAddressId",
+ principalTable: "Location",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Restrict);
+ migrationBuilder.AddForeignKey(
+ name: "FK_PerformerProfile_ApplicationUser_PerformerId",
+ table: "PerformerProfile",
+ column: "PerformerId",
+ principalTable: "AspNetUsers",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Restrict);
+ }
+ }
+}
diff --git a/Yavsc/Migrations/20170106113614_ownerProfile.Designer.cs b/Yavsc/Migrations/20170106113614_ownerProfile.Designer.cs
new file mode 100644
index 00000000..1492613a
--- /dev/null
+++ b/Yavsc/Migrations/20170106113614_ownerProfile.Designer.cs
@@ -0,0 +1,915 @@
+using System;
+using Microsoft.Data.Entity;
+using Microsoft.Data.Entity.Infrastructure;
+using Microsoft.Data.Entity.Metadata;
+using Microsoft.Data.Entity.Migrations;
+using Yavsc.Models;
+
+namespace Yavsc.Migrations
+{
+ [DbContext(typeof(ApplicationDbContext))]
+ [Migration("20170106113614_ownerProfile")]
+ partial class ownerProfile
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+ modelBuilder
+ .HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
+
+ modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
+ {
+ b.Property("Id");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken();
+
+ b.Property("Name")
+ .HasAnnotation("MaxLength", 256);
+
+ b.Property("NormalizedName")
+ .HasAnnotation("MaxLength", 256);
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedName")
+ .HasAnnotation("Relational:Name", "RoleNameIndex");
+
+ b.HasAnnotation("Relational:TableName", "AspNetRoles");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ClaimType");
+
+ b.Property("ClaimValue");
+
+ b.Property("RoleId")
+ .IsRequired();
+
+ b.HasKey("Id");
+
+ b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ClaimType");
+
+ b.Property("ClaimValue");
+
+ b.Property("UserId")
+ .IsRequired();
+
+ b.HasKey("Id");
+
+ b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin