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.ViewDataTypeShortName
+
@@SR[@Model.ViewDataTypeShortName]
@{
@@ -59,7 +59,7 @@
@:
@:
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