diff --git a/Yavsc/ApiControllers/AccountController.cs b/Yavsc/ApiControllers/AccountController.cs
index 68a6c912..bced65a7 100644
--- a/Yavsc/ApiControllers/AccountController.cs
+++ b/Yavsc/ApiControllers/AccountController.cs
@@ -13,6 +13,7 @@ namespace Yavsc.WebApi.Controllers
using Models.Auth;
using Yavsc.Helpers;
using System;
+ using System.Linq;
[Authorize(),Route("~/api/account"),Obsolete]
public class ApiAccountController : Controller
@@ -141,6 +142,24 @@ namespace Yavsc.WebApi.Controllers
return Ok(user);
}
+ [HttpGet("~/api/myip"),Authorize]
+ public IActionResult MyIp ()
+ {
+ string ip = null;
+
+ ip = Request.Headers["X-Forwarded-For"];
+
+ if (string.IsNullOrEmpty(ip)) {
+ ip = Request.Host.Value;
+ } else { // Using X-Forwarded-For last address
+ ip = ip.Split(',')
+ .Last()
+ .Trim();
+ }
+
+ return Ok(ip);
+ }
+
///
/// Actually only updates the user's name.
///
diff --git a/Yavsc/ApiControllers/ApplicationUserApiController.cs b/Yavsc/ApiControllers/ApplicationUserApiController.cs
index 9136a9d0..6ab29293 100644
--- a/Yavsc/ApiControllers/ApplicationUserApiController.cs
+++ b/Yavsc/ApiControllers/ApplicationUserApiController.cs
@@ -23,7 +23,7 @@ namespace Yavsc.Controllers
[HttpGet]
public IEnumerable GetApplicationUser()
{
- return _context.Users;
+ return _context.Users.Include(u=>u.Roles).Include(u=>u.Logins).Include(u=>u.Claims);
}
// GET: api/ApplicationUserApi/5
diff --git a/Yavsc/Controllers/AccountController.cs b/Yavsc/Controllers/AccountController.cs
index 4bd786d9..eeaa9983 100644
--- a/Yavsc/Controllers/AccountController.cs
+++ b/Yavsc/Controllers/AccountController.cs
@@ -16,6 +16,7 @@ using Yavsc.Services;
using Yavsc.ViewModels.Account;
using Yavsc.Helpers;
using Microsoft.Extensions.Localization;
+using Microsoft.Data.Entity;
namespace Yavsc.Controllers
{
@@ -35,6 +36,8 @@ namespace Yavsc.Controllers
// TwilioSettings _twilioSettings;
+ ApplicationDbContext _dbContext;
+
public AccountController(
UserManager userManager,
SignInManager signInManager,
@@ -42,7 +45,8 @@ namespace Yavsc.Controllers
IOptions siteSettings,
IOptions smtpSettings,
ILoggerFactory loggerFactory, IOptions twilioSettings,
- IStringLocalizer localizer)
+ IStringLocalizer localizer,
+ ApplicationDbContext dbContext)
{
_userManager = userManager;
_signInManager = signInManager;
@@ -54,7 +58,7 @@ namespace Yavsc.Controllers
_twilioSettings = twilioSettings.Value;
_logger = loggerFactory.CreateLogger();
_localizer = localizer;
-
+ _dbContext = dbContext;
}
[HttpGet(Constants.LoginPath)]
@@ -226,10 +230,18 @@ namespace Yavsc.Controllers
}
// Sign in the user with this external login provider if the user already has a login.
+ info.ProviderDisplayName = info.ExternalPrincipal.Claims.First(c=>c.Type == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name")?.Value;
+
var result = await _signInManager.ExternalLoginSignInAsync(info.LoginProvider, info.ProviderKey, isPersistent: false);
if (result.Succeeded)
{
- _logger.LogInformation(5, "User logged in with {Name} provider.", info.LoginProvider);
+ _logger.LogInformation(5, $"User logged in with {info.LoginProvider} provider, as {info.ProviderDisplayName} ({info.ProviderKey})." );
+
+
+ var ninfo = _dbContext.UserLogins.First(l=>l.ProviderKey == info.ProviderKey && l.LoginProvider == info.LoginProvider);
+ ninfo.ProviderDisplayName = info.ProviderDisplayName;
+ _dbContext.Entry(ninfo).State = EntityState.Modified;
+ _dbContext.SaveChanges();
return Redirect(returnUrl);
}
@@ -253,10 +265,10 @@ namespace Yavsc.Controllers
var mobile = info.ExternalPrincipal.FindFirstValue(ClaimTypes.MobilePhone);
var postalcode = info.ExternalPrincipal.FindFirstValue(ClaimTypes.PostalCode);
var locality = info.ExternalPrincipal.FindFirstValue(ClaimTypes.Locality);
- var country = info.ExternalPrincipal.FindFirstValue(ClaimTypes.Country);*/
+ var country = info.ExternalPrincipal.FindFirstValue(ClaimTypes.Country);
foreach (var claim in info.ExternalPrincipal.Claims)
_logger.LogWarning("# {0} Claim: {1} {2}", info.LoginProvider, claim.Type, claim.Value);
-
+*/
var access_token = info.ExternalPrincipal.FindFirstValue("access_token");
var token_type = info.ExternalPrincipal.FindFirstValue("token_type");
var expires_in = info.ExternalPrincipal.FindFirstValue("expires_in");
@@ -292,6 +304,8 @@ namespace Yavsc.Controllers
var result = await _userManager.CreateAsync(user);
if (result.Succeeded)
{
+ info.ProviderDisplayName = info.ExternalPrincipal.Claims.First(c=>c.Type == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name")?.Value;
+
result = await _userManager.AddLoginAsync(user, info);
if (result.Succeeded)
{
diff --git a/Yavsc/Migrations/20170126152651_renameActViewNameToAction.cs b/Yavsc/Migrations/20170126152651_renameActViewNameToAction.cs
index 5b4b8d3a..e2af77ee 100644
--- a/Yavsc/Migrations/20170126152651_renameActViewNameToAction.cs
+++ b/Yavsc/Migrations/20170126152651_renameActViewNameToAction.cs
@@ -229,6 +229,7 @@ namespace Yavsc.Migrations
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
+ migrationBuilder.RenameColumn(name:"Action",table:"CommandForm",newName:"ViewName");
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim_IdentityRole_RoleId",
table: "AspNetRoleClaims",
diff --git a/Yavsc/Migrations/20170201002133_blacklisted.Designer.cs b/Yavsc/Migrations/20170201002133_blacklisted.Designer.cs
new file mode 100644
index 00000000..29679be9
--- /dev/null
+++ b/Yavsc/Migrations/20170201002133_blacklisted.Designer.cs
@@ -0,0 +1,1108 @@
+using System;
+using Microsoft.Data.Entity;
+using Microsoft.Data.Entity.Infrastructure;
+using Microsoft.Data.Entity.Migrations;
+using Yavsc.Models;
+
+namespace Yavsc.Migrations
+{
+ [DbContext(typeof(ApplicationDbContext))]
+ [Migration("20170201002133_blacklisted")]
+ partial class blacklisted
+ {
+ 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.Models.Access.Ban", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("DateCreated");
+
+ b.Property("DateModified");
+
+ 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("Avatar")
+ .HasAnnotation("MaxLength", 512);
+
+ b.Property("BankInfoId");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken();
+
+ b.Property("DedicatedGoogleCalendar");
+
+ b.Property("DiskQuota");
+
+ b.Property("DiskUsage");
+
+ b.Property("Email")
+ .HasAnnotation("MaxLength", 256);
+
+ b.Property("EmailConfirmed");
+
+ b.Property("FullName")
+ .HasAnnotation("MaxLength", 512);
+
+ b.Property("LockoutEnabled");
+
+ b.Property("LockoutEnd");
+
+ b.Property("NormalizedEmail")
+ .HasAnnotation("MaxLength", 256);
+
+ b.Property("NormalizedUserName")
+ .HasAnnotation("MaxLength", 256);
+
+ b.Property("PasswordHash");
+
+ b.Property("PhoneNumber");
+
+ b.Property("PhoneNumberConfirmed");
+
+ b.Property("PostalAddressId");
+
+ b.Property("SecurityStamp");
+
+ b.Property("TwoFactorEnabled");
+
+ b.Property("UserName")
+ .HasAnnotation("MaxLength", 256);
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedEmail")
+ .HasAnnotation("Relational:Name", "EmailIndex");
+
+ b.HasIndex("NormalizedUserName")
+ .HasAnnotation("Relational:Name", "UserNameIndex");
+
+ b.HasAnnotation("Relational:TableName", "AspNetUsers");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Auth.Client", b =>
+ {
+ b.Property("Id");
+
+ b.Property("Active");
+
+ b.Property("DisplayName");
+
+ b.Property("LogoutRedirectUri")
+ .HasAnnotation("MaxLength", 100);
+
+ b.Property("RedirectUri");
+
+ b.Property("RefreshTokenLifeTime");
+
+ b.Property("Secret");
+
+ b.Property("Type");
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Auth.RefreshToken", b =>
+ {
+ b.Property("Id");
+
+ b.Property("ClientId")
+ .IsRequired()
+ .HasAnnotation("MaxLength", 50);
+
+ b.Property("ExpiresUtc");
+
+ b.Property("IssuedUtc");
+
+ b.Property("ProtectedTicket")
+ .IsRequired();
+
+ b.Property("Subject")
+ .IsRequired()
+ .HasAnnotation("MaxLength", 50);
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BalanceId")
+ .IsRequired();
+
+ b.Property("ExecDate");
+
+ b.Property("Impact");
+
+ b.Property("Reason")
+ .IsRequired();
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.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("ArticleId");
+
+ b.Property("Count");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasAnnotation("MaxLength", 512);
+
+ b.Property("EstimateId");
+
+ b.Property("EstimateTemplateId");
+
+ b.Property("UnitaryCost");
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AttachedFilesString");
+
+ b.Property("AttachedGraphicsString");
+
+ b.Property("ClientId")
+ .IsRequired();
+
+ b.Property("ClientValidationDate");
+
+ b.Property("CommandId");
+
+ b.Property("CommandType");
+
+ b.Property("Description");
+
+ b.Property("OwnerId")
+ .IsRequired();
+
+ b.Property("ProviderValidationDate");
+
+ b.Property("Title");
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Billing.EstimateTemplate", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Description");
+
+ b.Property("OwnerId")
+ .IsRequired();
+
+ b.Property("Title");
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Billing.ExceptionSIREN", b =>
+ {
+ b.Property("SIREN");
+
+ b.HasKey("SIREN");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Blog", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AuthorId");
+
+ b.Property("Content");
+
+ b.Property("DateCreated");
+
+ b.Property("DateModified");
+
+ b.Property("Photo");
+
+ b.Property("Rate");
+
+ b.Property("Title");
+
+ b.Property("UserCreated");
+
+ b.Property("UserModified");
+
+ b.Property("Visible");
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ActivityCode")
+ .IsRequired();
+
+ b.Property("ClientId")
+ .IsRequired();
+
+ b.Property("DateCreated");
+
+ b.Property("DateModified");
+
+ b.Property("EventDate");
+
+ b.Property("LocationId");
+
+ b.Property("LocationTypeId");
+
+ b.Property("PerformerId")
+ .IsRequired();
+
+ b.Property("Previsional");
+
+ b.Property("Reason");
+
+ b.Property("UserCreated");
+
+ b.Property("UserModified");
+
+ b.Property("ValidationDate");
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Booking.Instrument", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Name")
+ .IsRequired()
+ .HasAnnotation("MaxLength", 255);
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Booking.MusicalPreference", b =>
+ {
+ b.Property("OwnerProfileId");
+
+ b.Property("DjSettingsUserId");
+
+ b.Property("GeneralSettingsUserId");
+
+ b.Property("Rate");
+
+ b.Property("TendencyId");
+
+ b.HasKey("OwnerProfileId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Booking.MusicalTendency", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Name")
+ .IsRequired()
+ .HasAnnotation("MaxLength", 255);
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Booking.Profiles.DjSettings", b =>
+ {
+ b.Property("UserId");
+
+ b.Property("SoundCloudId");
+
+ b.HasKey("UserId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Booking.Profiles.FormationSettings", b =>
+ {
+ b.Property("UserId");
+
+ b.HasKey("UserId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Booking.Profiles.GeneralSettings", b =>
+ {
+ b.Property("UserId");
+
+ b.HasKey("UserId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Booking.Profiles.Instrumentation", b =>
+ {
+ b.Property("InstrumentId");
+
+ b.Property("UserId");
+
+ b.HasKey("InstrumentId", "UserId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
+ {
+ b.Property("ConnectionId");
+
+ b.Property("ApplicationUserId");
+
+ b.Property("Connected");
+
+ b.Property("UserAgent");
+
+ b.HasKey("ConnectionId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Forms.Form", b =>
+ {
+ b.Property("Id");
+
+ b.Property("Summary");
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
+ {
+ b.Property("DeviceId");
+
+ b.Property("DeclarationDate")
+ .ValueGeneratedOnAdd()
+ .HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
+
+ b.Property("DeviceOwnerId");
+
+ b.Property("GCMRegistrationId")
+ .IsRequired();
+
+ b.Property("Model");
+
+ b.Property("Platform");
+
+ b.Property("Version");
+
+ b.HasKey("DeviceId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Market.BaseProduct", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Description");
+
+ b.Property("Discriminator")
+ .IsRequired();
+
+ b.Property("Name");
+
+ b.Property("Public");
+
+ b.HasKey("Id");
+
+ b.HasAnnotation("Relational:DiscriminatorProperty", "Discriminator");
+
+ b.HasAnnotation("Relational:DiscriminatorValue", "BaseProduct");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ContextId");
+
+ b.Property("Description");
+
+ b.Property("Name");
+
+ b.Property("Public");
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
+ {
+ b.Property("UserId");
+
+ b.Property("Avatar");
+
+ b.Property("BillingAddressId");
+
+ b.Property("EMail");
+
+ b.Property("Phone");
+
+ b.Property("UserName");
+
+ b.HasKey("UserId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.OAuth.OAuth2Tokens", b =>
+ {
+ b.Property("UserId");
+
+ b.Property("AccessToken");
+
+ b.Property("Expiration");
+
+ b.Property("ExpiresIn");
+
+ b.Property("RefreshToken");
+
+ b.Property("TokenType");
+
+ b.HasKey("UserId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.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("ApplicationUserId");
+
+ b.HasKey("OwnerId", "UserId");
+ });
+
+ 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.LocationType", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Name");
+
+ b.HasKey("Id");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Relationship.PostTag", b =>
+ {
+ b.Property("PostId");
+
+ b.Property("TagId");
+
+ b.HasKey("PostId", "TagId");
+ });
+
+ 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.Workflow.Activity", b =>
+ {
+ b.Property("Code")
+ .HasAnnotation("MaxLength", 512);
+
+ b.Property("ActorDenomination");
+
+ b.Property("DateCreated");
+
+ b.Property("DateModified");
+
+ b.Property("Description");
+
+ 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("Action");
+
+ 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.UserActivity", b =>
+ {
+ b.Property("DoesCode");
+
+ b.Property("UserId");
+
+ b.Property("Weight");
+
+ b.HasKey("DoesCode", "UserId");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Market.Product", b =>
+ {
+ b.HasBaseType("Yavsc.Models.Market.BaseProduct");
+
+ b.Property("Depth");
+
+ b.Property("Height");
+
+ b.Property("Price");
+
+ b.Property("Weight");
+
+ b.Property("Width");
+
+ b.HasAnnotation("Relational:DiscriminatorValue", "Product");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim", b =>
+ {
+ b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
+ .WithMany()
+ .HasForeignKey("RoleId");
+ });
+
+ modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim