From a2f588652697b151cc0700d6455d4ac9a3f15054 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Sat, 22 Jun 2019 19:34:39 +0100 Subject: [PATCH] presentation & tools --- .../new-templates/ViewGenerator/Delete.cshtml | 8 +- .../ViewGenerator/Details.cshtml | 2 +- .../new-templates/ViewGenerator/Edit.cshtml | 4 +- .../new-templates/ViewGenerator/List.cshtml | 6 +- src/Yavsc.Server/Makefile | 9 +- src/Yavsc.Server/Models/ApplicationUser.cs | 24 +- src/Yavsc.Server/Models/Messaging/LiveFlow.cs | 10 +- .../Models/Relationship/HyperLink.cs | 4 +- ....Models.Relationship.HyperLink.Designer.cs | 18 +- .../Yavsc.Models.Relationship.HyperLink.resx | 2 +- ...avsc.Models.Streaming.LiveFlow.Designer.cs | 94 + .../Yavsc.Models.Streaming.LiveFlow.resx | 73 + .../ApplicationUserApiController.cs | 14 +- .../AdministrationController.cs | 31 +- src/Yavsc/Controllers/HyperLinkController.cs | 31 +- src/Yavsc/Makefile | 1 + .../20190622172941_userTrack.Designer.cs | 2060 +++++++++++++++++ .../Migrations/20190622172941_userTrack.cs | 943 ++++++++ .../ApplicationDbContextModelSnapshot.cs | 23 +- ...c.ViewModels.NewAdminViewModel.Designer.cs | 52 + .../Yavsc.ViewModels.NewAdminViewModel.resx | 62 + .../Yavsc.YavscLocalisation.Designer.cs | 24 + .../Resources/Yavsc.YavscLocalisation.resx | 4 + .../Administration/NewAdminViewModel.cs | 11 + src/Yavsc/Views/Activity/Create.cshtml | 12 +- src/Yavsc/Views/Activity/Edit.cshtml | 9 +- .../Views/Administration/GiveAdmin.cshtml | 23 + src/Yavsc/Views/Administration/Role.cshtml | 2 + src/Yavsc/Views/Announces/Create.cshtml | 8 +- src/Yavsc/Views/Announces/Edit.cshtml | 8 +- src/Yavsc/Views/Circle/Create.cshtml | 4 +- src/Yavsc/Views/Circle/Edit.cshtml | 4 +- src/Yavsc/Views/Client/Create.cshtml | 16 +- src/Yavsc/Views/Client/Edit.cshtml | 12 +- src/Yavsc/Views/CoWorking/Edit.cshtml | 8 +- src/Yavsc/Views/Command/Edit.cshtml | 2 +- src/Yavsc/Views/CommandForms/Create.cshtml | 2 +- src/Yavsc/Views/Comments/Create.cshtml | 10 +- src/Yavsc/Views/Comments/Edit.cshtml | 14 +- src/Yavsc/Views/DjSettings/Create.cshtml | 2 +- src/Yavsc/Views/DjSettings/Edit.cshtml | 2 +- src/Yavsc/Views/Do/Create.cshtml | 4 +- src/Yavsc/Views/Estimate/Create.cshtml | 12 +- src/Yavsc/Views/Estimate/Edit.cshtml | 8 +- src/Yavsc/Views/Feature/Edit.cshtml | 6 +- src/Yavsc/Views/Git/Edit.cshtml | 4 +- src/Yavsc/Views/HairPrestations/Create.cshtml | 8 +- src/Yavsc/Views/HairPrestations/Edit.cshtml | 8 +- src/Yavsc/Views/HairTaints/Create.cshtml | 2 +- src/Yavsc/Views/HairTaints/Edit.cshtml | 4 +- src/Yavsc/Views/HyperLink/Delete.cshtml | 20 +- src/Yavsc/Views/HyperLink/Details.cshtml | 6 +- src/Yavsc/Views/HyperLink/Edit.cshtml | 4 +- src/Yavsc/Views/HyperLink/Index.cshtml | 8 +- src/Yavsc/Views/Instruments/Create.cshtml | 2 +- src/Yavsc/Views/Instruments/Edit.cshtml | 2 +- src/Yavsc/Views/LiveFlow/Index.cshtml | 10 +- src/Yavsc/Views/MailingTemplate/Create.cshtml | 8 +- src/Yavsc/Views/Manage/Index.cshtml | 5 - .../Views/MusicalTendencies/Create.cshtml | 2 +- src/Yavsc/Views/MusicalTendencies/Edit.cshtml | 2 +- src/Yavsc/Views/Notifications/Create.cshtml | 14 +- src/Yavsc/Views/Notifications/Edit.cshtml | 14 +- src/Yavsc/Views/Project/Edit.cshtml | 4 +- src/Yavsc/Views/Shared/_LoginPartial.cshtml | 1 + src/Yavsc/Views/Users/Create.cshtml | 30 +- src/Yavsc/Views/Users/Edit.cshtml | 34 +- src/cli/.paul-ci.json | 12 +- src/cli/Program.cs | 1 - src/cli/Settings/CiBuildSettings.cs | 32 +- src/cli/Settings/Command.cs | 36 + src/cli/Settings/CommandPipe.cs | 64 + src/cli/cli.nuspec | 16 +- src/cli/jsonSchema | 96 + src/cli/paul-ci.shema.json | 96 + src/cli/project.json | 4 +- 76 files changed, 3973 insertions(+), 254 deletions(-) create mode 100644 src/Yavsc.Server/Resources/Yavsc.Models.Streaming.LiveFlow.Designer.cs create mode 100644 src/Yavsc.Server/Resources/Yavsc.Models.Streaming.LiveFlow.resx create mode 100644 src/Yavsc/Migrations/20190622172941_userTrack.Designer.cs create mode 100644 src/Yavsc/Migrations/20190622172941_userTrack.cs create mode 100644 src/Yavsc/Resources/Yavsc.ViewModels.NewAdminViewModel.Designer.cs create mode 100644 src/Yavsc/Resources/Yavsc.ViewModels.NewAdminViewModel.resx create mode 100644 src/Yavsc/ViewModels/Administration/NewAdminViewModel.cs create mode 100644 src/Yavsc/Views/Administration/GiveAdmin.cshtml create mode 100644 src/cli/Settings/Command.cs create mode 100644 src/cli/Settings/CommandPipe.cs create mode 100644 src/cli/jsonSchema create mode 100644 src/cli/paul-ci.shema.json diff --git a/scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/Delete.cshtml b/scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/Delete.cshtml index 8ddae2a2..d2845a09 100644 --- a/scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/Delete.cshtml +++ b/scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/Delete.cshtml @@ -30,16 +30,16 @@ @: @: @: - @:@Model.ViewName + @:@@SR[@Model.ViewName] @: @: @: // PushIndent(" "); } } -

Are you sure you want to delete this?

+

@@SR["AreYourSureYouWantToDeleteThis"]

-

@Model.ViewDataTypeShortName

+

@@SR[@Model.ViewDataTypeShortName]


@{ @@ -59,7 +59,7 @@ @: @:
@:
- @: | + @: | @:@@SR["Back to List"] @:
@:
diff --git a/scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/Details.cshtml b/scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/Details.cshtml index a3596e04..8d443d94 100644 --- a/scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/Details.cshtml +++ b/scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/Details.cshtml @@ -66,7 +66,7 @@ } else { - @:@@Html.ActionLink("Edit", "Edit", new { /* id = Model.PrimaryKey */ }) | + @:@@Html.ActionLink(@@SR["Edit"], "Edit", new { /* id = Model.PrimaryKey */ }) | @:@@SR["Back to List"] } }

diff --git a/scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/Edit.cshtml b/scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/Edit.cshtml index 36316b1e..df402e34 100644 --- a/scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/Edit.cshtml +++ b/scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/Edit.cshtml @@ -60,8 +60,8 @@ @:
@: @:
- @: + @: @:
@:
continue; diff --git a/scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/List.cshtml b/scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/List.cshtml index 337b70c9..f0e78978 100644 --- a/scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/List.cshtml +++ b/scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/List.cshtml @@ -77,9 +77,9 @@ else { - @@Html.ActionLink("Edit", SR["Edit"], new { /* id=item.PrimaryKey */ }) | - @@Html.ActionLink("Details", SR["Details"], new { /* id=item.PrimaryKey */ }) | - @@Html.ActionLink("Delete", SR["Delete"], new { /* id=item.PrimaryKey */ }) + @@Html.ActionLink(SR["Edit"], "Edit",new { /* id=item.PrimaryKey */ }) | + @@Html.ActionLink(SR["Details"], "Details", new { /* id=item.PrimaryKey */ }) | + @@Html.ActionLink(SR["Delete"], "Delete", new { /* id=item.PrimaryKey */ }) } @: diff --git a/src/Yavsc.Server/Makefile b/src/Yavsc.Server/Makefile index 8b45d75a..c909fbc1 100644 --- a/src/Yavsc.Server/Makefile +++ b/src/Yavsc.Server/Makefile @@ -5,7 +5,8 @@ include $(MAKEFILE_DIR)/dnx.mk default: all -$(BINTARGETPATH): ../OAuth.AspNet.AuthServer/bin/$(CONFIGURATION)/OAuth.AspNet.AuthServer.dll ../Yavsc.Abstract/bin/$(CONFIGURATION)/Yavsc.Abstract.dll prepare_code +$(BINTARGETPATH): ../OAuth.AspNet.AuthServer/bin/$(CONFIGURATION)/OAuth.AspNet.AuthServer.dll \ + ../Yavsc.Abstract/bin/$(CONFIGURATION)/Yavsc.Abstract.dll prepare_code ../OAuth.AspNet.AuthServer/bin/$(CONFIGURATION)/OAuth.AspNet.AuthServer.dll: make -C ../OAuth.AspNet.AuthServer @@ -13,9 +14,11 @@ $(BINTARGETPATH): ../OAuth.AspNet.AuthServer/bin/$(CONFIGURATION)/OAuth.AspNet.A ../Yavsc.Abstract/bin/$(CONFIGURATION)/Yavsc.Abstract.dll: make -C ../Yavsc.Abstract -%.Designer.cs: Resources/%.resx +%.Designer.cs: %.resx strotygen -l -p -t -r "Yavsc.Server.Resources." $^ -prepare_code: Resources/Yavsc.Models.IT.Fixing.Bug.Designer.cs Yavsc.Models.Relationship.HyperLink.Designer.cs +prepare_code: Resources/Yavsc.Models.IT.Fixing.Bug.Designer.cs \ + Resources/Yavsc.Models.Relationship.HyperLink.Designer.cs \ + Resources/Yavsc.Models.Streaming.LiveFlow.Designer.cs all: $(BINTARGETPATH) diff --git a/src/Yavsc.Server/Models/ApplicationUser.cs b/src/Yavsc.Server/Models/ApplicationUser.cs index 6cff916c..8e3c6e90 100644 --- a/src/Yavsc.Server/Models/ApplicationUser.cs +++ b/src/Yavsc.Server/Models/ApplicationUser.cs @@ -12,8 +12,9 @@ namespace Yavsc.Models using Models.Bank; using Models.Access; using Newtonsoft.Json; - - public class ApplicationUser : IdentityUser + using System; + + public class ApplicationUser : IdentityUser, IBaseTrackedEntity { /// /// Another me, as a byte array. @@ -108,5 +109,24 @@ namespace Yavsc.Models [JsonIgnore][InverseProperty("User")] public virtual List RoomAccess { get; set; } + public DateTime DateCreated + { + get; set; + } + + public string UserCreated + { + get; set; + } + + public DateTime DateModified + { + get; set; + } + + public string UserModified + { + get; set; + } } } diff --git a/src/Yavsc.Server/Models/Messaging/LiveFlow.cs b/src/Yavsc.Server/Models/Messaging/LiveFlow.cs index 10372757..c8efdcc3 100644 --- a/src/Yavsc.Server/Models/Messaging/LiveFlow.cs +++ b/src/Yavsc.Server/Models/Messaging/LiveFlow.cs @@ -5,10 +5,10 @@ using Yavsc.Abstract.Streaming; namespace Yavsc.Models.Streaming { - public class LiveFlow : ILiveFlow { + public partial class LiveFlow : ILiveFlow { [Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)] - [Display(Name="FlowId")] + [Display(Name="FlowIdLabel")] // set by the server, unique public long Id { get; set; } @@ -18,25 +18,31 @@ namespace Yavsc.Models.Streaming /// /// [StringLength(255)] + [Display(Name="TitleLabel")] public string Title { get; set; } // a little description [StringLength(1023)] + [Display(Name="PitchLabel")] public string Pitch { get; set; } // The stream type [StringLength(127)] + [Display(Name="MediaTypeLabel")] public string MediaType { get; set; } // A name where to save this stream, relative to user's files root [StringLength(255)] + [Display(Name="DifferedFileNameLabel")] public string DifferedFileName { get; set; } public int SequenceNumber { get; set; } [Required] + [Display(Name="OwnerIdLabel")] public string OwnerId {get; set; } [ForeignKey("OwnerId")] + [Display(Name="OwnerLabel")] public virtual ApplicationUser Owner { get; set; } } diff --git a/src/Yavsc.Server/Models/Relationship/HyperLink.cs b/src/Yavsc.Server/Models/Relationship/HyperLink.cs index bfccc50d..222fa2d9 100644 --- a/src/Yavsc.Server/Models/Relationship/HyperLink.cs +++ b/src/Yavsc.Server/Models/Relationship/HyperLink.cs @@ -10,11 +10,11 @@ namespace Yavsc.Models.Relationship Prompt="http://some.web.site")] public string HRef { get; set; } - [YaStringLength(5,1024)] + [YaStringLength(0,12)] [Display(Name="MethodDisplayName", ResourceType=typeof(HyperLink), Prompt="GET")] public string Method { get; set; } - [YaStringLength(5,25)] + [YaStringLength(0,25)] [Display(Name="RelDisplayName", ResourceType=typeof(HyperLink), Prompt="href")] public string Rel { get; set; } diff --git a/src/Yavsc.Server/Resources/Yavsc.Models.Relationship.HyperLink.Designer.cs b/src/Yavsc.Server/Resources/Yavsc.Models.Relationship.HyperLink.Designer.cs index ba871857..5bae0726 100644 --- a/src/Yavsc.Server/Resources/Yavsc.Models.Relationship.HyperLink.Designer.cs +++ b/src/Yavsc.Server/Resources/Yavsc.Models.Relationship.HyperLink.Designer.cs @@ -1,12 +1,12 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Mono Runtime Version: 4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ namespace Yavsc.Models.Relationship { using System; diff --git a/src/Yavsc.Server/Resources/Yavsc.Models.Relationship.HyperLink.resx b/src/Yavsc.Server/Resources/Yavsc.Models.Relationship.HyperLink.resx index f3d1496f..f84fe07d 100644 --- a/src/Yavsc.Server/Resources/Yavsc.Models.Relationship.HyperLink.resx +++ b/src/Yavsc.Server/Resources/Yavsc.Models.Relationship.HyperLink.resx @@ -60,7 +60,7 @@ Methode Http attendue coté serveur Type mime du contenu attendu côté client - Classe de lien + Type de lien Valeur du lien \ No newline at end of file diff --git a/src/Yavsc.Server/Resources/Yavsc.Models.Streaming.LiveFlow.Designer.cs b/src/Yavsc.Server/Resources/Yavsc.Models.Streaming.LiveFlow.Designer.cs new file mode 100644 index 00000000..e62ad5eb --- /dev/null +++ b/src/Yavsc.Server/Resources/Yavsc.Models.Streaming.LiveFlow.Designer.cs @@ -0,0 +1,94 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Mono Runtime Version: 4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +namespace Yavsc.Models.Streaming { + using System; + using System.Reflection; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public partial class LiveFlow { + + private static System.Resources.ResourceManager resourceMan; + + private static System.Globalization.CultureInfo resourceCulture; + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + public static System.Resources.ResourceManager ResourceManager { + get { + if (object.Equals(null, resourceMan)) { + System.Resources.ResourceManager temp = new System.Resources.ResourceManager(("Yavsc.Server.Resources." + "Yavsc.Models.Streaming.LiveFlow"), typeof(LiveFlow).GetTypeInfo().Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + public static System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + public static string DifferedFileNameLabel { + get { + return ResourceManager.GetString("DifferedFileNameLabel", resourceCulture); + } + } + + public static string MediaTypeLabel { + get { + return ResourceManager.GetString("MediaTypeLabel", resourceCulture); + } + } + + public static string PitchLabel { + get { + return ResourceManager.GetString("PitchLabel", resourceCulture); + } + } + + public static string SequenceNumberLabel { + get { + return ResourceManager.GetString("SequenceNumberLabel", resourceCulture); + } + } + + public static string TitleLabel { + get { + return ResourceManager.GetString("TitleLabel", resourceCulture); + } + } + + public static string FlowIdLabel { + get { + return ResourceManager.GetString("FlowIdLabel", resourceCulture); + } + } + + public static string OwnerIdLabel { + get { + return ResourceManager.GetString("OwnerIdLabel", resourceCulture); + } + } + + public static string OwnerLabel { + get { + return ResourceManager.GetString("OwnerLabel", resourceCulture); + } + } + } +} diff --git a/src/Yavsc.Server/Resources/Yavsc.Models.Streaming.LiveFlow.resx b/src/Yavsc.Server/Resources/Yavsc.Models.Streaming.LiveFlow.resx new file mode 100644 index 00000000..e0aa7371 --- /dev/null +++ b/src/Yavsc.Server/Resources/Yavsc.Models.Streaming.LiveFlow.resx @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Nom de fichier pour le différé + Type de média + Le pitch + Numéro de séauence + Titre + Identifiant du flux + Identifiant du propriétaire + Propriétaire + + \ No newline at end of file diff --git a/src/Yavsc/ApiControllers/accounting/ApplicationUserApiController.cs b/src/Yavsc/ApiControllers/accounting/ApplicationUserApiController.cs index 31686119..e2db68d5 100644 --- a/src/Yavsc/ApiControllers/accounting/ApplicationUserApiController.cs +++ b/src/Yavsc/ApiControllers/accounting/ApplicationUserApiController.cs @@ -25,7 +25,19 @@ namespace Yavsc.Controllers [HttpGet] public IEnumerable GetApplicationUser() { - return _context.Users.Select(u=> new UserInfo { + return _context.Users.OrderByDescending(u => u.DateModified).Take(25) + .Select(u=> new UserInfo { + UserId = u.Id, + UserName = u.UserName, + Avatar = u.Avatar }); + } + + [HttpGet("search/{pattern}")] + public IEnumerable SearchApplicationUser(string pattern) + { + return _context.Users.Where(u => u.UserName.Contains(pattern)) + .OrderByDescending(u => u.DateModified).Take(25) + .Select(u=> new UserInfo { UserId = u.Id, UserName = u.UserName, Avatar = u.Avatar }); diff --git a/src/Yavsc/Controllers/Administration/AdministrationController.cs b/src/Yavsc/Controllers/Administration/AdministrationController.cs index 00518c71..00aa3093 100644 --- a/src/Yavsc/Controllers/Administration/AdministrationController.cs +++ b/src/Yavsc/Controllers/Administration/AdministrationController.cs @@ -6,9 +6,11 @@ using Microsoft.AspNet.Authorization; using Microsoft.AspNet.Identity; using Microsoft.AspNet.Identity.EntityFramework; using Microsoft.AspNet.Mvc; +using Microsoft.AspNet.Mvc.Rendering; using Microsoft.Data.Entity; using Yavsc.Abstract.Identity; using Yavsc.Models; +using Yavsc.ViewModels; using Yavsc.ViewModels.Administration; namespace Yavsc.Controllers @@ -83,9 +85,6 @@ namespace Yavsc.Controllers return new BadRequestObjectResult(ModelState); } - IdentityRole adminRole; - adminRole = await _roleManager.FindByNameAsync(Constants.AdminGroupName); - var addToRoleResult = await _userManager.AddToRoleAsync(user, Constants.AdminGroupName); if (!addToRoleResult.Succeeded) { @@ -146,6 +145,32 @@ namespace Yavsc.Controllers }; return result; } + + [Authorize("AdministratorOnly")] + public IActionResult GiveAdmin() + { + ViewBag.NewAdminId = new SelectList(context.Users, "Id", "UserName"); + return View(); + } + + [Authorize("AdministratorOnly")] + [HttpPost()] + public async Task GiveAdmin(NewAdminViewModel model) + { + if (ModelState.IsValid) + { + var newAdmin = await context.Users.FirstOrDefaultAsync(u=>u.Id==model.NewAdminId); + if (newAdmin==null) return HttpNotFound(); + var addToRoleResult = await _userManager.AddToRoleAsync(newAdmin, Constants.AdminGroupName); + if (!addToRoleResult.Succeeded) + { + return View("Index"); + } + AddErrors(addToRoleResult); + } + ViewBag.NewAdminId = new SelectList(context.Users, "Id", "UserName"); + return View(); + } private void AddErrors(IdentityResult result) { foreach (var error in result.Errors) diff --git a/src/Yavsc/Controllers/HyperLinkController.cs b/src/Yavsc/Controllers/HyperLinkController.cs index c4968d91..ba541b3a 100644 --- a/src/Yavsc/Controllers/HyperLinkController.cs +++ b/src/Yavsc/Controllers/HyperLinkController.cs @@ -1,4 +1,5 @@ using System.Threading.Tasks; +using Microsoft.AspNet.Authorization; using Microsoft.AspNet.Mvc; using Microsoft.Data.Entity; using Yavsc.Models; @@ -6,6 +7,7 @@ using Yavsc.Models.Relationship; namespace Yavsc.Controllers { + [Authorize("AdministratorOnly")] public class HyperLinkController : Controller { private ApplicationDbContext _context; @@ -22,14 +24,14 @@ namespace Yavsc.Controllers } // GET: HyperLink/Details/5 - public async Task Details(string id) + public async Task Details(string href, string method) { - if (id == null) + if (href == null || method ==null) { return HttpNotFound(); } - HyperLink hyperLink = await _context.HyperLink.SingleAsync(m => m.HRef == id); + HyperLink hyperLink = await _context.HyperLink.SingleAsync(m => m.HRef == href && m.Method == method); if (hyperLink == null) { return HttpNotFound(); @@ -59,14 +61,14 @@ namespace Yavsc.Controllers } // GET: HyperLink/Edit/5 - public async Task Edit(string id) + public async Task Edit(string href, string method) { - if (id == null) + if (href == null || method ==null) { return HttpNotFound(); } - HyperLink hyperLink = await _context.HyperLink.SingleAsync(m => m.HRef == id); + HyperLink hyperLink = await _context.HyperLink.SingleAsync(m => m.HRef == href && m.Method == method); if (hyperLink == null) { return HttpNotFound(); @@ -90,14 +92,15 @@ namespace Yavsc.Controllers // GET: HyperLink/Delete/5 [ActionName("Delete")] - public async Task Delete(string id) + public async Task Delete(string href, string method) { - if (id == null) + if (href == null || method ==null) { return HttpNotFound(); } - HyperLink hyperLink = await _context.HyperLink.SingleAsync(m => m.HRef == id); + HyperLink hyperLink = await _context.HyperLink.SingleAsync(m => m.HRef == href && m.Method == method); + if (hyperLink == null) { return HttpNotFound(); @@ -109,9 +112,15 @@ namespace Yavsc.Controllers // POST: HyperLink/Delete/5 [HttpPost, ActionName("Delete")] [ValidateAntiForgeryToken] - public async Task DeleteConfirmed(string id) + public async Task DeleteConfirmed(string HRef, string Method) { - HyperLink hyperLink = await _context.HyperLink.SingleAsync(m => m.HRef == id); + if (HRef == null || Method ==null) + { + return HttpNotFound(); + } + + HyperLink hyperLink = await _context.HyperLink.SingleAsync(m => m.HRef == HRef && m.Method == Method); + _context.HyperLink.Remove(hyperLink); await _context.SaveChangesAsync(); return RedirectToAction("Index"); diff --git a/src/Yavsc/Makefile b/src/Yavsc/Makefile index 506a640f..56dc2c7d 100644 --- a/src/Yavsc/Makefile +++ b/src/Yavsc/Makefile @@ -8,6 +8,7 @@ MAKEFILE_DIR=$(SOURCE_DIR)/scripts/build/make BASERESX= Resources/Yavsc.ChatHub.resx\ Resources/Yavsc.ViewComponents.CommentViewComponent.resx\ Resources/Yavsc.ViewModels.FrontOffice.PerformerProfileViewModel.resx\ + Resources/Yavsc.ViewModels.NewAdminViewModel.resx\ Resources/Yavsc.YavscLocalisation.resx BASERESXGEN=$(BASERESX:.resx=.Designer.cs) diff --git a/src/Yavsc/Migrations/20190622172941_userTrack.Designer.cs b/src/Yavsc/Migrations/20190622172941_userTrack.Designer.cs new file mode 100644 index 00000000..2d59f051 --- /dev/null +++ b/src/Yavsc/Migrations/20190622172941_userTrack.Designer.cs @@ -0,0 +1,2060 @@ +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("20190622172941_userTrack")] + partial class userTrack + { + 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.Abstract.Identity.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.Access.Ban", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("Reason") + .IsRequired(); + + b.Property("TargetId") + .IsRequired(); + + b.Property("UserCreated"); + + b.Property("UserModified"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("OwnerId") + .IsRequired(); + + b.Property("UserId") + .IsRequired(); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Access.CircleAuthorizationToBlogPost", b => + { + b.Property("CircleId"); + + b.Property("BlogPostId"); + + b.HasKey("CircleId", "BlogPostId"); + }); + + modelBuilder.Entity("Yavsc.Models.AccountBalance", b => + { + b.Property("UserId"); + + b.Property("ContactCredits"); + + b.Property("Credits"); + + b.HasKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.ApplicationUser", b => + { + b.Property("Id"); + + b.Property("AccessFailedCount"); + + b.Property("AllowMonthlyEmail"); + + b.Property("Avatar") + .HasAnnotation("MaxLength", 512) + .HasAnnotation("Relational:DefaultValue", "/images/Users/icon_user.png") + .HasAnnotation("Relational:DefaultValueType", "System.String"); + + b.Property("BankInfoId"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken(); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("DedicatedGoogleCalendar") + .HasAnnotation("MaxLength", 512); + + b.Property("DiskQuota") + .HasAnnotation("Relational:DefaultValue", "524288000") + .HasAnnotation("Relational:DefaultValueType", "System.Int64"); + + 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("MaxFileSize"); + + 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("UserCreated"); + + b.Property("UserModified"); + + 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.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.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.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.Billing.CommandLine", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Count"); + + b.Property("Currency"); + + b.Property("Description") + .IsRequired() + .HasAnnotation("MaxLength", 512); + + b.Property("EstimateId"); + + b.Property("EstimateTemplateId"); + + b.Property("Name") + .IsRequired() + .HasAnnotation("MaxLength", 256); + + 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") + .IsRequired(); + + b.Property("Description"); + + b.Property("OwnerId"); + + 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.BlogPost", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AuthorId"); + + b.Property("Content") + .HasAnnotation("MaxLength", 56224); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("Lang") + .HasAnnotation("MaxLength", 8); + + b.Property("Photo") + .HasAnnotation("MaxLength", 1024); + + b.Property("Rate"); + + b.Property("Title") + .HasAnnotation("MaxLength", 1024); + + b.Property("UserCreated"); + + b.Property("UserModified"); + + b.Property("Visible"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog.BlogTag", b => + { + b.Property("PostId"); + + b.Property("TagId"); + + b.HasKey("PostId", "TagId"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog.Comment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AuthorId") + .IsRequired(); + + b.Property("Content") + .HasAnnotation("MaxLength", 1024); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("ParentId"); + + b.Property("PostId"); + + b.Property("UserCreated"); + + b.Property("UserModified"); + + b.Property("Visible"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Calendar.Period", b => + { + b.Property("Start"); + + b.Property("End"); + + b.HasKey("Start", "End"); + }); + + modelBuilder.Entity("Yavsc.Models.Calendar.Schedule", b => + { + b.Property("OwnerId"); + + b.HasKey("OwnerId"); + }); + + modelBuilder.Entity("Yavsc.Models.Calendar.ScheduledEvent", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("PeriodEnd"); + + b.Property("PeriodStart"); + + b.Property("Reccurence"); + + b.Property("ScheduleOwnerId"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Chat.ChatConnection", b => + { + b.Property("ConnectionId"); + + b.Property("ApplicationUserId") + .IsRequired(); + + b.Property("Connected"); + + b.Property("UserAgent"); + + b.HasKey("ConnectionId"); + }); + + modelBuilder.Entity("Yavsc.Models.Chat.ChatRoom", b => + { + b.Property("Name") + .HasAnnotation("MaxLength", 255); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("LatestJoinPart"); + + b.Property("OwnerId"); + + b.Property("Topic"); + + b.Property("UserCreated"); + + b.Property("UserModified"); + + b.HasKey("Name"); + }); + + modelBuilder.Entity("Yavsc.Models.Chat.ChatRoomAccess", b => + { + b.Property("ChannelName"); + + b.Property("UserId"); + + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Level"); + + b.HasKey("ChannelName", "UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Cratie.Option", b => + { + b.Property("Code"); + + b.Property("CodeScrutin"); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("Description"); + + b.Property("UserCreated"); + + b.Property("UserModified"); + + b.HasKey("Code", "CodeScrutin"); + }); + + modelBuilder.Entity("Yavsc.Models.Drawing.Color", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Blue"); + + b.Property("Green"); + + b.Property("Name"); + + b.Property("Red"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Forms.Form", b => + { + b.Property("Id"); + + b.Property("Summary"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.BrusherProfile", b => + { + b.Property("UserId"); + + b.Property("ActionDistance"); + + b.Property("CarePrice"); + + b.Property("FlatFeeDiscount"); + + b.Property("HalfBalayagePrice"); + + b.Property("HalfBrushingPrice"); + + b.Property("HalfColorPrice"); + + b.Property("HalfDefrisPrice"); + + b.Property("HalfFoldingPrice"); + + b.Property("HalfMechPrice"); + + b.Property("HalfMultiColorPrice"); + + b.Property("HalfPermanentPrice"); + + b.Property("KidCutPrice"); + + b.Property("LongBalayagePrice"); + + b.Property("LongBrushingPrice"); + + b.Property("LongColorPrice"); + + b.Property("LongDefrisPrice"); + + b.Property("LongFoldingPrice"); + + b.Property("LongMechPrice"); + + b.Property("LongMultiColorPrice"); + + b.Property("LongPermanentPrice"); + + b.Property("ManBrushPrice"); + + b.Property("ManCutPrice"); + + b.Property("ScheduleOwnerId"); + + b.Property("ShampooPrice"); + + b.Property("ShortBalayagePrice"); + + b.Property("ShortBrushingPrice"); + + b.Property("ShortColorPrice"); + + b.Property("ShortDefrisPrice"); + + b.Property("ShortFoldingPrice"); + + b.Property("ShortMechPrice"); + + b.Property("ShortMultiColorPrice"); + + b.Property("ShortPermanentPrice"); + + b.Property("WomenHalfCutPrice"); + + b.Property("WomenLongCutPrice"); + + b.Property("WomenShortCutPrice"); + + b.HasKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairCutQuery", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ActivityCode") + .IsRequired(); + + b.Property("AdditionalInfo") + .HasAnnotation("MaxLength", 512); + + b.Property("ClientId") + .IsRequired(); + + b.Property("Consent"); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("Description"); + + b.Property("EventDate"); + + b.Property("LocationId"); + + b.Property("PaymentId"); + + b.Property("PerformerId") + .IsRequired(); + + b.Property("PrestationId"); + + b.Property("Previsional"); + + b.Property("Rejected"); + + b.Property("RejectedAt"); + + b.Property("SelectedProfileUserId"); + + b.Property("Status"); + + b.Property("UserCreated"); + + b.Property("UserModified"); + + b.Property("ValidationDate"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairMultiCutQuery", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ActivityCode") + .IsRequired(); + + b.Property("ClientId") + .IsRequired(); + + b.Property("Consent"); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("Description"); + + b.Property("EventDate"); + + b.Property("LocationId"); + + b.Property("PaymentId"); + + b.Property("PerformerId") + .IsRequired(); + + b.Property("Previsional"); + + b.Property("Rejected"); + + b.Property("RejectedAt"); + + b.Property("Status"); + + b.Property("UserCreated"); + + b.Property("UserModified"); + + b.Property("ValidationDate"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairPrestation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Cares"); + + b.Property("Cut"); + + b.Property("Dressing"); + + b.Property("Gender"); + + b.Property("Length"); + + b.Property("Shampoo"); + + b.Property("Tech"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairPrestationCollectionItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("PrestationId"); + + b.Property("QueryId"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairTaint", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Brand"); + + b.Property("ColorId"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairTaintInstance", b => + { + b.Property("TaintId"); + + b.Property("PrestationId"); + + b.HasKey("TaintId", "PrestationId"); + }); + + modelBuilder.Entity("Yavsc.Models.Identity.DeviceDeclaration", b => + { + b.Property("DeviceId"); + + b.Property("DeclarationDate") + .ValueGeneratedOnAdd() + .HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP"); + + b.Property("DeviceOwnerId"); + + b.Property("LatestActivityUpdate"); + + b.Property("Model"); + + b.Property("Platform"); + + b.Property("Version"); + + b.HasKey("DeviceId"); + }); + + modelBuilder.Entity("Yavsc.Models.IT.Evolution.Feature", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Description") + .HasAnnotation("MaxLength", 10240); + + b.Property("ShortName") + .HasAnnotation("MaxLength", 256); + + b.Property("Status"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.IT.Fixing.Bug", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Description"); + + b.Property("FeatureId"); + + b.Property("Status"); + + b.Property("Title"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Market.Product", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Depth"); + + b.Property("Description"); + + b.Property("Height"); + + b.Property("Name"); + + b.Property("Price"); + + b.Property("Public"); + + b.Property("Weight"); + + b.Property("Width"); + + b.HasKey("Id"); + }); + + 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.Announce", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("For"); + + b.Property("Message"); + + b.Property("OwnerId"); + + b.Property("Sender"); + + b.Property("Topic"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Messaging.DimissClicked", b => + { + b.Property("UserId"); + + b.Property("NotificationId"); + + b.HasKey("UserId", "NotificationId"); + }); + + modelBuilder.Entity("Yavsc.Models.Messaging.Notification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Target"); + + b.Property("body") + .IsRequired(); + + b.Property("click_action") + .IsRequired(); + + b.Property("color"); + + b.Property("icon") + .HasAnnotation("Relational:DefaultValue", "exclam") + .HasAnnotation("Relational:DefaultValueType", "System.String"); + + b.Property("sound"); + + b.Property("tag"); + + b.Property("title") + .IsRequired(); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Musical.Instrument", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Name") + .IsRequired() + .HasAnnotation("MaxLength", 255); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Musical.MusicalPreference", b => + { + b.Property("OwnerProfileId"); + + b.Property("DjSettingsUserId"); + + b.Property("GeneralSettingsUserId"); + + b.Property("Rate"); + + b.Property("TendencyId"); + + b.HasKey("OwnerProfileId"); + }); + + modelBuilder.Entity("Yavsc.Models.Musical.MusicalTendency", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Name") + .IsRequired() + .HasAnnotation("MaxLength", 255); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Musical.Profiles.DjSettings", b => + { + b.Property("UserId"); + + b.Property("SoundCloudId"); + + b.HasKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Musical.Profiles.GeneralSettings", b => + { + b.Property("UserId"); + + b.HasKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Musical.Profiles.Instrumentation", b => + { + b.Property("InstrumentId"); + + b.Property("UserId"); + + b.HasKey("InstrumentId", "UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Payment.PayPalPayment", b => + { + b.Property("CreationToken"); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("ExecutorId") + .IsRequired(); + + b.Property("OrderReference"); + + b.Property("PaypalPayerId"); + + b.Property("State"); + + b.Property("UserCreated"); + + b.Property("UserModified"); + + b.HasKey("CreationToken"); + }); + + modelBuilder.Entity("Yavsc.Models.Relationship.Circle", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ApplicationUserId"); + + b.Property("Name"); + + b.Property("OwnerId"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Relationship.CircleMember", b => + { + b.Property("MemberId"); + + b.Property("CircleId"); + + b.HasKey("MemberId", "CircleId"); + }); + + modelBuilder.Entity("Yavsc.Models.Relationship.Contact", b => + { + b.Property("OwnerId"); + + b.Property("UserId"); + + b.Property("AddressId"); + + b.Property("ApplicationUserId"); + + b.Property("EMail"); + + b.Property("Name"); + + b.HasKey("OwnerId", "UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Relationship.HyperLink", b => + { + b.Property("HRef"); + + b.Property("Method"); + + b.Property("BrusherProfileUserId"); + + b.Property("ContentType"); + + b.Property("PayPalPaymentCreationToken"); + + b.Property("Rel"); + + b.HasKey("HRef", "Method"); + }); + + modelBuilder.Entity("Yavsc.Models.Relationship.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.Models.Relationship.PostalAddress", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("City"); + + b.Property("Country"); + + b.Property("PostalCode"); + + b.Property("Province"); + + b.Property("State"); + + b.Property("Street1"); + + b.Property("Street2"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Relationship.Tag", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Name") + .IsRequired(); + + 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.Streaming.LiveFlow", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DifferedFileName") + .HasAnnotation("MaxLength", 255); + + b.Property("MediaType") + .HasAnnotation("MaxLength", 127); + + b.Property("OwnerId") + .IsRequired(); + + b.Property("Pitch") + .HasAnnotation("MaxLength", 1023); + + b.Property("SequenceNumber"); + + b.Property("Title") + .HasAnnotation("MaxLength", 255); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.Activity", b => + { + b.Property("Code") + .HasAnnotation("MaxLength", 512); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("Description"); + + b.Property("Hidden"); + + b.Property("ModeratorGroupName"); + + b.Property("Name") + .IsRequired() + .HasAnnotation("MaxLength", 512); + + b.Property("ParentCode") + .HasAnnotation("MaxLength", 512); + + b.Property("Photo"); + + b.Property("Rate"); + + b.Property("SettingsClassName"); + + b.Property("UserCreated"); + + b.Property("UserModified"); + + b.HasKey("Code"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.CommandForm", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ActionName"); + + b.Property("ActivityCode") + .IsRequired(); + + b.Property("Title"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.CoWorking", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("FormationSettingsUserId"); + + b.Property("PerformerId"); + + b.Property("WorkingForId"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b => + { + b.Property("PerformerId"); + + b.Property("AcceptNotifications"); + + b.Property("AcceptPublicContact"); + + b.Property("Active"); + + b.Property("MaxDailyCost"); + + b.Property("MinDailyCost"); + + b.Property("OrganizationAddressId"); + + b.Property("Rate"); + + b.Property("SIREN") + .IsRequired() + .HasAnnotation("MaxLength", 14); + + b.Property("UseGeoLocalizationToReduceDistanceWithClients"); + + b.Property("WebSite"); + + b.HasKey("PerformerId"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.Profiles.FormationSettings", b => + { + b.Property("UserId"); + + b.HasKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.RdvQuery", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ActivityCode") + .IsRequired(); + + b.Property("ClientId") + .IsRequired(); + + b.Property("Consent"); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("Description"); + + b.Property("EventDate"); + + b.Property("LocationId"); + + b.Property("LocationType"); + + b.Property("PaymentId"); + + b.Property("PerformerId") + .IsRequired(); + + b.Property("Previsional"); + + b.Property("Reason"); + + b.Property("Rejected"); + + b.Property("RejectedAt"); + + b.Property("Status"); + + b.Property("UserCreated"); + + b.Property("UserModified"); + + b.Property("ValidationDate"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.UserActivity", b => + { + b.Property("DoesCode"); + + b.Property("UserId"); + + b.Property("Weight"); + + b.HasKey("DoesCode", "UserId"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.Blog.BlogTrad", b => + { + b.Property("PostId"); + + b.Property("Lang"); + + b.Property("Body"); + + b.Property("Title"); + + b.Property("TraducerId"); + + b.HasKey("PostId", "Lang"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.EMailing.MailingTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Body") + .HasAnnotation("MaxLength", 65536); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("ManagerId") + .IsRequired(); + + b.Property("ReplyToAddress"); + + b.Property("SuccessorId") + .IsRequired(); + + b.Property("ToSend"); + + b.Property("Topic") + .HasAnnotation("MaxLength", 128); + + b.Property("UserCreated"); + + b.Property("UserModified"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.IT.Project", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ActivityCode") + .IsRequired(); + + b.Property("ClientId") + .IsRequired(); + + b.Property("Consent"); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("Description"); + + b.Property("GitId"); + + b.Property("Name") + .IsRequired(); + + b.Property("OwnerId"); + + b.Property("PaymentId"); + + b.Property("PerformerId") + .IsRequired(); + + b.Property("Previsional"); + + b.Property("Rejected"); + + b.Property("RejectedAt"); + + b.Property("Status"); + + b.Property("UserCreated"); + + b.Property("UserModified"); + + b.Property("ValidationDate"); + + b.Property("Version"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.IT.ProjectBuildConfiguration", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Name") + .IsRequired(); + + b.Property("ProjectId"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.IT.SourceCode.GitRepositoryReference", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Branch") + .HasAnnotation("MaxLength", 512); + + b.Property("OwnerId") + .HasAnnotation("MaxLength", 1024); + + b.Property("Path") + .IsRequired(); + + b.Property("Url") + .HasAnnotation("MaxLength", 2048); + + b.HasKey("Id"); + }); + + 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.Ban", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("TargetId"); + }); + + modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("OwnerId"); + + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Access.CircleAuthorizationToBlogPost", b => + { + b.HasOne("Yavsc.Models.Blog.BlogPost") + .WithMany() + .HasForeignKey("BlogPostId"); + + b.HasOne("Yavsc.Models.Relationship.Circle") + .WithMany() + .HasForeignKey("CircleId"); + }); + + modelBuilder.Entity("Yavsc.Models.AccountBalance", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithOne() + .HasForeignKey("Yavsc.Models.AccountBalance", "UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.ApplicationUser", b => + { + b.HasOne("Yavsc.Models.Bank.BankIdentity") + .WithMany() + .HasForeignKey("BankInfoId"); + + b.HasOne("Yavsc.Models.Relationship.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.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.ApplicationUser") + .WithMany() + .HasForeignKey("ClientId"); + + b.HasOne("Yavsc.Models.Workflow.RdvQuery") + .WithMany() + .HasForeignKey("CommandId"); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + .WithMany() + .HasForeignKey("OwnerId"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog.BlogPost", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("AuthorId"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog.BlogTag", b => + { + b.HasOne("Yavsc.Models.Blog.BlogPost") + .WithMany() + .HasForeignKey("PostId"); + + b.HasOne("Yavsc.Models.Relationship.Tag") + .WithMany() + .HasForeignKey("TagId"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog.Comment", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("AuthorId"); + + b.HasOne("Yavsc.Models.Blog.Comment") + .WithMany() + .HasForeignKey("ParentId"); + + b.HasOne("Yavsc.Models.Blog.BlogPost") + .WithMany() + .HasForeignKey("PostId"); + }); + + modelBuilder.Entity("Yavsc.Models.Calendar.Schedule", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("OwnerId"); + }); + + modelBuilder.Entity("Yavsc.Models.Calendar.ScheduledEvent", b => + { + b.HasOne("Yavsc.Models.Calendar.Schedule") + .WithMany() + .HasForeignKey("ScheduleOwnerId"); + + b.HasOne("Yavsc.Models.Calendar.Period") + .WithMany() + .HasForeignKey("PeriodStart", "PeriodEnd"); + }); + + modelBuilder.Entity("Yavsc.Models.Chat.ChatConnection", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("ApplicationUserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Chat.ChatRoom", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("OwnerId"); + }); + + modelBuilder.Entity("Yavsc.Models.Chat.ChatRoomAccess", b => + { + b.HasOne("Yavsc.Models.Chat.ChatRoom") + .WithMany() + .HasForeignKey("ChannelName"); + + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.BrusherProfile", b => + { + b.HasOne("Yavsc.Models.Calendar.Schedule") + .WithMany() + .HasForeignKey("ScheduleOwnerId"); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairCutQuery", b => + { + b.HasOne("Yavsc.Models.Workflow.Activity") + .WithMany() + .HasForeignKey("ActivityCode"); + + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("ClientId"); + + b.HasOne("Yavsc.Models.Relationship.Location") + .WithMany() + .HasForeignKey("LocationId"); + + b.HasOne("Yavsc.Models.Payment.PayPalPayment") + .WithMany() + .HasForeignKey("PaymentId"); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + .WithMany() + .HasForeignKey("PerformerId"); + + b.HasOne("Yavsc.Models.Haircut.HairPrestation") + .WithMany() + .HasForeignKey("PrestationId"); + + b.HasOne("Yavsc.Models.Haircut.BrusherProfile") + .WithMany() + .HasForeignKey("SelectedProfileUserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairMultiCutQuery", b => + { + b.HasOne("Yavsc.Models.Workflow.Activity") + .WithMany() + .HasForeignKey("ActivityCode"); + + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("ClientId"); + + b.HasOne("Yavsc.Models.Relationship.Location") + .WithMany() + .HasForeignKey("LocationId"); + + b.HasOne("Yavsc.Models.Payment.PayPalPayment") + .WithMany() + .HasForeignKey("PaymentId"); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + .WithMany() + .HasForeignKey("PerformerId"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairPrestationCollectionItem", b => + { + b.HasOne("Yavsc.Models.Haircut.HairPrestation") + .WithMany() + .HasForeignKey("PrestationId"); + + b.HasOne("Yavsc.Models.Haircut.HairMultiCutQuery") + .WithMany() + .HasForeignKey("QueryId"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairTaint", b => + { + b.HasOne("Yavsc.Models.Drawing.Color") + .WithMany() + .HasForeignKey("ColorId"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairTaintInstance", b => + { + b.HasOne("Yavsc.Models.Haircut.HairPrestation") + .WithMany() + .HasForeignKey("PrestationId"); + + b.HasOne("Yavsc.Models.Haircut.HairTaint") + .WithMany() + .HasForeignKey("TaintId"); + }); + + modelBuilder.Entity("Yavsc.Models.Identity.DeviceDeclaration", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("DeviceOwnerId"); + }); + + modelBuilder.Entity("Yavsc.Models.IT.Fixing.Bug", b => + { + b.HasOne("Yavsc.Models.IT.Evolution.Feature") + .WithMany() + .HasForeignKey("FeatureId"); + }); + + modelBuilder.Entity("Yavsc.Models.Market.Service", b => + { + b.HasOne("Yavsc.Models.Workflow.Activity") + .WithMany() + .HasForeignKey("ContextId"); + }); + + modelBuilder.Entity("Yavsc.Models.Messaging.Announce", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("OwnerId"); + }); + + modelBuilder.Entity("Yavsc.Models.Messaging.DimissClicked", b => + { + b.HasOne("Yavsc.Models.Messaging.Notification") + .WithMany() + .HasForeignKey("NotificationId"); + + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Musical.MusicalPreference", b => + { + b.HasOne("Yavsc.Models.Musical.Profiles.DjSettings") + .WithMany() + .HasForeignKey("DjSettingsUserId"); + + b.HasOne("Yavsc.Models.Musical.Profiles.GeneralSettings") + .WithMany() + .HasForeignKey("GeneralSettingsUserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Musical.Profiles.Instrumentation", b => + { + b.HasOne("Yavsc.Models.Musical.Instrument") + .WithMany() + .HasForeignKey("InstrumentId"); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Payment.PayPalPayment", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("ExecutorId"); + }); + + modelBuilder.Entity("Yavsc.Models.Relationship.Circle", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("ApplicationUserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Relationship.CircleMember", b => + { + b.HasOne("Yavsc.Models.Relationship.Circle") + .WithMany() + .HasForeignKey("CircleId"); + + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("MemberId"); + }); + + modelBuilder.Entity("Yavsc.Models.Relationship.Contact", b => + { + b.HasOne("Yavsc.Models.Relationship.PostalAddress") + .WithMany() + .HasForeignKey("AddressId"); + + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("ApplicationUserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Relationship.HyperLink", b => + { + b.HasOne("Yavsc.Models.Haircut.BrusherProfile") + .WithMany() + .HasForeignKey("BrusherProfileUserId"); + + b.HasOne("Yavsc.Models.Payment.PayPalPayment") + .WithMany() + .HasForeignKey("PayPalPaymentCreationToken"); + }); + + modelBuilder.Entity("Yavsc.Models.Streaming.LiveFlow", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("OwnerId"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.Activity", b => + { + b.HasOne("Yavsc.Models.Workflow.Activity") + .WithMany() + .HasForeignKey("ParentCode"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.CommandForm", b => + { + b.HasOne("Yavsc.Models.Workflow.Activity") + .WithMany() + .HasForeignKey("ActivityCode"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.CoWorking", b => + { + b.HasOne("Yavsc.Models.Workflow.Profiles.FormationSettings") + .WithMany() + .HasForeignKey("FormationSettingsUserId"); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + .WithMany() + .HasForeignKey("PerformerId"); + + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("WorkingForId"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b => + { + b.HasOne("Yavsc.Models.Relationship.Location") + .WithMany() + .HasForeignKey("OrganizationAddressId"); + + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("PerformerId"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.RdvQuery", b => + { + b.HasOne("Yavsc.Models.Workflow.Activity") + .WithMany() + .HasForeignKey("ActivityCode"); + + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("ClientId"); + + b.HasOne("Yavsc.Models.Relationship.Location") + .WithMany() + .HasForeignKey("LocationId"); + + b.HasOne("Yavsc.Models.Payment.PayPalPayment") + .WithMany() + .HasForeignKey("PaymentId"); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + .WithMany() + .HasForeignKey("PerformerId"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.UserActivity", b => + { + b.HasOne("Yavsc.Models.Workflow.Activity") + .WithMany() + .HasForeignKey("DoesCode"); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.Blog.BlogTrad", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("TraducerId"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.EMailing.MailingTemplate", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("ManagerId"); + + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("SuccessorId"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.IT.Project", b => + { + b.HasOne("Yavsc.Models.Workflow.Activity") + .WithMany() + .HasForeignKey("ActivityCode"); + + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("ClientId"); + + b.HasOne("Yavsc.Server.Models.IT.SourceCode.GitRepositoryReference") + .WithMany() + .HasForeignKey("GitId"); + + b.HasOne("Yavsc.Models.Payment.PayPalPayment") + .WithMany() + .HasForeignKey("PaymentId"); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + .WithMany() + .HasForeignKey("PerformerId"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.IT.ProjectBuildConfiguration", b => + { + b.HasOne("Yavsc.Server.Models.IT.Project") + .WithMany() + .HasForeignKey("ProjectId"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.IT.SourceCode.GitRepositoryReference", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("OwnerId"); + }); + } + } +} diff --git a/src/Yavsc/Migrations/20190622172941_userTrack.cs b/src/Yavsc/Migrations/20190622172941_userTrack.cs new file mode 100644 index 00000000..ed0a2b0d --- /dev/null +++ b/src/Yavsc/Migrations/20190622172941_userTrack.cs @@ -0,0 +1,943 @@ +using System; +using System.Collections.Generic; +using Microsoft.Data.Entity.Migrations; + +namespace Yavsc.Migrations +{ + public partial class userTrack : 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_Ban_ApplicationUser_TargetId", table: "Ban"); + migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_OwnerId", table: "BlackListed"); + migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_BlogPost_BlogPostId", table: "CircleAuthorizationToBlogPost"); + migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", table: "CircleAuthorizationToBlogPost"); + 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_Estimate_ApplicationUser_ClientId", table: "Estimate"); + migrationBuilder.DropForeignKey(name: "FK_BlogTag_BlogPost_PostId", table: "BlogTag"); + migrationBuilder.DropForeignKey(name: "FK_BlogTag_Tag_TagId", table: "BlogTag"); + migrationBuilder.DropForeignKey(name: "FK_Comment_ApplicationUser_AuthorId", table: "Comment"); + migrationBuilder.DropForeignKey(name: "FK_Comment_BlogPost_PostId", table: "Comment"); + migrationBuilder.DropForeignKey(name: "FK_Schedule_ApplicationUser_OwnerId", table: "Schedule"); + migrationBuilder.DropForeignKey(name: "FK_ChatConnection_ApplicationUser_ApplicationUserId", table: "ChatConnection"); + migrationBuilder.DropForeignKey(name: "FK_ChatRoomAccess_ApplicationUser_UserId", table: "ChatRoomAccess"); + migrationBuilder.DropForeignKey(name: "FK_BrusherProfile_PerformerProfile_UserId", table: "BrusherProfile"); + migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_Activity_ActivityCode", table: "HairCutQuery"); + migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_ApplicationUser_ClientId", table: "HairCutQuery"); + migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_PerformerProfile_PerformerId", table: "HairCutQuery"); + migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_HairPrestation_PrestationId", table: "HairCutQuery"); + migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_Activity_ActivityCode", table: "HairMultiCutQuery"); + migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_ApplicationUser_ClientId", table: "HairMultiCutQuery"); + migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", table: "HairMultiCutQuery"); + migrationBuilder.DropForeignKey(name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId", table: "HairPrestationCollectionItem"); + migrationBuilder.DropForeignKey(name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId", table: "HairPrestationCollectionItem"); + migrationBuilder.DropForeignKey(name: "FK_HairTaint_Color_ColorId", table: "HairTaint"); + migrationBuilder.DropForeignKey(name: "FK_HairTaintInstance_HairPrestation_PrestationId", table: "HairTaintInstance"); + migrationBuilder.DropForeignKey(name: "FK_HairTaintInstance_HairTaint_TaintId", table: "HairTaintInstance"); + migrationBuilder.DropForeignKey(name: "FK_DimissClicked_Notification_NotificationId", table: "DimissClicked"); + migrationBuilder.DropForeignKey(name: "FK_DimissClicked_ApplicationUser_UserId", table: "DimissClicked"); + migrationBuilder.DropForeignKey(name: "FK_Instrumentation_Instrument_InstrumentId", table: "Instrumentation"); + migrationBuilder.DropForeignKey(name: "FK_PayPalPayment_ApplicationUser_ExecutorId", table: "PayPalPayment"); + migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember"); + migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember"); + migrationBuilder.DropForeignKey(name: "FK_Contact_PostalAddress_AddressId", table: "Contact"); + migrationBuilder.DropForeignKey(name: "FK_LiveFlow_ApplicationUser_OwnerId", table: "LiveFlow"); + migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm"); + migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile"); + migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile"); + migrationBuilder.DropForeignKey(name: "FK_RdvQuery_Activity_ActivityCode", table: "RdvQuery"); + migrationBuilder.DropForeignKey(name: "FK_RdvQuery_ApplicationUser_ClientId", table: "RdvQuery"); + migrationBuilder.DropForeignKey(name: "FK_RdvQuery_PerformerProfile_PerformerId", table: "RdvQuery"); + migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity"); + migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity"); + migrationBuilder.DropForeignKey(name: "FK_MailingTemplate_ApplicationUser_ManagerId", table: "MailingTemplate"); + migrationBuilder.DropForeignKey(name: "FK_MailingTemplate_ApplicationUser_SuccessorId", table: "MailingTemplate"); + migrationBuilder.DropForeignKey(name: "FK_Project_Activity_ActivityCode", table: "Project"); + migrationBuilder.DropForeignKey(name: "FK_Project_ApplicationUser_ClientId", table: "Project"); + migrationBuilder.DropForeignKey(name: "FK_Project_GitRepositoryReference_GitId", table: "Project"); + migrationBuilder.DropForeignKey(name: "FK_Project_PerformerProfile_PerformerId", table: "Project"); + migrationBuilder.DropForeignKey(name: "FK_ProjectBuildConfiguration_Project_ProjectId", table: "ProjectBuildConfiguration"); + migrationBuilder.AddColumn( + name: "DateCreated", + table: "AspNetUsers", + nullable: false, + defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); + migrationBuilder.AddColumn( + name: "DateModified", + table: "AspNetUsers", + nullable: false, + defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); + migrationBuilder.AddColumn( + name: "UserCreated", + table: "AspNetUsers", + nullable: true); + migrationBuilder.AddColumn( + name: "UserModified", + table: "AspNetUsers", + 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_Ban_ApplicationUser_TargetId", + table: "Ban", + column: "TargetId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_BlackListed_ApplicationUser_OwnerId", + table: "BlackListed", + column: "OwnerId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_BlackListed_ApplicationUser_UserId", + table: "BlackListed", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_CircleAuthorizationToBlogPost_BlogPost_BlogPostId", + table: "CircleAuthorizationToBlogPost", + column: "BlogPostId", + principalTable: "BlogPost", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", + table: "CircleAuthorizationToBlogPost", + column: "CircleId", + principalTable: "Circle", + 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_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_Estimate_ApplicationUser_ClientId", + table: "Estimate", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_BlogTag_BlogPost_PostId", + table: "BlogTag", + column: "PostId", + principalTable: "BlogPost", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_BlogTag_Tag_TagId", + table: "BlogTag", + column: "TagId", + principalTable: "Tag", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_Comment_ApplicationUser_AuthorId", + table: "Comment", + column: "AuthorId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_Comment_BlogPost_PostId", + table: "Comment", + column: "PostId", + principalTable: "BlogPost", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_Schedule_ApplicationUser_OwnerId", + table: "Schedule", + column: "OwnerId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_ChatConnection_ApplicationUser_ApplicationUserId", + table: "ChatConnection", + column: "ApplicationUserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_ChatRoomAccess_ApplicationUser_UserId", + table: "ChatRoomAccess", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_BrusherProfile_PerformerProfile_UserId", + table: "BrusherProfile", + column: "UserId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_HairCutQuery_Activity_ActivityCode", + table: "HairCutQuery", + column: "ActivityCode", + principalTable: "Activity", + principalColumn: "Code", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_HairCutQuery_ApplicationUser_ClientId", + table: "HairCutQuery", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_HairCutQuery_PerformerProfile_PerformerId", + table: "HairCutQuery", + column: "PerformerId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_HairCutQuery_HairPrestation_PrestationId", + table: "HairCutQuery", + column: "PrestationId", + principalTable: "HairPrestation", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_HairMultiCutQuery_Activity_ActivityCode", + table: "HairMultiCutQuery", + column: "ActivityCode", + principalTable: "Activity", + principalColumn: "Code", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_HairMultiCutQuery_ApplicationUser_ClientId", + table: "HairMultiCutQuery", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", + table: "HairMultiCutQuery", + column: "PerformerId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId", + table: "HairPrestationCollectionItem", + column: "PrestationId", + principalTable: "HairPrestation", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId", + table: "HairPrestationCollectionItem", + column: "QueryId", + principalTable: "HairMultiCutQuery", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_HairTaint_Color_ColorId", + table: "HairTaint", + column: "ColorId", + principalTable: "Color", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_HairTaintInstance_HairPrestation_PrestationId", + table: "HairTaintInstance", + column: "PrestationId", + principalTable: "HairPrestation", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_HairTaintInstance_HairTaint_TaintId", + table: "HairTaintInstance", + column: "TaintId", + principalTable: "HairTaint", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_DimissClicked_Notification_NotificationId", + table: "DimissClicked", + column: "NotificationId", + principalTable: "Notification", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_DimissClicked_ApplicationUser_UserId", + table: "DimissClicked", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_Instrumentation_Instrument_InstrumentId", + table: "Instrumentation", + column: "InstrumentId", + principalTable: "Instrument", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_PayPalPayment_ApplicationUser_ExecutorId", + table: "PayPalPayment", + column: "ExecutorId", + principalTable: "AspNetUsers", + principalColumn: "Id", + 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_Contact_PostalAddress_AddressId", + table: "Contact", + column: "AddressId", + principalTable: "PostalAddress", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_LiveFlow_ApplicationUser_OwnerId", + table: "LiveFlow", + column: "OwnerId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_CommandForm_Activity_ActivityCode", + table: "CommandForm", + 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); + migrationBuilder.AddForeignKey( + name: "FK_RdvQuery_Activity_ActivityCode", + table: "RdvQuery", + column: "ActivityCode", + principalTable: "Activity", + principalColumn: "Code", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_RdvQuery_ApplicationUser_ClientId", + table: "RdvQuery", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_RdvQuery_PerformerProfile_PerformerId", + table: "RdvQuery", + column: "PerformerId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_UserActivity_Activity_DoesCode", + table: "UserActivity", + column: "DoesCode", + principalTable: "Activity", + principalColumn: "Code", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_UserActivity_PerformerProfile_UserId", + table: "UserActivity", + column: "UserId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_MailingTemplate_ApplicationUser_ManagerId", + table: "MailingTemplate", + column: "ManagerId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_MailingTemplate_ApplicationUser_SuccessorId", + table: "MailingTemplate", + column: "SuccessorId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_Project_Activity_ActivityCode", + table: "Project", + column: "ActivityCode", + principalTable: "Activity", + principalColumn: "Code", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_Project_ApplicationUser_ClientId", + table: "Project", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_Project_GitRepositoryReference_GitId", + table: "Project", + column: "GitId", + principalTable: "GitRepositoryReference", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_Project_PerformerProfile_PerformerId", + table: "Project", + column: "PerformerId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_ProjectBuildConfiguration_Project_ProjectId", + table: "ProjectBuildConfiguration", + column: "ProjectId", + principalTable: "Project", + 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_Ban_ApplicationUser_TargetId", table: "Ban"); + migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_OwnerId", table: "BlackListed"); + migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_UserId", table: "BlackListed"); + migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_BlogPost_BlogPostId", table: "CircleAuthorizationToBlogPost"); + migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", table: "CircleAuthorizationToBlogPost"); + 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_Estimate_ApplicationUser_ClientId", table: "Estimate"); + migrationBuilder.DropForeignKey(name: "FK_BlogTag_BlogPost_PostId", table: "BlogTag"); + migrationBuilder.DropForeignKey(name: "FK_BlogTag_Tag_TagId", table: "BlogTag"); + migrationBuilder.DropForeignKey(name: "FK_Comment_ApplicationUser_AuthorId", table: "Comment"); + migrationBuilder.DropForeignKey(name: "FK_Comment_BlogPost_PostId", table: "Comment"); + migrationBuilder.DropForeignKey(name: "FK_Schedule_ApplicationUser_OwnerId", table: "Schedule"); + migrationBuilder.DropForeignKey(name: "FK_ChatConnection_ApplicationUser_ApplicationUserId", table: "ChatConnection"); + migrationBuilder.DropForeignKey(name: "FK_ChatRoomAccess_ApplicationUser_UserId", table: "ChatRoomAccess"); + migrationBuilder.DropForeignKey(name: "FK_BrusherProfile_PerformerProfile_UserId", table: "BrusherProfile"); + migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_Activity_ActivityCode", table: "HairCutQuery"); + migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_ApplicationUser_ClientId", table: "HairCutQuery"); + migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_PerformerProfile_PerformerId", table: "HairCutQuery"); + migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_HairPrestation_PrestationId", table: "HairCutQuery"); + migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_Activity_ActivityCode", table: "HairMultiCutQuery"); + migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_ApplicationUser_ClientId", table: "HairMultiCutQuery"); + migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", table: "HairMultiCutQuery"); + migrationBuilder.DropForeignKey(name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId", table: "HairPrestationCollectionItem"); + migrationBuilder.DropForeignKey(name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId", table: "HairPrestationCollectionItem"); + migrationBuilder.DropForeignKey(name: "FK_HairTaint_Color_ColorId", table: "HairTaint"); + migrationBuilder.DropForeignKey(name: "FK_HairTaintInstance_HairPrestation_PrestationId", table: "HairTaintInstance"); + migrationBuilder.DropForeignKey(name: "FK_HairTaintInstance_HairTaint_TaintId", table: "HairTaintInstance"); + migrationBuilder.DropForeignKey(name: "FK_DimissClicked_Notification_NotificationId", table: "DimissClicked"); + migrationBuilder.DropForeignKey(name: "FK_DimissClicked_ApplicationUser_UserId", table: "DimissClicked"); + migrationBuilder.DropForeignKey(name: "FK_Instrumentation_Instrument_InstrumentId", table: "Instrumentation"); + migrationBuilder.DropForeignKey(name: "FK_PayPalPayment_ApplicationUser_ExecutorId", table: "PayPalPayment"); + migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember"); + migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember"); + migrationBuilder.DropForeignKey(name: "FK_Contact_PostalAddress_AddressId", table: "Contact"); + migrationBuilder.DropForeignKey(name: "FK_LiveFlow_ApplicationUser_OwnerId", table: "LiveFlow"); + migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm"); + migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile"); + migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile"); + migrationBuilder.DropForeignKey(name: "FK_RdvQuery_Activity_ActivityCode", table: "RdvQuery"); + migrationBuilder.DropForeignKey(name: "FK_RdvQuery_ApplicationUser_ClientId", table: "RdvQuery"); + migrationBuilder.DropForeignKey(name: "FK_RdvQuery_PerformerProfile_PerformerId", table: "RdvQuery"); + migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity"); + migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity"); + migrationBuilder.DropForeignKey(name: "FK_MailingTemplate_ApplicationUser_ManagerId", table: "MailingTemplate"); + migrationBuilder.DropForeignKey(name: "FK_MailingTemplate_ApplicationUser_SuccessorId", table: "MailingTemplate"); + migrationBuilder.DropForeignKey(name: "FK_Project_Activity_ActivityCode", table: "Project"); + migrationBuilder.DropForeignKey(name: "FK_Project_ApplicationUser_ClientId", table: "Project"); + migrationBuilder.DropForeignKey(name: "FK_Project_GitRepositoryReference_GitId", table: "Project"); + migrationBuilder.DropForeignKey(name: "FK_Project_PerformerProfile_PerformerId", table: "Project"); + migrationBuilder.DropForeignKey(name: "FK_ProjectBuildConfiguration_Project_ProjectId", table: "ProjectBuildConfiguration"); + migrationBuilder.DropColumn(name: "DateCreated", table: "AspNetUsers"); + migrationBuilder.DropColumn(name: "DateModified", table: "AspNetUsers"); + migrationBuilder.DropColumn(name: "UserCreated", table: "AspNetUsers"); + migrationBuilder.DropColumn(name: "UserModified", table: "AspNetUsers"); + 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_Ban_ApplicationUser_TargetId", + table: "Ban", + column: "TargetId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_BlackListed_ApplicationUser_OwnerId", + table: "BlackListed", + column: "OwnerId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_CircleAuthorizationToBlogPost_BlogPost_BlogPostId", + table: "CircleAuthorizationToBlogPost", + column: "BlogPostId", + principalTable: "BlogPost", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", + table: "CircleAuthorizationToBlogPost", + column: "CircleId", + principalTable: "Circle", + 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_Estimate_ApplicationUser_ClientId", + table: "Estimate", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_BlogTag_BlogPost_PostId", + table: "BlogTag", + column: "PostId", + principalTable: "BlogPost", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_BlogTag_Tag_TagId", + table: "BlogTag", + column: "TagId", + principalTable: "Tag", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_Comment_ApplicationUser_AuthorId", + table: "Comment", + column: "AuthorId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_Comment_BlogPost_PostId", + table: "Comment", + column: "PostId", + principalTable: "BlogPost", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_Schedule_ApplicationUser_OwnerId", + table: "Schedule", + column: "OwnerId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_ChatConnection_ApplicationUser_ApplicationUserId", + table: "ChatConnection", + column: "ApplicationUserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_ChatRoomAccess_ApplicationUser_UserId", + table: "ChatRoomAccess", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_BrusherProfile_PerformerProfile_UserId", + table: "BrusherProfile", + column: "UserId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_HairCutQuery_Activity_ActivityCode", + table: "HairCutQuery", + column: "ActivityCode", + principalTable: "Activity", + principalColumn: "Code", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_HairCutQuery_ApplicationUser_ClientId", + table: "HairCutQuery", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_HairCutQuery_PerformerProfile_PerformerId", + table: "HairCutQuery", + column: "PerformerId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_HairCutQuery_HairPrestation_PrestationId", + table: "HairCutQuery", + column: "PrestationId", + principalTable: "HairPrestation", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_HairMultiCutQuery_Activity_ActivityCode", + table: "HairMultiCutQuery", + column: "ActivityCode", + principalTable: "Activity", + principalColumn: "Code", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_HairMultiCutQuery_ApplicationUser_ClientId", + table: "HairMultiCutQuery", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", + table: "HairMultiCutQuery", + column: "PerformerId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId", + table: "HairPrestationCollectionItem", + column: "PrestationId", + principalTable: "HairPrestation", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId", + table: "HairPrestationCollectionItem", + column: "QueryId", + principalTable: "HairMultiCutQuery", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_HairTaint_Color_ColorId", + table: "HairTaint", + column: "ColorId", + principalTable: "Color", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_HairTaintInstance_HairPrestation_PrestationId", + table: "HairTaintInstance", + column: "PrestationId", + principalTable: "HairPrestation", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_HairTaintInstance_HairTaint_TaintId", + table: "HairTaintInstance", + column: "TaintId", + principalTable: "HairTaint", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_DimissClicked_Notification_NotificationId", + table: "DimissClicked", + column: "NotificationId", + principalTable: "Notification", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_DimissClicked_ApplicationUser_UserId", + table: "DimissClicked", + column: "UserId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_Instrumentation_Instrument_InstrumentId", + table: "Instrumentation", + column: "InstrumentId", + principalTable: "Instrument", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_PayPalPayment_ApplicationUser_ExecutorId", + table: "PayPalPayment", + column: "ExecutorId", + principalTable: "AspNetUsers", + principalColumn: "Id", + 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_Contact_PostalAddress_AddressId", + table: "Contact", + column: "AddressId", + principalTable: "PostalAddress", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_LiveFlow_ApplicationUser_OwnerId", + table: "LiveFlow", + column: "OwnerId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_CommandForm_Activity_ActivityCode", + table: "CommandForm", + 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); + migrationBuilder.AddForeignKey( + name: "FK_RdvQuery_Activity_ActivityCode", + table: "RdvQuery", + column: "ActivityCode", + principalTable: "Activity", + principalColumn: "Code", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_RdvQuery_ApplicationUser_ClientId", + table: "RdvQuery", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_RdvQuery_PerformerProfile_PerformerId", + table: "RdvQuery", + column: "PerformerId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_UserActivity_Activity_DoesCode", + table: "UserActivity", + column: "DoesCode", + principalTable: "Activity", + principalColumn: "Code", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_UserActivity_PerformerProfile_UserId", + table: "UserActivity", + column: "UserId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_MailingTemplate_ApplicationUser_ManagerId", + table: "MailingTemplate", + column: "ManagerId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_MailingTemplate_ApplicationUser_SuccessorId", + table: "MailingTemplate", + column: "SuccessorId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_Project_Activity_ActivityCode", + table: "Project", + column: "ActivityCode", + principalTable: "Activity", + principalColumn: "Code", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_Project_ApplicationUser_ClientId", + table: "Project", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_Project_GitRepositoryReference_GitId", + table: "Project", + column: "GitId", + principalTable: "GitRepositoryReference", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_Project_PerformerProfile_PerformerId", + table: "Project", + column: "PerformerId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_ProjectBuildConfiguration_Project_ProjectId", + table: "ProjectBuildConfiguration", + column: "ProjectId", + principalTable: "Project", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + } + } +} diff --git a/src/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs b/src/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs index a92d834b..eb8b987a 100644 --- a/src/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/src/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs @@ -1,6 +1,8 @@ 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 @@ -186,6 +188,10 @@ namespace Yavsc.Migrations b.Property("ConcurrencyStamp") .IsConcurrencyToken(); + b.Property("DateCreated"); + + b.Property("DateModified"); + b.Property("DedicatedGoogleCalendar") .HasAnnotation("MaxLength", 512); @@ -227,6 +233,10 @@ namespace Yavsc.Migrations b.Property("TwoFactorEnabled"); + b.Property("UserCreated"); + + b.Property("UserModified"); + b.Property("UserName") .HasAnnotation("MaxLength", 256); @@ -474,7 +484,8 @@ namespace Yavsc.Migrations b.Property("AuthorId") .IsRequired(); - b.Property("Content"); + b.Property("Content") + .HasAnnotation("MaxLength", 1024); b.Property("DateCreated"); @@ -874,9 +885,11 @@ namespace Yavsc.Migrations b.Property("Id") .ValueGeneratedOnAdd(); - b.Property("Description"); + b.Property("Description") + .HasAnnotation("MaxLength", 10240); - b.Property("ShortName"); + b.Property("ShortName") + .HasAnnotation("MaxLength", 256); b.Property("Status"); @@ -1560,6 +1573,10 @@ namespace Yavsc.Migrations b.HasOne("Yavsc.Models.ApplicationUser") .WithMany() .HasForeignKey("OwnerId"); + + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("UserId"); }); modelBuilder.Entity("Yavsc.Models.Access.CircleAuthorizationToBlogPost", b => diff --git a/src/Yavsc/Resources/Yavsc.ViewModels.NewAdminViewModel.Designer.cs b/src/Yavsc/Resources/Yavsc.ViewModels.NewAdminViewModel.Designer.cs new file mode 100644 index 00000000..5b61ff0a --- /dev/null +++ b/src/Yavsc/Resources/Yavsc.ViewModels.NewAdminViewModel.Designer.cs @@ -0,0 +1,52 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Mono Runtime Version: 4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +namespace Yavsc.ViewModels { + using System; + using System.Reflection; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public partial class NewAdminViewModel { + + private static System.Resources.ResourceManager resourceMan; + + private static System.Globalization.CultureInfo resourceCulture; + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + public static System.Resources.ResourceManager ResourceManager { + get { + if (object.Equals(null, resourceMan)) { + System.Resources.ResourceManager temp = new System.Resources.ResourceManager(("Yavsc.Resources." + "Yavsc.ViewModels.NewAdminViewModel"), typeof(NewAdminViewModel).GetTypeInfo().Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + public static System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + public static string NewAdminLabel { + get { + return ResourceManager.GetString("NewAdminLabel", resourceCulture); + } + } + } +} diff --git a/src/Yavsc/Resources/Yavsc.ViewModels.NewAdminViewModel.resx b/src/Yavsc/Resources/Yavsc.ViewModels.NewAdminViewModel.resx new file mode 100644 index 00000000..07222d9f --- /dev/null +++ b/src/Yavsc/Resources/Yavsc.ViewModels.NewAdminViewModel.resx @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Nouvel administrateur + \ No newline at end of file diff --git a/src/Yavsc/Resources/Yavsc.YavscLocalisation.Designer.cs b/src/Yavsc/Resources/Yavsc.YavscLocalisation.Designer.cs index 6e3325c6..280f5527 100644 --- a/src/Yavsc/Resources/Yavsc.YavscLocalisation.Designer.cs +++ b/src/Yavsc/Resources/Yavsc.YavscLocalisation.Designer.cs @@ -139,6 +139,12 @@ namespace Yavsc { } } + public static string AreYourSureYouWantToDeleteThis { + get { + return ResourceManager.GetString("AreYourSureYouWantToDeleteThis", resourceCulture); + } + } + public static string AskForAnEstimate { get { return ResourceManager.GetString("AskForAnEstimate", resourceCulture); @@ -403,6 +409,18 @@ namespace Yavsc { } } + public static string Create_New { + get { + return ResourceManager.GetString("Create New", resourceCulture); + } + } + + public static string HyperLink { + get { + return ResourceManager.GetString("HyperLink", resourceCulture); + } + } + public static string Create_a_new_article { get { return ResourceManager.GetString("Create a new article", resourceCulture); @@ -2052,5 +2070,11 @@ namespace Yavsc { return ResourceManager.GetString("Join", resourceCulture); } } + + public static string GiveAdmin { + get { + return ResourceManager.GetString("GiveAdmin", resourceCulture); + } + } } } diff --git a/src/Yavsc/Resources/Yavsc.YavscLocalisation.resx b/src/Yavsc/Resources/Yavsc.YavscLocalisation.resx index f6baf7ea..6fc7fc85 100644 --- a/src/Yavsc/Resources/Yavsc.YavscLocalisation.resx +++ b/src/Yavsc/Resources/Yavsc.YavscLocalisation.resx @@ -134,6 +134,7 @@ lui présentant votre demande. Vous devriez être contacté très rapidement. une prestation Approuvé + Êtes-vous sûr de vouloir supprimer ceci? Demander un devis Fichiers attachées Seuls les utilisateurs authentifiés peuvent accèder à cette information. @@ -178,6 +179,8 @@ Nombre La convertion de '{0}' en 'double' a été impossible. Créer + Créer + lien hyper Créer un nouvel article Créer un nouveau compte Crédits @@ -494,4 +497,5 @@ Facture réglée: {5} Recevoir la lettre mensuelle d'information joindre +Compromettre l'administration diff --git a/src/Yavsc/ViewModels/Administration/NewAdminViewModel.cs b/src/Yavsc/ViewModels/Administration/NewAdminViewModel.cs new file mode 100644 index 00000000..e881dd99 --- /dev/null +++ b/src/Yavsc/ViewModels/Administration/NewAdminViewModel.cs @@ -0,0 +1,11 @@ +using System.ComponentModel.DataAnnotations; + +namespace Yavsc.ViewModels +{ + public partial class NewAdminViewModel { + + [Display(Name="NewAdminLabel", ResourceType=typeof(NewAdminViewModel))] + [Required] + public string NewAdminId { get; set; } + } +} \ No newline at end of file diff --git a/src/Yavsc/Views/Activity/Create.cshtml b/src/Yavsc/Views/Activity/Create.cshtml index 49009f2e..4b6c5aed 100644 --- a/src/Yavsc/Views/Activity/Create.cshtml +++ b/src/Yavsc/Views/Activity/Create.cshtml @@ -15,7 +15,7 @@
- +
@@ -23,7 +23,7 @@ @SR["Name"]
- +
@@ -32,7 +32,7 @@
- +
@@ -40,7 +40,7 @@ @SR["Description"]
- +
@@ -49,7 +49,7 @@
- +
@@ -59,7 +59,7 @@
- +
diff --git a/src/Yavsc/Views/Activity/Edit.cshtml b/src/Yavsc/Views/Activity/Edit.cshtml index 37a4e23d..439fa55f 100644 --- a/src/Yavsc/Views/Activity/Edit.cshtml +++ b/src/Yavsc/Views/Activity/Edit.cshtml @@ -16,8 +16,7 @@
- - +
@@ -52,21 +51,21 @@
- +
- +
- +
diff --git a/src/Yavsc/Views/Administration/GiveAdmin.cshtml b/src/Yavsc/Views/Administration/GiveAdmin.cshtml new file mode 100644 index 00000000..aec33b7c --- /dev/null +++ b/src/Yavsc/Views/Administration/GiveAdmin.cshtml @@ -0,0 +1,23 @@ +@model Yavsc.ViewModels.NewAdminViewModel + +@{  + ViewBag.Title = SR["GiveAdmin"]; +} + +
+
+

@ViewBag.Title

+
+
+ +
+ +
+ + +
+
+ +
+
diff --git a/src/Yavsc/Views/Administration/Role.cshtml b/src/Yavsc/Views/Administration/Role.cshtml index 26323ef5..ff76e329 100644 --- a/src/Yavsc/Views/Administration/Role.cshtml +++ b/src/Yavsc/Views/Administration/Role.cshtml @@ -12,3 +12,5 @@ } + +@SR["GiveAdmin"] \ No newline at end of file diff --git a/src/Yavsc/Views/Announces/Create.cshtml b/src/Yavsc/Views/Announces/Create.cshtml index 87b88bf9..ec198348 100644 --- a/src/Yavsc/Views/Announces/Create.cshtml +++ b/src/Yavsc/Views/Announces/Create.cshtml @@ -16,7 +16,7 @@
- +
@@ -24,21 +24,21 @@
- +
- +
- +
diff --git a/src/Yavsc/Views/Announces/Edit.cshtml b/src/Yavsc/Views/Announces/Edit.cshtml index f4500412..f52021d6 100644 --- a/src/Yavsc/Views/Announces/Edit.cshtml +++ b/src/Yavsc/Views/Announces/Edit.cshtml @@ -16,28 +16,28 @@
- +
- +
- +
- +
diff --git a/src/Yavsc/Views/Circle/Create.cshtml b/src/Yavsc/Views/Circle/Create.cshtml index 5d0ab1d0..1b87098a 100644 --- a/src/Yavsc/Views/Circle/Create.cshtml +++ b/src/Yavsc/Views/Circle/Create.cshtml @@ -15,14 +15,14 @@
- +
- +
diff --git a/src/Yavsc/Views/Circle/Edit.cshtml b/src/Yavsc/Views/Circle/Edit.cshtml index e1ac522f..5c5fbea8 100644 --- a/src/Yavsc/Views/Circle/Edit.cshtml +++ b/src/Yavsc/Views/Circle/Edit.cshtml @@ -16,14 +16,14 @@
- +
- +
diff --git a/src/Yavsc/Views/Client/Create.cshtml b/src/Yavsc/Views/Client/Create.cshtml index b2c277dc..8c21f673 100644 --- a/src/Yavsc/Views/Client/Create.cshtml +++ b/src/Yavsc/Views/Client/Create.cshtml @@ -23,42 +23,42 @@
- +
- - + +
- +
- - + +
- +
@Html.DropDownList("Type") - +
diff --git a/src/Yavsc/Views/Client/Edit.cshtml b/src/Yavsc/Views/Client/Edit.cshtml index 67b28c43..259b977e 100644 --- a/src/Yavsc/Views/Client/Edit.cshtml +++ b/src/Yavsc/Views/Client/Edit.cshtml @@ -24,42 +24,42 @@
- +
- +
- +
- +
- +
@Html.DropDownList("Type") - +
diff --git a/src/Yavsc/Views/CoWorking/Edit.cshtml b/src/Yavsc/Views/CoWorking/Edit.cshtml index 5bee5a53..c05c2498 100644 --- a/src/Yavsc/Views/CoWorking/Edit.cshtml +++ b/src/Yavsc/Views/CoWorking/Edit.cshtml @@ -15,15 +15,15 @@
- +
- +
diff --git a/src/Yavsc/Views/Command/Edit.cshtml b/src/Yavsc/Views/Command/Edit.cshtml index 711c1c82..553e047b 100644 --- a/src/Yavsc/Views/Command/Edit.cshtml +++ b/src/Yavsc/Views/Command/Edit.cshtml @@ -16,7 +16,7 @@
- +
diff --git a/src/Yavsc/Views/CommandForms/Create.cshtml b/src/Yavsc/Views/CommandForms/Create.cshtml index 8b1620d8..fdd9729d 100644 --- a/src/Yavsc/Views/CommandForms/Create.cshtml +++ b/src/Yavsc/Views/CommandForms/Create.cshtml @@ -27,7 +27,7 @@
- +
diff --git a/src/Yavsc/Views/Comments/Create.cshtml b/src/Yavsc/Views/Comments/Create.cshtml index 7ee32fc9..afdf4e45 100644 --- a/src/Yavsc/Views/Comments/Create.cshtml +++ b/src/Yavsc/Views/Comments/Create.cshtml @@ -15,21 +15,21 @@
- +
- +
- +
@@ -42,14 +42,14 @@
- +
- +
diff --git a/src/Yavsc/Views/Comments/Edit.cshtml b/src/Yavsc/Views/Comments/Edit.cshtml index 9ff28a1f..11d68e88 100644 --- a/src/Yavsc/Views/Comments/Edit.cshtml +++ b/src/Yavsc/Views/Comments/Edit.cshtml @@ -16,42 +16,42 @@
- +
- +
- +
- +
- +
- +
diff --git a/src/Yavsc/Views/DjSettings/Create.cshtml b/src/Yavsc/Views/DjSettings/Create.cshtml index c9c75591..acb0525a 100644 --- a/src/Yavsc/Views/DjSettings/Create.cshtml +++ b/src/Yavsc/Views/DjSettings/Create.cshtml @@ -15,7 +15,7 @@
- +
diff --git a/src/Yavsc/Views/DjSettings/Edit.cshtml b/src/Yavsc/Views/DjSettings/Edit.cshtml index 00a897e3..44b44cce 100644 --- a/src/Yavsc/Views/DjSettings/Edit.cshtml +++ b/src/Yavsc/Views/DjSettings/Edit.cshtml @@ -16,7 +16,7 @@
- +
diff --git a/src/Yavsc/Views/Do/Create.cshtml b/src/Yavsc/Views/Do/Create.cshtml index d423d7a9..40540b76 100644 --- a/src/Yavsc/Views/Do/Create.cshtml +++ b/src/Yavsc/Views/Do/Create.cshtml @@ -18,7 +18,7 @@
- +
@@ -26,7 +26,7 @@
- +
diff --git a/src/Yavsc/Views/Estimate/Create.cshtml b/src/Yavsc/Views/Estimate/Create.cshtml index 782c7861..078282f4 100644 --- a/src/Yavsc/Views/Estimate/Create.cshtml +++ b/src/Yavsc/Views/Estimate/Create.cshtml @@ -19,7 +19,7 @@ } - +
@@ -30,21 +30,21 @@ } - +
- +
- +
@@ -52,7 +52,7 @@
@Html.Hidden("AttachedGraphics") - +
@@ -60,7 +60,7 @@
@Html.Hidden("AttachedFiles") - +
diff --git a/src/Yavsc/Views/Estimate/Edit.cshtml b/src/Yavsc/Views/Estimate/Edit.cshtml index 8ae0b359..4072e7f4 100644 --- a/src/Yavsc/Views/Estimate/Edit.cshtml +++ b/src/Yavsc/Views/Estimate/Edit.cshtml @@ -16,7 +16,7 @@
- +
@@ -24,7 +24,7 @@
- +
@@ -36,7 +36,7 @@ } @Html.Hidden("AttachedGraphics") - +
@@ -44,7 +44,7 @@
@Html.Hidden("AttachedFiles") - +
diff --git a/src/Yavsc/Views/Feature/Edit.cshtml b/src/Yavsc/Views/Feature/Edit.cshtml index 2b3d5284..6c254cab 100644 --- a/src/Yavsc/Views/Feature/Edit.cshtml +++ b/src/Yavsc/Views/Feature/Edit.cshtml @@ -16,21 +16,21 @@
- +
- +
- +
diff --git a/src/Yavsc/Views/Git/Edit.cshtml b/src/Yavsc/Views/Git/Edit.cshtml index 1b8f060d..03ee0a95 100644 --- a/src/Yavsc/Views/Git/Edit.cshtml +++ b/src/Yavsc/Views/Git/Edit.cshtml @@ -17,8 +17,8 @@
- +
diff --git a/src/Yavsc/Views/HairPrestations/Create.cshtml b/src/Yavsc/Views/HairPrestations/Create.cshtml index bb043987..6bee0907 100644 --- a/src/Yavsc/Views/HairPrestations/Create.cshtml +++ b/src/Yavsc/Views/HairPrestations/Create.cshtml @@ -31,21 +31,21 @@
- +
- +
- +
@@ -60,7 +60,7 @@
- +
diff --git a/src/Yavsc/Views/HairPrestations/Edit.cshtml b/src/Yavsc/Views/HairPrestations/Edit.cshtml index fab02595..cda78a0d 100644 --- a/src/Yavsc/Views/HairPrestations/Edit.cshtml +++ b/src/Yavsc/Views/HairPrestations/Edit.cshtml @@ -32,21 +32,21 @@
- +
- +
- +
@@ -61,7 +61,7 @@
- +
diff --git a/src/Yavsc/Views/HairTaints/Create.cshtml b/src/Yavsc/Views/HairTaints/Create.cshtml index 1f068eab..16d16907 100644 --- a/src/Yavsc/Views/HairTaints/Create.cshtml +++ b/src/Yavsc/Views/HairTaints/Create.cshtml @@ -15,7 +15,7 @@
- +
diff --git a/src/Yavsc/Views/HairTaints/Edit.cshtml b/src/Yavsc/Views/HairTaints/Edit.cshtml index 531b20b6..79e338cf 100644 --- a/src/Yavsc/Views/HairTaints/Edit.cshtml +++ b/src/Yavsc/Views/HairTaints/Edit.cshtml @@ -16,14 +16,14 @@
- +
- +
diff --git a/src/Yavsc/Views/HyperLink/Delete.cshtml b/src/Yavsc/Views/HyperLink/Delete.cshtml index e4b72fc6..0b431a77 100644 --- a/src/Yavsc/Views/HyperLink/Delete.cshtml +++ b/src/Yavsc/Views/HyperLink/Delete.cshtml @@ -6,11 +6,23 @@

@SR["Delete"]

-

Are you sure you want to delete this?

+

@SR["AreYourSureYouWantToDeleteThis"]

-

HyperLink

+

@SR["HyperLink"]


+
+ @Html.DisplayNameFor(model => model.HRef) +
+
+ @Html.DisplayFor(model => model.HRef) +
+
+ @Html.DisplayNameFor(model => model.Method) +
+
+ @Html.DisplayFor(model => model.Method) +
@Html.DisplayNameFor(model => model.ContentType)
@@ -26,8 +38,10 @@
+ +
diff --git a/src/Yavsc/Views/HyperLink/Details.cshtml b/src/Yavsc/Views/HyperLink/Details.cshtml index aefdff39..60aac861 100644 --- a/src/Yavsc/Views/HyperLink/Details.cshtml +++ b/src/Yavsc/Views/HyperLink/Details.cshtml @@ -7,14 +7,14 @@

@SR["Details"]

-

HyperLink

+

@SR["HyperLink"]


@Html.DisplayNameFor(model => model.HRef)
- @Html.DisplayFor(model => model.Href) + @Html.DisplayFor(model => model.HRef)
@Html.DisplayNameFor(model => model.Method) @@ -37,6 +37,6 @@

- @Html.ActionLink("Edit", "Edit", new { /* id = Model.PrimaryKey */ }) | + @Html.ActionLink(SR["Edit"], "Edit", new { /* id = Model.PrimaryKey */ }) | @SR["Back to List"]

diff --git a/src/Yavsc/Views/HyperLink/Edit.cshtml b/src/Yavsc/Views/HyperLink/Edit.cshtml index 9af6be6b..92502085 100644 --- a/src/Yavsc/Views/HyperLink/Edit.cshtml +++ b/src/Yavsc/Views/HyperLink/Edit.cshtml @@ -8,14 +8,14 @@
-

HyperLink

+

@SR["HyperLink"]


@Html.DisplayNameFor(model => model.HRef)
- @Html.DisplayFor(model => model.Href) + @Html.DisplayFor(model => model.HRef)
@Html.DisplayNameFor(model => model.Method) diff --git a/src/Yavsc/Views/HyperLink/Index.cshtml b/src/Yavsc/Views/HyperLink/Index.cshtml index 3745caf1..b5e2690d 100644 --- a/src/Yavsc/Views/HyperLink/Index.cshtml +++ b/src/Yavsc/Views/HyperLink/Index.cshtml @@ -4,7 +4,7 @@ ViewData["Title"] = @SR["Index"]; } -

@SR["Index"]

+

@SR["HyperLink"] - @SR["Index"]

@SR["Create New"] @@ -41,9 +41,9 @@ @Html.DisplayFor(modelItem => item.Rel) - @Html.ActionLink("Edit", SR["Edit"], new { /* id=item.PrimaryKey */ }) | - @Html.ActionLink("Details", SR["Details"], new { /* id=item.PrimaryKey */ }) | - @Html.ActionLink("Delete", SR["Delete"], new { /* id=item.PrimaryKey */ }) + @Html.ActionLink(SR["Edit"], "Edit", new { hRef=item.HRef, method = item.Method }) | + @Html.ActionLink(SR["Details"], "Details", new { hRef=item.HRef, method = item.Method }) | + @Html.ActionLink(SR["Delete"], "Delete", new { hRef=item.HRef, method = item.Method }) } diff --git a/src/Yavsc/Views/Instruments/Create.cshtml b/src/Yavsc/Views/Instruments/Create.cshtml index c9766920..861b3677 100644 --- a/src/Yavsc/Views/Instruments/Create.cshtml +++ b/src/Yavsc/Views/Instruments/Create.cshtml @@ -15,7 +15,7 @@

- +
diff --git a/src/Yavsc/Views/Instruments/Edit.cshtml b/src/Yavsc/Views/Instruments/Edit.cshtml index 3d9b3370..cdb20f51 100644 --- a/src/Yavsc/Views/Instruments/Edit.cshtml +++ b/src/Yavsc/Views/Instruments/Edit.cshtml @@ -16,7 +16,7 @@
- +
diff --git a/src/Yavsc/Views/LiveFlow/Index.cshtml b/src/Yavsc/Views/LiveFlow/Index.cshtml index c312daea..9a6dc854 100644 --- a/src/Yavsc/Views/LiveFlow/Index.cshtml +++ b/src/Yavsc/Views/LiveFlow/Index.cshtml @@ -1,13 +1,13 @@ @model IEnumerable @{ - ViewData["Title"] = "Index"; + ViewData["Title"] = @SR["Index"]; }

Index

- Create New + @SR["Create New"]

@@ -47,9 +47,9 @@ @Html.DisplayFor(modelItem => item.Title) } diff --git a/src/Yavsc/Views/MailingTemplate/Create.cshtml b/src/Yavsc/Views/MailingTemplate/Create.cshtml index 575cd2fd..d6d4b060 100644 --- a/src/Yavsc/Views/MailingTemplate/Create.cshtml +++ b/src/Yavsc/Views/MailingTemplate/Create.cshtml @@ -16,7 +16,7 @@
- +
@@ -29,21 +29,21 @@
- +
- +
- +
diff --git a/src/Yavsc/Views/Manage/Index.cshtml b/src/Yavsc/Views/Manage/Index.cshtml index 6a391ef7..31a97941 100755 --- a/src/Yavsc/Views/Manage/Index.cshtml +++ b/src/Yavsc/Views/Manage/Index.cshtml @@ -159,11 +159,6 @@ @User.GetUserId() -

- - @SR["Gérer mes terminaux autorisés"] - -

@SR["Unregister"]

diff --git a/src/Yavsc/Views/MusicalTendencies/Create.cshtml b/src/Yavsc/Views/MusicalTendencies/Create.cshtml index 9bb8349a..e09a1b7e 100644 --- a/src/Yavsc/Views/MusicalTendencies/Create.cshtml +++ b/src/Yavsc/Views/MusicalTendencies/Create.cshtml @@ -15,7 +15,7 @@
- +
diff --git a/src/Yavsc/Views/MusicalTendencies/Edit.cshtml b/src/Yavsc/Views/MusicalTendencies/Edit.cshtml index 0e2c80b2..9e6e24e9 100644 --- a/src/Yavsc/Views/MusicalTendencies/Edit.cshtml +++ b/src/Yavsc/Views/MusicalTendencies/Edit.cshtml @@ -16,7 +16,7 @@
- +
diff --git a/src/Yavsc/Views/Notifications/Create.cshtml b/src/Yavsc/Views/Notifications/Create.cshtml index 33c10f86..5385a83d 100644 --- a/src/Yavsc/Views/Notifications/Create.cshtml +++ b/src/Yavsc/Views/Notifications/Create.cshtml @@ -15,49 +15,49 @@
- +
- +
- +
- +
- +
- +
- +
diff --git a/src/Yavsc/Views/Notifications/Edit.cshtml b/src/Yavsc/Views/Notifications/Edit.cshtml index 4f4512cb..9b82bd60 100644 --- a/src/Yavsc/Views/Notifications/Edit.cshtml +++ b/src/Yavsc/Views/Notifications/Edit.cshtml @@ -16,49 +16,49 @@
- +
- +
- +
- +
- +
- +
- +
diff --git a/src/Yavsc/Views/Project/Edit.cshtml b/src/Yavsc/Views/Project/Edit.cshtml index baf28092..a10e9554 100644 --- a/src/Yavsc/Views/Project/Edit.cshtml +++ b/src/Yavsc/Views/Project/Edit.cshtml @@ -54,14 +54,14 @@
- +
- +
diff --git a/src/Yavsc/Views/Shared/_LoginPartial.cshtml b/src/Yavsc/Views/Shared/_LoginPartial.cshtml index 6ae4c004..aa864da0 100644 --- a/src/Yavsc/Views/Shared/_LoginPartial.cshtml +++ b/src/Yavsc/Views/Shared/_LoginPartial.cshtml @@ -14,6 +14,7 @@ Plateforme diff --git a/src/Yavsc/Views/Users/Create.cshtml b/src/Yavsc/Views/Users/Create.cshtml index ee7cae16..313cb5ee 100644 --- a/src/Yavsc/Views/Users/Create.cshtml +++ b/src/Yavsc/Views/Users/Create.cshtml @@ -15,49 +15,49 @@
- +
- +
- +
- +
- +
- +
- +
@@ -72,7 +72,7 @@
- +
@@ -87,35 +87,35 @@
- +
- +
- +
- +
- +
@@ -136,7 +136,7 @@
- +
@@ -151,7 +151,7 @@
- +
diff --git a/src/Yavsc/Views/Users/Edit.cshtml b/src/Yavsc/Views/Users/Edit.cshtml index f61fd684..2210cbe2 100644 --- a/src/Yavsc/Views/Users/Edit.cshtml +++ b/src/Yavsc/Views/Users/Edit.cshtml @@ -16,49 +16,49 @@
- +
- +
- +
- +
- +
- +
- +
@@ -73,7 +73,7 @@
- +
@@ -88,35 +88,35 @@
- +
- +
- +
- +
- +
@@ -130,15 +130,15 @@
- +
- +
@@ -153,7 +153,7 @@
- +
diff --git a/src/cli/.paul-ci.json b/src/cli/.paul-ci.json index 9fa6e369..b28431a2 100644 --- a/src/cli/.paul-ci.json +++ b/src/cli/.paul-ci.json @@ -1,16 +1,20 @@ { - "tools": { + "env": [], + "build" :{ + + }, + "prepare": { "make": {} }, - "projects": { + "post_build": { "yavsc": { "type": "make", "source" : { "github": "pazof/yavsc", "branch": "vnext" }, - "env": [], "args": [] } - } + }, + "emails": [] } diff --git a/src/cli/Program.cs b/src/cli/Program.cs index becfa52a..e09c470f 100644 --- a/src/cli/Program.cs +++ b/src/cli/Program.cs @@ -7,7 +7,6 @@ namespace cli { public partial class Program { - public static void Main(string[] args) { CommandOption rootCommandHelpOption = null; diff --git a/src/cli/Settings/CiBuildSettings.cs b/src/cli/Settings/CiBuildSettings.cs index 3538872a..b5754636 100644 --- a/src/cli/Settings/CiBuildSettings.cs +++ b/src/cli/Settings/CiBuildSettings.cs @@ -1,32 +1,10 @@ using System.ComponentModel.DataAnnotations; using Newtonsoft.Json; + public class CiBuildSettings { - /// - /// A command specification (a system command), - /// in order to reference some trusted server-side process - /// - public class Command - { - [Required] - [JsonPropertyAttribute("path")] - public string Path { get; set; } - - [JsonPropertyAttribute("args")] - public string[] Args { get; set; } - - /// - /// Specific variables to this process - /// - /// - /// - [JsonPropertyAttribute("env")] - public string[] Environment { get; set; } - - [JsonPropertyAttribute("working_dir")] - public string WorkingDir { get; set; } - } + /// /// The global process environment variables /// @@ -40,7 +18,7 @@ public class CiBuildSettings /// [Required] [JsonPropertyAttribute("build")] - public Command Build { get; set; } + public CommandPipe Build { get; set; } /// /// A preparing command. @@ -49,7 +27,7 @@ public class CiBuildSettings /// /// [JsonPropertyAttribute("prepare")] - public Command Prepare { get; set; } + public CommandPipe Prepare { get; set; } /// /// A post-production command, @@ -59,7 +37,7 @@ public class CiBuildSettings /// /// [JsonPropertyAttribute("post_build")] - public Command PostBuild { get; set; } + public CommandPipe PostBuild { get; set; } /// /// Additional emails, as dest of notifications diff --git a/src/cli/Settings/Command.cs b/src/cli/Settings/Command.cs new file mode 100644 index 00000000..1feeb444 --- /dev/null +++ b/src/cli/Settings/Command.cs @@ -0,0 +1,36 @@ + +using System.ComponentModel.DataAnnotations; +using System.Diagnostics; +using Newtonsoft.Json; +/// +/// A command specification (a system command), +/// in order to reference some trusted server-side process +/// +public class Command + { + [Required] + [JsonPropertyAttribute("path")] + public string Path { get; set; } + + [JsonPropertyAttribute("args")] + public string[] Args { get; set; } + + /// + /// Specific variables for this process + /// + /// + [JsonPropertyAttribute("env")] + public string[] Environment { get; set; } + + public virtual Process Start(string workingDir=null, bool redirectInput=false, bool redirectOutput=false) + { + var procStart = new ProcessStartInfo(Path, string.Join(" ",Args)); + procStart.WorkingDirectory = workingDir; + procStart.UseShellExecute = false; + procStart.RedirectStandardInput = true; + procStart.RedirectStandardOutput = true; + procStart.RedirectStandardError = false; + return Process.Start(procStart); + } + + } diff --git a/src/cli/Settings/CommandPipe.cs b/src/cli/Settings/CommandPipe.cs new file mode 100644 index 00000000..293cb3b6 --- /dev/null +++ b/src/cli/Settings/CommandPipe.cs @@ -0,0 +1,64 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Diagnostics; +using System.Threading.Tasks; +using Newtonsoft.Json; + +public class CommandPipe +{ + + + [JsonPropertyAttribute("pipe")] + public Command[] Pipe { get; set; } + + + [JsonPropertyAttribute("working_dir")] + public string WorkingDir { get; set; } + + public virtual int Run() + { + Process latest = null; + Queue runQueue = new Queue(); + Queue joints = new Queue(); + if (Pipe.Length == 0) return -1; + if (Pipe.Length == 1) + { + latest = Pipe[0].Start(); + latest.WaitForExit(); + return latest.ExitCode; + } + + for (int i = 0; i < Pipe.Length; i++) + { + Process newProcess = null; + var cmd = Pipe[i]; + bool isNotLast = (i + 1) >= Pipe.Length; + + if (latest != null) // i.e. isNotFirst + { + newProcess = cmd.Start(WorkingDir, true, isNotLast); + var jt = Task.Run(async () => + { + while (!latest.HasExited && !newProcess.HasExited) + { + string line = await latest.StandardOutput.ReadLineAsync(); + if (line != null) + await newProcess.StandardInput.WriteLineAsync(line); + } + }); + joints.Enqueue(jt); + } + else + { + newProcess = cmd.Start(WorkingDir, false, isNotLast); + Task ending = Task.Run(() => { latest.WaitForExit(); }); + joints.Enqueue(ending); + } + latest = newProcess; + runQueue.Enqueue(latest); + } + while (runQueue.Count > 0) + (latest = runQueue.Dequeue()).WaitForExit(); + return latest.ExitCode; + } +} \ No newline at end of file diff --git a/src/cli/cli.nuspec b/src/cli/cli.nuspec index 4f076750..9093932d 100644 --- a/src/cli/cli.nuspec +++ b/src/cli/cli.nuspec @@ -6,19 +6,15 @@ $version$ Paul Schneider Paul Schneider - https://github.com/pazof/yavsc/blob/vnext/Yavsc/License.md - https://github.com/pazof/yavsc/README.md - https://github.com/pazof/yavsc/blob/vnext/Yavsc/wwwroot/images/yavsc.png + https://github.com/pazof/yavsc/blob/vnext/LICENSE + https://github.com/pazof/yavsc/blob/vnext/README.md + http://yavsc.pschneider.fr/images/yavsc.png true - - A command line interface to Yavsc server runtime - - - - Blog, POS, Web API + A command line interface to Yavsc server API's + - + diff --git a/src/cli/jsonSchema b/src/cli/jsonSchema new file mode 100644 index 00000000..570e54ed --- /dev/null +++ b/src/cli/jsonSchema @@ -0,0 +1,96 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "CiBuildSettings", + "type": "object", + "additionalProperties": false, + "required": [ + "build" + ], + "properties": { + "env": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "build": { + "minLength": 1, + "oneOf": [ + { + "$ref": "#/definitions/Command" + } + ] + }, + "prepare": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Command" + } + ] + }, + "post_build": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Command" + } + ] + }, + "emails": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + }, + "definitions": { + "Command": { + "type": "object", + "additionalProperties": false, + "required": [ + "path" + ], + "properties": { + "path": { + "type": "string", + "minLength": 1 + }, + "args": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "env": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "working_dir": { + "type": [ + "null", + "string" + ] + } + } + } + } +} diff --git a/src/cli/paul-ci.shema.json b/src/cli/paul-ci.shema.json new file mode 100644 index 00000000..570e54ed --- /dev/null +++ b/src/cli/paul-ci.shema.json @@ -0,0 +1,96 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "CiBuildSettings", + "type": "object", + "additionalProperties": false, + "required": [ + "build" + ], + "properties": { + "env": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "build": { + "minLength": 1, + "oneOf": [ + { + "$ref": "#/definitions/Command" + } + ] + }, + "prepare": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Command" + } + ] + }, + "post_build": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/Command" + } + ] + }, + "emails": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + }, + "definitions": { + "Command": { + "type": "object", + "additionalProperties": false, + "required": [ + "path" + ], + "properties": { + "path": { + "type": "string", + "minLength": 1 + }, + "args": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "env": { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + }, + "working_dir": { + "type": [ + "null", + "string" + ] + } + } + } + } +} diff --git a/src/cli/project.json b/src/cli/project.json index 10226fed..20c7d1cf 100644 --- a/src/cli/project.json +++ b/src/cli/project.json @@ -65,8 +65,8 @@ }, "frameworks": { "dnx451": { - "System.Net": "4.0.0.0", - "System.Xml": "4.0.0.0" + "System.Net": {}, + "System.Xml": {} } } } \ No newline at end of file
- Edit | - Details | - Delete + @SR["Edit"] | + @SR["Details"] | + @SR["Delete"]