diff --git a/Kobush.Build.dll b/Kobush.Build.dll deleted file mode 100644 index 44e9e388..00000000 Binary files a/Kobush.Build.dll and /dev/null differ diff --git a/MSBuildLogger.dll b/MSBuildLogger.dll deleted file mode 100644 index 119bbcc7..00000000 Binary files a/MSBuildLogger.dll and /dev/null differ diff --git a/YaDaemon/Program.cs b/YaDaemon/Program.cs index 28287d42..b0459c36 100644 --- a/YaDaemon/Program.cs +++ b/YaDaemon/Program.cs @@ -5,12 +5,11 @@ using System.ServiceProcess; using System.Threading.Tasks; using Microsoft.AspNet.Builder; using Microsoft.AspNet.Hosting; -using Microsoft.AspNet.Hosting.Internal; -using Microsoft.Extensions.DependencyInjection; using Microsoft.Framework.Configuration; using Microsoft.Framework.ConfigurationModel; using Yavsc; - +using Microsoft.Extensions.DependencyInjection; +using Microsoft.AspNet.Hosting.Internal; public class Program : ServiceBase { @@ -32,24 +31,6 @@ public class Program : ServiceBase // public static void Main(string[] args) => Console.WriteLine("Hello World!"); - public void OldMain(string[] args) - { - Microsoft.Extensions.PlatformAbstractions.IApplicationEnvironment iappenv; - IHostingEnvironment env = new Microsoft.AspNet.Hosting.HostingEnvironment(); - iappenv = null;// new HostingEnvironmentExtensions(); - Console.WriteLine("HW"); - - _log.WriteEntry("Test from MyDnxService.", EventLogEntryType.Information, 1); - - - - #if DEBUG - - OnStart(null); - #else - Run(this); - #endif - } protected override void OnStart(string[] args) { @@ -61,7 +42,7 @@ public class Program : ServiceBase var configBuilder = new ConfigurationBuilder(); configBuilder.AddInMemoryCollection(); configBuilder.SetBasePath("../Yavsc/"); - configBuilder.AddJsonFile("../Yavsc/project.json"); + configBuilder.AddJsonFile("../Yavsc/appsettings.Development.json"); var config = configBuilder.Build(); var builder = new WebHostBuilder(); diff --git a/YaDaemon/YaTaskScheduler.cs b/YaDaemon/YaTaskScheduler.cs index 5fca9213..3e1dd0c4 100644 --- a/YaDaemon/YaTaskScheduler.cs +++ b/YaDaemon/YaTaskScheduler.cs @@ -42,6 +42,7 @@ namespace YaDaemon using (var prog = new YaDaemon()) { try { await prog.StartAsync(args); + prog.MainLoop(args); } catch (Exception ex) { diff --git a/YaDaemon/project.json b/YaDaemon/project.json index 8c597994..1242bd04 100644 --- a/YaDaemon/project.json +++ b/YaDaemon/project.json @@ -3,8 +3,7 @@ "description": "MyDnxService Console Application", "dependencies": { "Yavsc": { - "type": "build", - "version": "1.0.0" + "type": "build" } }, "frameworks": { diff --git a/YaDaemon/project.lock.json b/YaDaemon/project.lock.json index 5d87167b..460b33ba 100644 --- a/YaDaemon/project.lock.json +++ b/YaDaemon/project.lock.json @@ -2889,7 +2889,7 @@ "Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4", "PayPalMerchant-net451": "2.7.109", "System.Json": "4.0.20126.16343", - "Yavsc.Abstract": "1.0.0" + "Yavsc.Abstract": null }, "frameworkAssemblies": [ "System", @@ -2898,14 +2898,15 @@ "System.Xml" ] }, - "Yavsc.Abstract/1.0.0": { + "Yavsc.Abstract/1.0.5": { "type": "project", "framework": ".NETFramework,Version=v4.5.1", "dependencies": { "Newtonsoft.Json": "10.0.2" }, "frameworkAssemblies": [ - "System.ComponentModel.DataAnnotations" + "System.ComponentModel.DataAnnotations", + "System.Json" ] } }, @@ -5796,7 +5797,7 @@ "Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4", "PayPalMerchant-net451": "2.7.109", "System.Json": "4.0.20126.16343", - "Yavsc.Abstract": "1.0.0" + "Yavsc.Abstract": null }, "frameworkAssemblies": [ "System", @@ -5805,14 +5806,15 @@ "System.Xml" ] }, - "Yavsc.Abstract/1.0.0": { + "Yavsc.Abstract/1.0.5": { "type": "project", "framework": ".NETFramework,Version=v4.5.1", "dependencies": { "Newtonsoft.Json": "10.0.2" }, "frameworkAssemblies": [ - "System.ComponentModel.DataAnnotations" + "System.ComponentModel.DataAnnotations", + "System.Json" ] } }, @@ -8703,7 +8705,7 @@ "Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4", "PayPalMerchant-net451": "2.7.109", "System.Json": "4.0.20126.16343", - "Yavsc.Abstract": "1.0.0" + "Yavsc.Abstract": null }, "frameworkAssemblies": [ "System", @@ -8712,14 +8714,15 @@ "System.Xml" ] }, - "Yavsc.Abstract/1.0.0": { + "Yavsc.Abstract/1.0.5": { "type": "project", "framework": ".NETFramework,Version=v4.5.1", "dependencies": { "Newtonsoft.Json": "10.0.2" }, "frameworkAssemblies": [ - "System.ComponentModel.DataAnnotations" + "System.ComponentModel.DataAnnotations", + "System.Json" ] } } @@ -8729,7 +8732,7 @@ "type": "project", "path": "../Yavsc/project.json" }, - "Yavsc.Abstract/1.0.0": { + "Yavsc.Abstract/1.0.5": { "type": "project", "path": "../Yavsc.Abstract/project.json" }, @@ -11713,7 +11716,7 @@ }, "projectFileDependencyGroups": { "": [ - "Yavsc >= 1.0.0" + "Yavsc " ], "DNX,Version=v4.5.1": [ "fx/System.ServiceProcess >= 4.0.0" diff --git a/Yavsc.Abstract/Billing/IBillable.cs b/Yavsc.Abstract/Billing/IBillable.cs index 6da26bb8..069d7a5d 100644 --- a/Yavsc.Abstract/Billing/IBillable.cs +++ b/Yavsc.Abstract/Billing/IBillable.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; namespace Yavsc.Billing { public interface IBillable { - string BillingCode { get; set; } string GetDescription (); List GetBillItems(); long Id { get; set; } diff --git a/Yavsc.Abstract/Makefile b/Yavsc.Abstract/Makefile index fdb9bffb..c07a9ce5 100644 --- a/Yavsc.Abstract/Makefile +++ b/Yavsc.Abstract/Makefile @@ -1,5 +1,5 @@ CONFIG=Release -VERSION=1.0.5-rc6 +VERSION=1.0.5-rc7 PRJNAME=Yavsc.Abstract PKGFILENAME=$(PRJNAME).$(VERSION).nupkg DESTPATH=. diff --git a/Yavsc.Abstract/Workflow/INominativeQuery.cs b/Yavsc.Abstract/Workflow/INominativeQuery.cs new file mode 100644 index 00000000..f2eb2e58 --- /dev/null +++ b/Yavsc.Abstract/Workflow/INominativeQuery.cs @@ -0,0 +1,10 @@ +using System; + +namespace Yavsc.Abstract.Workflow +{ + public interface INominativeQuery: IQuery + { + bool Rejected { get; set; } + DateTime RejectedAt { get; set; } + } +} \ No newline at end of file diff --git a/Yavsc.Abstract/Workflow/IQuery.cs b/Yavsc.Abstract/Workflow/IQuery.cs index dec24f3e..0997100c 100644 --- a/Yavsc.Abstract/Workflow/IQuery.cs +++ b/Yavsc.Abstract/Workflow/IQuery.cs @@ -1,4 +1,4 @@ -namespace Yavsc.Workflow +namespace Yavsc.Abstract.Workflow { using Yavsc; using Yavsc.Billing; diff --git a/Yavsc.Abstract/Yavsc.Abstract.1.0.5-rc7.nupkg b/Yavsc.Abstract/Yavsc.Abstract.1.0.5-rc7.nupkg new file mode 100644 index 00000000..641e21c6 Binary files /dev/null and b/Yavsc.Abstract/Yavsc.Abstract.1.0.5-rc7.nupkg differ diff --git a/Yavsc/ApiControllers/BookQueryApiController.cs b/Yavsc/ApiControllers/BookQueryApiController.cs index 911ca49c..851b0ca1 100644 --- a/Yavsc/ApiControllers/BookQueryApiController.cs +++ b/Yavsc/ApiControllers/BookQueryApiController.cs @@ -13,6 +13,7 @@ namespace Yavsc.Controllers using Yavsc.Models.Messaging; using Yavsc.Models; using Yavsc.Models.Workflow; + using Yavsc.Models.Billing; [Produces("application/json")] [Route("api/bookquery"), Authorize(Roles = "Performer,Administrator")] @@ -54,7 +55,7 @@ namespace Yavsc.Controllers Previsional = c.Previsional, Reason = c.Reason, ActivityCode = c.ActivityCode, - BillingCode = c.BillingCode + BillingCode = BillingCodes.Rdv }). OrderBy(c=>c.Id). Take(25); diff --git a/Yavsc/ApiControllers/EstimateApiController.cs b/Yavsc/ApiControllers/EstimateApiController.cs index 2d16be4b..18c76747 100644 --- a/Yavsc/ApiControllers/EstimateApiController.cs +++ b/Yavsc/ApiControllers/EstimateApiController.cs @@ -195,7 +195,7 @@ namespace Yavsc.Controllers return Ok(estimate); } - + protected override void Dispose (bool disposing) { if (disposing) diff --git a/Yavsc/ApiControllers/FrontOfficeApiController.cs b/Yavsc/ApiControllers/FrontOfficeApiController.cs index 3c70362f..dbe4a832 100644 --- a/Yavsc/ApiControllers/FrontOfficeApiController.cs +++ b/Yavsc/ApiControllers/FrontOfficeApiController.cs @@ -1,8 +1,12 @@ +using System; using System.Collections.Generic; +using System.Threading.Tasks; using Microsoft.AspNet.Mvc; +using Yavsc.Abstract.Workflow; using Yavsc.Helpers; using Yavsc.Models; using Yavsc.Models.Workflow; +using Yavsc.Workflow; namespace Yavsc.ApiControllers { @@ -20,5 +24,18 @@ namespace Yavsc.ApiControllers { return dbContext.ListPerformers(actCode); } + + [HttpPost,Route("query/reject")] + public IActionResult RejectQuery (string billingCode, long queryId) + { + if (billingCode==null) return HttpBadRequest("billingCode"); + if (queryId==0) return HttpBadRequest("queryId"); + var billing = Startup.GetBillable(dbContext, billingCode, queryId); + if (billing==null) return HttpBadRequest(); + billing.Rejected = true; + billing.RejectedAt = DateTime.Now; + dbContext.SaveChanges(); + return Ok(); + } } } diff --git a/Yavsc/Controllers/CommandController.cs b/Yavsc/Controllers/CommandController.cs index f807438e..6b78a55e 100644 --- a/Yavsc/Controllers/CommandController.cs +++ b/Yavsc/Controllers/CommandController.cs @@ -70,7 +70,7 @@ namespace Yavsc.Controllers } // GET: Command/Details/5 - public virtual async Task RdvDetails(long id) + public virtual async Task Details(long id) { RdvQuery command = await _context.RdvQueries .Include(x => x.Location) @@ -84,18 +84,18 @@ namespace Yavsc.Controllers return View(command); } - [Authorize] /// /// Gives a view on /// Creating a command for a specified performer /// /// /// - public IActionResult Create(string id, string activityCode, string billingCode) + [HttpGet] + public IActionResult Create(string proId, string activityCode, string billingCode) { - if (string.IsNullOrWhiteSpace(id)) + if (string.IsNullOrWhiteSpace(proId)) throw new InvalidOperationException( - "This method needs a performer id" + "This method needs a performer id (from parameter proId)" ); if (string.IsNullOrWhiteSpace(activityCode)) throw new InvalidOperationException( @@ -103,7 +103,7 @@ namespace Yavsc.Controllers ); var pro = _context.Performers.Include( x => x.Performer).FirstOrDefault( - x => x.PerformerId == id + x => x.PerformerId == proId ); if (pro == null) return HttpNotFound(); @@ -111,19 +111,18 @@ namespace Yavsc.Controllers ViewBag.GoogleSettings = _googleSettings; var userid = User.GetUserId(); var user = _userManager.FindByIdAsync(userid).Result; - return View(new RdvQuery(activityCode,new Location(),DateTime.Now.AddHours(4)) + return View("Create",new RdvQuery(activityCode,new Location(),DateTime.Now.AddHours(4)) { PerformerProfile = pro, PerformerId = pro.PerformerId, ClientId = userid, Client = user, - ActivityCode = activityCode, - BillingCode = billingCode + ActivityCode = activityCode }); } // POST: Command/Create - [HttpPost, Authorize] + [HttpPost] [ValidateAntiForgeryToken] public async Task Create(RdvQuery command) { diff --git a/Yavsc/Controllers/Haircut/HairCutCommandController.cs b/Yavsc/Controllers/Haircut/HairCutCommandController.cs index 7b14c994..891910f0 100644 --- a/Yavsc/Controllers/Haircut/HairCutCommandController.cs +++ b/Yavsc/Controllers/Haircut/HairCutCommandController.cs @@ -45,6 +45,7 @@ namespace Yavsc.Controllers this.payPalSettings = payPalSettings.Value; } PayPalSettings payPalSettings; + private async Task GetQuery(long id) { var query = await _context.HairCutQueries diff --git a/Yavsc/Helpers/EventHelpers.cs b/Yavsc/Helpers/EventHelpers.cs index 07f091b5..46fd37e1 100644 --- a/Yavsc/Helpers/EventHelpers.cs +++ b/Yavsc/Helpers/EventHelpers.cs @@ -6,6 +6,7 @@ namespace Yavsc.Helpers using Models.Messaging; using Yavsc.Models.Haircut; using Yavsc.Models; + using Yavsc.Models.Billing; public static class EventHelpers { @@ -25,7 +26,7 @@ namespace Yavsc.Helpers Location = query.Location, Id = query.Id, ActivityCode = query.ActivityCode, - BillingCode = query.BillingCode + BillingCode = BillingCodes.Rdv }; return yaev; @@ -42,7 +43,8 @@ namespace Yavsc.Helpers var yaev = query.CreateEvent("NewHairCutQuery", string.Format(Startup.GlobalLocalizer["HairCutQueryValidation"],query.Client.UserName), - $"{query.Client.UserName}") ; + $"{query.Client.Id}"); + return yaev; } @@ -67,7 +69,7 @@ namespace Yavsc.Helpers Id = query.Id, Reason = "Commande groupée!", ActivityCode = query.ActivityCode, - BillingCode = query.BillingCode + BillingCode = BillingCodes.MBrush }; return yaev; } diff --git a/Yavsc/Migrations/20180209144114_rejectQuery.Designer.cs b/Yavsc/Migrations/20180209144114_rejectQuery.Designer.cs new file mode 100644 index 00000000..5e5c15ad --- /dev/null +++ b/Yavsc/Migrations/20180209144114_rejectQuery.Designer.cs @@ -0,0 +1,1772 @@ +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("20180209144114_rejectQuery")] + partial class rejectQuery + { + 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) + .HasAnnotation("Relational:DefaultValue", "/images/Users/icon_user.png") + .HasAnnotation("Relational:DefaultValueType", "System.String"); + + b.Property("BankInfoId"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken(); + + b.Property("DedicatedGoogleCalendar"); + + 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("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("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("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"); + + 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("ApplicationUserId"); + + b.Property("Topic") + .HasAnnotation("MaxLength", 1023); + + b.HasKey("Name"); + }); + + modelBuilder.Entity("Yavsc.Models.Chat.ChatRoomPresence", b => + { + b.Property("ChannelName"); + + b.Property("ChatUserConnectionId"); + + b.Property("Level"); + + b.HasKey("ChannelName", "ChatUserConnectionId"); + }); + + 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("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("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.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.IT.Fixing.Bug", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Description"); + + b.Property("FeatureId"); + + b.Property("Status"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.IT.Maintaining.Feature", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Description"); + + b.Property("ShortName"); + + b.Property("Status"); + + 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.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.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.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.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("ApplicationUserId"); + + 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.LocationType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Name"); + + 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.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("EventDate"); + + b.Property("LocationId"); + + b.Property("LocationTypeId"); + + 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("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim", b => + { + b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole") + .WithMany() + .HasForeignKey("RoleId"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole", b => + { + b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole") + .WithMany() + .HasForeignKey("RoleId"); + + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("OwnerId"); + }); + + modelBuilder.Entity("Yavsc.Models.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("ApplicationUserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Chat.ChatRoomPresence", b => + { + b.HasOne("Yavsc.Models.Chat.ChatRoom") + .WithMany() + .HasForeignKey("ChannelName"); + + b.HasOne("Yavsc.Models.Chat.ChatConnection") + .WithMany() + .HasForeignKey("ChatUserConnectionId"); + }); + + 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.GoogleCloudMobileDeclaration", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("DeviceOwnerId"); + }); + + modelBuilder.Entity("Yavsc.Models.IT.Fixing.Bug", b => + { + b.HasOne("Yavsc.Models.IT.Maintaining.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.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.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.Relationship.LocationType") + .WithMany() + .HasForeignKey("LocationTypeId"); + + 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"); + }); + } + } +} diff --git a/Yavsc/Migrations/20180209144114_rejectQuery.cs b/Yavsc/Migrations/20180209144114_rejectQuery.cs new file mode 100644 index 00000000..1d2412f4 --- /dev/null +++ b/Yavsc/Migrations/20180209144114_rejectQuery.cs @@ -0,0 +1,805 @@ +using System; +using System.Collections.Generic; +using Microsoft.Data.Entity.Migrations; + +namespace Yavsc.Migrations +{ + public partial class rejectQuery : 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_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_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_ClientProviderInfo_Location_BillingAddressId", table: "ClientProviderInfo"); + 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_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.AddColumn( + name: "Rejected", + table: "RdvQuery", + nullable: false, + defaultValue: false); + migrationBuilder.AddColumn( + name: "RejectedAt", + table: "RdvQuery", + nullable: false, + defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); + migrationBuilder.AlterColumn( + name: "BillingAddressId", + table: "ClientProviderInfo", + nullable: false); + migrationBuilder.AlterColumn( + name: "For", + table: "Announce", + nullable: false); + migrationBuilder.AddColumn( + name: "Rejected", + table: "HairMultiCutQuery", + nullable: false, + defaultValue: false); + migrationBuilder.AddColumn( + name: "RejectedAt", + table: "HairMultiCutQuery", + nullable: false, + defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); + migrationBuilder.AddColumn( + name: "Rejected", + table: "HairCutQuery", + nullable: false, + defaultValue: false); + migrationBuilder.AddColumn( + name: "RejectedAt", + table: "HairCutQuery", + nullable: false, + defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); + migrationBuilder.AlterColumn( + name: "OwnerId", + table: "Estimate", + 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_BlackListed_ApplicationUser_OwnerId", + table: "BlackListed", + column: "OwnerId", + 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_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_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); + } + + 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_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_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_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.DropColumn(name: "Rejected", table: "RdvQuery"); + migrationBuilder.DropColumn(name: "RejectedAt", table: "RdvQuery"); + migrationBuilder.DropColumn(name: "Rejected", table: "HairMultiCutQuery"); + migrationBuilder.DropColumn(name: "RejectedAt", table: "HairMultiCutQuery"); + migrationBuilder.DropColumn(name: "Rejected", table: "HairCutQuery"); + migrationBuilder.DropColumn(name: "RejectedAt", table: "HairCutQuery"); + migrationBuilder.AlterColumn( + name: "BillingAddressId", + table: "ClientProviderInfo", + nullable: true); + migrationBuilder.AlterColumn( + name: "For", + table: "Announce", + nullable: false); + migrationBuilder.AlterColumn( + name: "OwnerId", + table: "Estimate", + nullable: false); + 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_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_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_ClientProviderInfo_Location_BillingAddressId", + table: "ClientProviderInfo", + column: "BillingAddressId", + principalTable: "Location", + 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_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); + } + } +} diff --git a/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs b/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs index f76a0c11..7abb946e 100644 --- a/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/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 @@ -349,8 +351,7 @@ namespace Yavsc.Migrations b.Property("Description"); - b.Property("OwnerId") - .IsRequired(); + b.Property("OwnerId"); b.Property("ProviderValidationDate"); @@ -672,6 +673,10 @@ namespace Yavsc.Migrations b.Property("Previsional"); + b.Property("Rejected"); + + b.Property("RejectedAt"); + b.Property("SelectedProfileUserId"); b.Property("Status"); @@ -713,6 +718,10 @@ namespace Yavsc.Migrations b.Property("Previsional"); + b.Property("Rejected"); + + b.Property("RejectedAt"); + b.Property("Status"); b.Property("UserCreated"); @@ -874,7 +883,7 @@ namespace Yavsc.Migrations b.Property("Id") .ValueGeneratedOnAdd(); - b.Property("For"); + b.Property("For"); b.Property("Message"); @@ -893,7 +902,7 @@ namespace Yavsc.Migrations b.Property("Avatar"); - b.Property("BillingAddressId"); + b.Property("BillingAddressId"); b.Property("EMail"); @@ -1279,6 +1288,10 @@ namespace Yavsc.Migrations b.Property("Reason"); + b.Property("Rejected"); + + b.Property("RejectedAt"); + b.Property("Status"); b.Property("UserCreated"); @@ -1600,13 +1613,6 @@ namespace Yavsc.Migrations .HasForeignKey("OwnerId"); }); - modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b => - { - b.HasOne("Yavsc.Models.Relationship.Location") - .WithMany() - .HasForeignKey("BillingAddressId"); - }); - modelBuilder.Entity("Yavsc.Models.Messaging.DimissClicked", b => { b.HasOne("Yavsc.Models.Messaging.Notification") diff --git a/Yavsc/Models/Billing/NominativeServiceCommand.cs b/Yavsc/Models/Billing/NominativeServiceCommand.cs index 6d772ea4..f86d231d 100644 --- a/Yavsc/Models/Billing/NominativeServiceCommand.cs +++ b/Yavsc/Models/Billing/NominativeServiceCommand.cs @@ -10,9 +10,9 @@ namespace Yavsc.Models.Billing using Yavsc.Models.Payment; using Yavsc; using Yavsc.Billing; - using Yavsc.Workflow; + using Yavsc.Abstract.Workflow; - public abstract class NominativeServiceCommand : IBaseTrackedEntity, IQuery, IIdentified + public abstract class NominativeServiceCommand : IBaseTrackedEntity, INominativeQuery, IIdentified { public string GetInvoiceId() { return GetType().Name + "/" + Id; } @@ -77,6 +77,10 @@ namespace Yavsc.Models.Billing [ForeignKey("ActivityCode"),JsonIgnore,Display(Name="Domaine d'activité")] public virtual Activity Context  { get; set ; } + public bool Rejected { get; set; } + + public DateTime RejectedAt { get; set; } + public abstract System.Collections.Generic.List GetBillItems(); public bool GetIsAcquitted() @@ -91,16 +95,12 @@ namespace Yavsc.Models.Billing var bcode = Startup.BillingMap[type]; return $"facture-{bcode}-{Id}{ack}"; } - + + [Display(Name = "PaymentId")] public string PaymentId { get; set; } [ForeignKey("PaymentId"), Display(Name = "Acquittement de la facture")] public virtual PayPalPayment Regularisation { get; set; } - [Required] - public string BillingCode - { - get; set; - } } } diff --git a/Yavsc/Models/HairCut/HairCutQuery.cs b/Yavsc/Models/HairCut/HairCutQuery.cs index 7e7b4aab..d8056649 100644 --- a/Yavsc/Models/HairCut/HairCutQuery.cs +++ b/Yavsc/Models/HairCut/HairCutQuery.cs @@ -402,7 +402,8 @@ Prestation.Gender == HairCutGenders.Women ? Id = Id, ActivityCode = ActivityCode, Reason = reason, - Sender = Client.GetSender() + Sender = sender, + BillingCode = BillingCodes.Brush }; return yaev; } diff --git a/Yavsc/Resources/Yavsc.Models.Billing.NominativeServiceCommand.resx b/Yavsc/Resources/Yavsc.Models.Billing.NominativeServiceCommand.resx new file mode 100644 index 00000000..ba2fbfd1 --- /dev/null +++ b/Yavsc/Resources/Yavsc.Models.Billing.NominativeServiceCommand.resx @@ -0,0 +1,491 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + À propos de + À propos de BookAStar + Bienvenue chez vos stars. + Accès refusé + Accepter la notification d'une demande de rendez-vous + Accepter les prises de contact de la part de particuliers + Balance du compte + Activer mon profil professionnel + Activité + Activités + de plus + Adresse + Autoriser ma geolocatisation, auprès de mes clients + Un message instantané a été envoyé à {0}, + lui présentant votre demande. Vous devriez être contacté très rapidement. + une prestation + Approuvé + Demander un devis + Fichiers attachées + Seuls les utilisateurs authentifiés peuvent accèder à cette information. + Auteur + disponible + Retour à la liste + Panier + Édition d'un article + Suppression d'un article + Contrôle d'accès à l'article + Article créé + Code source de l'article + Article mis à jour + Édition d'un article + corps de texte + Proposez un rendez-vous à votre artiste + Proposez un rendez-vous à votre prestataire de services du numérique + Reserver les services d'un artiste + Reserver les services d'un éditeur de logiciel + Calendrier + Catalogue + Changer + Formulaire de changement de pseudonyme (avatar, le nom publique de ce compte utilisateur ici) + Modifiez les paramètres de votre compte + Se connecter en utilisant + Choisissez ci-après votre activité principale + S'il vous plait, choisissez une description. + S'il vous plait, choisissez un titre. + S'il vous plait, choisissez une date dans le futur. + S'il vous plait, choisissez une date pour cette prestation. + Chiffre + Cercles + Action sur click + Cliquez ici pour vous identifier + Couleur + Commande + Confirmation de commande + Commentaire + Consultant + Contactez un préstataire + Contenu + Nombre + La convertion de '{0}' en 'double' a été impossible. + Créer + Créer un nouvel article + Créer un nouveau compte + Crédits + Demande de rendez-vous + Date de création + Date de dernière modification + Base de données + Défrisage + Détails + Supprimer + Arrhes + Description + Faire un devis + Commenter + + Votre commentaire + Ne pas publier mon activité + S'il vous plait, spécifiez ceux de vos cercles à qui est destiné ce contenu + Une erreur est survenue à la génération de votre document + Nom affiché + Désactiver + Désactivé + Poster + Tagger + Éditer + Edité + Editer les compétences associées + Activé + Activer + Date de fin + Heure de fin + e-mail + Saisissez votre email. + Saisissez votre nom d'utilisateur ou email. + entrées + Estimer + Devis non trouvé + Demandes de Devis en souffrance + Devis à valider + Devis à accèpter ou refuser + {0} à validé et évalué votre demande, avec un devis à {1:C} + + Date de l'évennement + + Factures à produire + Factures à honnorer + + Demande de devis + Date de l'évennement + Page web de l'événement + Base de données éxistante + Inscriptions externes + Veuillez, s'il vous plait, utiliser une date future. + Saisir vos coordonées bancaires + Saisissez votre demande de rendez-vous + Contenu à accès restreint + Mot de passe perdu? + Confirmation mot de passe perdu. + provenant de + Nom complet + L'envoi du message push a échoué, mais un e-mail a été envoyé + Message push envoyé + L'evoi du message Google Cloud a échoué ... + Dites en plus, ci àprès, à propos de cet évennement + Google n'a pas pu identifier ce lieu + Agenda Google + Erreur Google : {0} + Identifiant d'enregistrement Google + mi-long + Coiffure à domicile + Préstation en coiffure à domicile + Une demande (de {0}) en coiffure à domicile vient d'être validée + Cacher le texte source de l'article + Accueil + Cacher + caché + J'ai compris + Icône + Les icônes fabriqués par + Identité + URI de l'image + Exception à l'import + Erreur serveur interne + Numéro de SIREN invalide + vous demande un rendez-vous + sont sous licence + Article ajouté au panier. + Enfant + Lieu + Connection + Nom d'utilisateur ou e-mail + + Se connecter + Déconnection + long + Activité principale + Homme + Gérer + Gérez votre inscription + Compétences gérée sur ce site + Date maximale du rendez-vous + Coût maximal journalier + Code d'Activité Principalement Exercée + Mêches + Membres + Votre message a été envoyé + Date minimale du rendez-vous + Coût minimal journalier + MinDailyCost + Modifié + Modifier + Modifier les paramètres + Mes estimations + Nom + Besoins + Besoin + Nouveau nom d'utilisateur (avatar) + Nouveau Tag + Un e-mail vient de vous être envoyé, il contient le lien à suivre + pour pouvoir mettre à jour votre mot de passe. + Non + Pas de technique spécifiée + Le préstataire n'a pas de calendrier associé. + pas de contenu + Aucune arrhes n'a été prévue + aucun(e) + Non existent user + Aucune compétence n'a été enregistrée par aucun préstataire pour cette activité. + Non approuvé + Non validée + Non validé + inactif + Hors ligne + actif + En ligne + Seuls les utilisateurs authorisés peuvent contacter un préstataire par courrier. + Mot de passe + Confirmation de paiement + Paiements effectués + Identifiant de paiement + Version Pdf + Date de la prestation + Lieu de la pestation + Perstataires + Préstataire + Profile préstataire + Permanante + Personne + Photo + Photo mise à jour + S'il vous plait + S'il vous plait, veuillez verifier votre boite au lettres, pour pouvoir ré-initialiser votre mot de passe. + S'il vous plait, veuillez confirmer votre nouveau mot de passe. + S'il vous plait, saisissez un corps de message + S'il vous plait, saisissez une réson, un sujet pour votre message + Veuillez s'il vous plait utiliser le lien suivant pour ré-initialiser votre mot de passe: + Posté + Date souhaitée + Lieu de la présation: {0}.\n + PrévisualiserPrévisualiser le document + Édition du profil + Référence produit + prestation + Paramètres professionels + Fournisseur + Identifiant du fournisseur + Nom du fournisseur + Cote + {0} vous demande une intervention le {1} à {2} ({3}) + Lire la suite ... + raison + S'inscrire + S'inscrire comme nouvel utilisateur + Une erreur inattendue s'est produite: + "{0}". + Veuillez pardonner la gêne occasionnée + Se souvenir du mot de passe + Supprimer + Supprimer mon profil professionnel + Rôle + Ré-initialiser votre mot de passe + Confirmation de ré-initialiser du mot de passe + Rôle créé + Nom du rôle + Enregistrer ces paramètres + Chercher + Selectioner un calendrier Google + Envoyer + Envoyer un message privé + Envoyer un message publique + Positioner + Classe du paramétrage + court + Son blog + Votre profil professionel + Positionnez ci-après vos les paramêtre de votre activité + Talents/Compétences/Spécialités gérés sur ce site + Compétence + Talents/Compétences/Spécialités + {0} désirerait un devis concernant {1} + Son + Specify a latitude + Specify a longitude + S'il vous plait, veuillez spécifier un lieu. + Please, specify a valid latitude. + Date de début + La date de fin doit être postérieure à la date de début. + Heure de début + Soumettre + Envoyer les modifications + Tag + Nom du tag + Version LaTeX + Ce site utilise les cookies + Selon son calendier Google, ce perstataire est disponbile ce + Selon son calendier Google, ce perstataire pourrait ne pas être disponible ce + Ce prestataire n'a pas mis de calendrier à disposition. + Titre + à + Double identification + Coût unitaire + Se désinscrire + Utiliser un compte local pour se connecter + Utiliser un autre service pour se connecter + Utiliser ma position pour avoir des clients plus proches + Liste des utilisateurs + Nom d'utilisateur + Liste des utilisateurs assumant le rôle "{0}" + Talents/compétences/spécialités utilisateur + Le rôle demandé n'est pas assumé par ce préstataire + Date de validation + Voir le texte source de l'article + a été ajouté au rôle + Il n'y avait pas d'utilisateur dans le rôle "{1}". Vous ({0}) avez été ajouté au rôle "{1}". + Site Web + Bienvenue + Femme + {0} à été notifié de votre demande, vous devriez être contacté rapidement + Au vu de son calendrier, + {0} devrait être disponible pour ce rendez-vous + Paramètres musicien (l'instrument) + Paramètres Dj (le compte SoundCloud.com) + Paramètres formation (les partenaires) + Paramètres généraux (visibilité et présentation) + Paramètres coiffeur: tarifs, disponibilité + Oui + Vous devez vous authentifier pour pouvoir demander un devis + à un préstataire. + Vous n'êtes pas administrateur + Votre demande de rendez-vous + Votre mote de passe a été mis à jour. + Vos Devis + Votre activité + Votre besoin + Votre demande a été transmise + Vos talents, vos spécialités, le domaine de vos activités + Vos publications + Votre profil + Votre messge a été envoyé + Dites en plus, ci àprès, à propos de cet évennement + Supprimer mon profil professionel + Français + Anglais + Nom d'utilisateur invalide. + Les caratères valides sont: le souligné (_), le petit titret (-), l'apostrohe ('), les minuscules et majuscules de a à z, les chiffres de 0 à 9, l'espace et le point. + Ce champ est obligatoire. + Champ invalide ... + Le Mot de passe doit contenir au moins 6 caractères. + Mot de passe doit contenir au moins un caractère spécial (ni un chiffre, ni une lettre). + Les mots de passe doivent contenir au moins un chiffre ('0' à '9'). + Les mots de passe doivent contenir au moins une lettre majuscule ('A' à 'Z'). + Le mot de passe et sa confirmation ne sont pas les mêmes. + Confirmation du mot de passe + L'envoi de de courrier pour confirmation de l'adresse e-mail a échoué. + Un courrier a été envoyé pour confirmation de l'adresse e-mail . + S'il vous plait, confirmez votre addresse e-mail + Vous avez créé avec succès votre compte {0}, +mais votre adresse e-mail reste à confirmer. +Pour ce faire, suivez le lien suivant : <{1}>. + +-- +{0} - {2} <{3}> + Taille maximale: {0} caractère. +Ce champ est +d'au moins {0} et d'au plus {1} caractère(s). +Ce champ est +d'au plus {0} caractère(s) ({1} en excès). +Un message éléctronique a été envoyé au préstataire. +Un client vient de valider une demande de prestation à votre encontre: + + Prestation: {0} + Client : {1} + Date: {2}, + Adresse: {3} + +----- +{4} + +Facture prévue (non réglée): {5} +Un client vient de valider une demande de prestation à votre encontre: + + Prestation: {0} + Client : {1} + Date: {2}, + Adresse: {3} + +----- +{4} + +Facture réglée: {5} + diff --git a/Yavsc/Services/BillingService.cs b/Yavsc/Services/BillingService.cs index 78d1b2d5..87e29563 100644 --- a/Yavsc/Services/BillingService.cs +++ b/Yavsc/Services/BillingService.cs @@ -3,6 +3,7 @@ using System.Threading.Tasks; using Microsoft.Data.Entity; using Microsoft.Extensions.Logging; using Newtonsoft.Json; +using Yavsc.Abstract.Workflow; using Yavsc.Billing; using Yavsc.Models; @@ -19,11 +20,9 @@ namespace Yavsc.Services DbContext = dbContext; } - public async Task GetBillAsync(string billingCode, long queryId) + public Task GetBillAsync(string billingCode, long queryId) { - var dbFunc = Startup.Billing[billingCode]; - IBillable query = await Task.Run(()=> dbFunc(DbContext, queryId)); - return query; + return Task.FromResult(Startup.GetBillable(DbContext,billingCode,queryId)); } public async Task GetPerformerSettingsAsync(string activityCode, string userId) diff --git a/Yavsc/Services/IBillingService.cs b/Yavsc/Services/IBillingService.cs index ba06652b..88436d1b 100644 --- a/Yavsc/Services/IBillingService.cs +++ b/Yavsc/Services/IBillingService.cs @@ -2,7 +2,8 @@ namespace Yavsc.Services { using System.Linq; using System.Threading.Tasks; - using Billing; + using Yavsc.Abstract.Workflow; + public interface IBillingService { /// @@ -17,7 +18,7 @@ namespace Yavsc.Services /// Identifiant du type de facturation /// Identifiant de la demande du client /// La facture - Task GetBillAsync(string billingCode, long queryId); + Task GetBillAsync(string billingCode, long queryId); Task> GetPerformersSettingsAsync(string activityCode); Task GetPerformerSettingsAsync(string activityCode, string userId); diff --git a/Yavsc/Startup/Startup.Workflow.cs b/Yavsc/Startup/Startup.Workflow.cs index 351e7889..999c8468 100644 --- a/Yavsc/Startup/Startup.Workflow.cs +++ b/Yavsc/Startup/Startup.Workflow.cs @@ -9,6 +9,7 @@ namespace Yavsc { using Microsoft.Data.Entity; using Models; + using Yavsc.Abstract.Workflow; using Yavsc.Billing; using Yavsc.Models.Billing; using Yavsc.Models.Haircut; @@ -23,9 +24,10 @@ namespace Yavsc public static List ProfileTypes = new List(); public static List UserSettings = new List(); - public static Dictionary> Billing = - new Dictionary> (); + public static Dictionary> Billing = + new Dictionary> (); + public static INominativeQuery GetBillable(ApplicationDbContext context, string billingCode, long queryId ) => Billing[billingCode](context, queryId); public static Dictionary BillingMap = new Dictionary(); /// @@ -77,7 +79,7 @@ mais n'implemente pas l'interface IQueryable } } - RegisterBilling(BillingCodes.Brush, new Func + RegisterBilling(BillingCodes.Brush, new Func ( ( db, id) => { var query = db.HairCutQueries.Include(q=>q.Prestation).Include(q=>q.Regularisation).Single(q=>q.Id == id) ; @@ -85,9 +87,9 @@ mais n'implemente pas l'interface IQueryable return query; })) ; - RegisterBilling(BillingCodes.MBrush,new Func + RegisterBilling(BillingCodes.MBrush,new Func ( (db, id) => db.HairMultiCutQueries.Include(q=>q.Regularisation).Single(q=>q.Id == id))); - RegisterBilling(BillingCodes.Rdv, new Func + RegisterBilling(BillingCodes.Rdv, new Func ( (db, id) => db.RdvQueries.Include(q=>q.Regularisation).Single(q=>q.Id == id))); } public static System.Reflection.Assembly OnYavscResourceResolve(object sender, ResolveEventArgs ev) @@ -95,7 +97,7 @@ mais n'implemente pas l'interface IQueryable return AppDomain.CurrentDomain.GetAssemblies()[0]; } - public static void RegisterBilling(string code, Func getter) where T : IBillable + public static void RegisterBilling(string code, Func getter) where T : IBillable { Billing.Add(code,getter) ; BillingMap.Add(typeof(T).Name,code); diff --git a/Yavsc/Views/Command/Create.cshtml b/Yavsc/Views/Command/Create.cshtml index dd8c6e14..e958017f 100644 --- a/Yavsc/Views/Command/Create.cshtml +++ b/Yavsc/Views/Command/Create.cshtml @@ -196,7 +196,6 @@ @Html.HiddenFor(model=>model.ClientId) @Html.HiddenFor(model=>model.PerformerId) @Html.HiddenFor(model=>model.ActivityCode) - @Html.HiddenFor(model=>model.BillingCode) diff --git a/Yavsc/Views/Command/Index.cshtml b/Yavsc/Views/Command/Index.cshtml index a14b8f99..0c203ece 100644 --- a/Yavsc/Views/Command/Index.cshtml +++ b/Yavsc/Views/Command/Index.cshtml @@ -6,9 +6,6 @@

Index

-

- Create New -

diff --git a/Yavsc/Views/FrontOffice/Profiles.cshtml b/Yavsc/Views/FrontOffice/Profiles.cshtml index 59d48761..e97054ce 100644 --- a/Yavsc/Views/FrontOffice/Profiles.cshtml +++ b/Yavsc/Views/FrontOffice/Profiles.cshtml @@ -9,11 +9,9 @@ @foreach (var profile in Model) {
@Html.DisplayFor(m=>profile) -
- - - - -
+ + @SR["Proposer un rendez-vous à"] @profile.Performer.UserName + } diff --git a/yavsc.code-workspace b/yavsc.code-workspace index 0483b0c0..b7c74444 100644 --- a/yavsc.code-workspace +++ b/yavsc.code-workspace @@ -5,6 +5,9 @@ }, { "path": "Yavsc.Abstract" + }, + { + "path": "YaDaemon" } ], "settings": {