From fce5b0ea1186a72f3dc27a778868c9d923b43561 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Wed, 12 Dec 2018 14:32:03 +0000 Subject: [PATCH] Translation & Localisation initialisation --- Yavsc.Server/Interfaces/ITranslator.cs | 7 + Yavsc.Server/Models/Blog/BlogPost.cs | 3 + Yavsc.Server/Models/Blog/BlogTrad.cs | 26 + Yavsc.Server/Services/TranslationService.cs | 7 + .../ViewModels/Blogspot/BlogIndexKey.cs | 31 - .../Communicating/BlogspotController.cs | 25 +- Yavsc/Helpers/FileSystemHelpers.cs | 5 +- .../20181212103501_blogLang.Designer.cs | 1927 +++++++++++++++++ Yavsc/Migrations/20181212103501_blogLang.cs | 823 +++++++ .../ApplicationDbContextModelSnapshot.cs | 5 + Yavsc/Models/ApplicationDbContext.cs | 7 +- .../Yavsc.Resources.YavscLocalisation.en.resx | 1 + .../Yavsc.Resources.YavscLocalisation.fr.resx | 4 +- .../Yavsc.Resources.YavscLocalisation.pt.resx | 487 +++++ Yavsc/Services/GoogleApis/Translate.cs | 60 + .../ViewComponents/BlogIndexViewComponent.cs | 31 +- Yavsc/Views/Blogspot/Index.cshtml | 77 +- Yavsc/Views/Home/About.cshtml | 4 +- Yavsc/Views/Home/About.pt.cshtml | 167 ++ .../Components/BlogIndex/Default.cshtml | 64 + Yavsc/Views/_ViewImports.cshtml | 1 - Yavsc/project.json | 335 +-- Yavsc/wwwroot/css/main/site.css | 10 +- 23 files changed, 3797 insertions(+), 310 deletions(-) create mode 100644 Yavsc.Server/Interfaces/ITranslator.cs create mode 100644 Yavsc.Server/Models/Blog/BlogTrad.cs create mode 100644 Yavsc.Server/Services/TranslationService.cs delete mode 100644 Yavsc.Server/ViewModels/Blogspot/BlogIndexKey.cs create mode 100644 Yavsc/Migrations/20181212103501_blogLang.Designer.cs create mode 100644 Yavsc/Migrations/20181212103501_blogLang.cs create mode 100644 Yavsc/Resources/Yavsc.Resources.YavscLocalisation.pt.resx create mode 100644 Yavsc/Services/GoogleApis/Translate.cs create mode 100755 Yavsc/Views/Home/About.pt.cshtml create mode 100644 Yavsc/Views/Shared/Components/BlogIndex/Default.cshtml diff --git a/Yavsc.Server/Interfaces/ITranslator.cs b/Yavsc.Server/Interfaces/ITranslator.cs new file mode 100644 index 00000000..f74684dc --- /dev/null +++ b/Yavsc.Server/Interfaces/ITranslator.cs @@ -0,0 +1,7 @@ +namespace Yavsc.Server +{ + public interface ITranslator + { + string[] Translate (string slang, string dlang, string[] text); + } +} diff --git a/Yavsc.Server/Models/Blog/BlogPost.cs b/Yavsc.Server/Models/Blog/BlogPost.cs index aa106b6c..30add0ff 100644 --- a/Yavsc.Server/Models/Blog/BlogPost.cs +++ b/Yavsc.Server/Models/Blog/BlogPost.cs @@ -23,6 +23,9 @@ namespace Yavsc.Models.Blog [Display(Name="Photo")][StringLength(1024)] public string Photo { get; set; } + [StringLength(8)] + public string Lang { get; set; } + [Display(Name="Indice de qualité")] public int Rate { get; set; } diff --git a/Yavsc.Server/Models/Blog/BlogTrad.cs b/Yavsc.Server/Models/Blog/BlogTrad.cs new file mode 100644 index 00000000..1a9e2777 --- /dev/null +++ b/Yavsc.Server/Models/Blog/BlogTrad.cs @@ -0,0 +1,26 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Newtonsoft.Json; +using Yavsc.Models; + +namespace Yavsc.Server.Models.Blog +{ + public class BlogTrad + { + [Required] + public long PostId { get; set; } + + [Required] + public string Lang { get; set; } + + public string Title { get; set; } + + public string Body { get; set; } + + public string TraducerId { get; set; } + + [ForeignKey("TraducerId"),JsonIgnore] + public ApplicationUser Traducer { set; get; } + + } +} \ No newline at end of file diff --git a/Yavsc.Server/Services/TranslationService.cs b/Yavsc.Server/Services/TranslationService.cs new file mode 100644 index 00000000..d727246c --- /dev/null +++ b/Yavsc.Server/Services/TranslationService.cs @@ -0,0 +1,7 @@ +namespace Yavsc.Server.Services +{ + public class TranslationService + { + + } +} \ No newline at end of file diff --git a/Yavsc.Server/ViewModels/Blogspot/BlogIndexKey.cs b/Yavsc.Server/ViewModels/Blogspot/BlogIndexKey.cs deleted file mode 100644 index ecf630c9..00000000 --- a/Yavsc.Server/ViewModels/Blogspot/BlogIndexKey.cs +++ /dev/null @@ -1,31 +0,0 @@ -namespace Yavsc.ViewModels.Blogspot -{ - public class BlogIndexKey - { - public string AuthorId { get; set; } - public string Title { get; set; } - // override object.Equals - public override bool Equals (object obj) - { - // - // See the full list of guidelines at - // http://go.microsoft.com/fwlink/?LinkID=85237 - // and also the guidance for operator== at - // http://go.microsoft.com/fwlink/?LinkId=85238 - // - - if (obj == null || GetType() != obj.GetType()) - { - return false; - } - var blogindexkey = (BlogIndexKey)obj; - return Title == blogindexkey.Title && AuthorId == blogindexkey.AuthorId; - } - - // override object.GetHashCode - public override int GetHashCode() - { - return Title.GetHashCode() * AuthorId.GetHashCode(); - } - } -} diff --git a/Yavsc/Controllers/Communicating/BlogspotController.cs b/Yavsc/Controllers/Communicating/BlogspotController.cs index f467d98a..7d2257a6 100644 --- a/Yavsc/Controllers/Communicating/BlogspotController.cs +++ b/Yavsc/Controllers/Communicating/BlogspotController.cs @@ -39,31 +39,10 @@ namespace Yavsc.Controllers [AllowAnonymous] public async Task Index(string id, int skip=0, int maxLen=25) { - if (!string.IsNullOrEmpty(id)) + if (!string.IsNullOrEmpty(id)) { return await UserPosts(id); - string uid = User.GetUserId(); - long[] usercircles = _context.Circle.Include(c=>c.Members).Where(c=>c.Members.Any(m=>m.MemberId == uid)) - .Select(c=>c.Id).ToArray(); - IQueryable posts ; - var allposts = _context.Blogspot - .Include(b => b.Author) - .Include(p=>p.ACL) - .Include(p=>p.Tags) - .Include(p=>p.Comments) - .Where(p=>p.AuthorId == uid || p.Visible); - - if (usercircles != null) { - posts = allposts.Where(p=> p.ACL.Count==0 || p.ACL.Any(a=> usercircles.Contains(a.CircleId))) - ; } - else { - posts = allposts.Where(p => p.ACL.Count == 0); - } - - var data = posts.OrderByDescending( p=> p.DateCreated).ToArray(); - var grouped = data.GroupBy(p=> p.Title).Skip(skip).Take(maxLen); - - return View(grouped); + return View(); } [Route("/Title/{id?}")] diff --git a/Yavsc/Helpers/FileSystemHelpers.cs b/Yavsc/Helpers/FileSystemHelpers.cs index 48d08ad5..1d09541f 100644 --- a/Yavsc/Helpers/FileSystemHelpers.cs +++ b/Yavsc/Helpers/FileSystemHelpers.cs @@ -138,8 +138,9 @@ public static FileRecievedInfo ReceiveProSignature(this ClaimsPrincipal user, st } public static HtmlString FileLink(this RemoteFileInfo info, string username, string subpath) { - return new HtmlString( Startup.UserFilesOptions.RequestPath+"/"+ username + "/" + subpath + "/" + - HttpUtility.UrlEncode(info.Name) ); + return new HtmlString( Startup.UserFilesOptions.RequestPath+"/"+ username + + "/" + (( subpath == null ) ? "" : "/" + subpath ) + + info.Name ); } public static FileRecievedInfo ReceiveAvatar(this ApplicationUser user, IFormFile formFile) { diff --git a/Yavsc/Migrations/20181212103501_blogLang.Designer.cs b/Yavsc/Migrations/20181212103501_blogLang.Designer.cs new file mode 100644 index 00000000..d67a5b11 --- /dev/null +++ b/Yavsc/Migrations/20181212103501_blogLang.Designer.cs @@ -0,0 +1,1927 @@ +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("20181212103501_blogLang")] + partial class blogLang + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { + modelBuilder + .HasAnnotation("ProductVersion", "7.0.0-rc1-16348"); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b => + { + b.Property("Id"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken(); + + b.Property("Name") + .HasAnnotation("MaxLength", 256); + + b.Property("NormalizedName") + .HasAnnotation("MaxLength", 256); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .HasAnnotation("Relational:Name", "RoleNameIndex"); + + b.HasAnnotation("Relational:TableName", "AspNetRoles"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ClaimType"); + + b.Property("ClaimValue"); + + b.Property("RoleId") + .IsRequired(); + + b.HasKey("Id"); + + b.HasAnnotation("Relational:TableName", "AspNetRoleClaims"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ClaimType"); + + b.Property("ClaimValue"); + + b.Property("UserId") + .IsRequired(); + + b.HasKey("Id"); + + b.HasAnnotation("Relational:TableName", "AspNetUserClaims"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin", b => + { + b.Property("LoginProvider"); + + b.Property("ProviderKey"); + + b.Property("ProviderDisplayName"); + + b.Property("UserId") + .IsRequired(); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasAnnotation("Relational:TableName", "AspNetUserLogins"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole", b => + { + b.Property("UserId"); + + b.Property("RoleId"); + + b.HasKey("UserId", "RoleId"); + + b.HasAnnotation("Relational:TableName", "AspNetUserRoles"); + }); + + modelBuilder.Entity("Yavsc.Abstract.Identity.ClientProviderInfo", b => + { + b.Property("UserId"); + + b.Property("Avatar"); + + b.Property("BillingAddressId"); + + b.Property("EMail"); + + b.Property("Phone"); + + b.Property("UserName"); + + b.HasKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Access.Ban", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("UserCreated"); + + b.Property("UserModified"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("OwnerId") + .IsRequired(); + + b.Property("UserId") + .IsRequired(); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Access.CircleAuthorizationToBlogPost", b => + { + b.Property("CircleId"); + + b.Property("BlogPostId"); + + b.HasKey("CircleId", "BlogPostId"); + }); + + modelBuilder.Entity("Yavsc.Models.AccountBalance", b => + { + b.Property("UserId"); + + b.Property("ContactCredits"); + + b.Property("Credits"); + + b.HasKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.ApplicationUser", b => + { + b.Property("Id"); + + b.Property("AccessFailedCount"); + + b.Property("AllowMonthlyEmail"); + + b.Property("Avatar") + .HasAnnotation("MaxLength", 512) + .HasAnnotation("Relational:DefaultValue", "/images/Users/icon_user.png") + .HasAnnotation("Relational:DefaultValueType", "System.String"); + + b.Property("BankInfoId"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken(); + + b.Property("DedicatedGoogleCalendar") + .HasAnnotation("MaxLength", 512); + + b.Property("DiskQuota") + .HasAnnotation("Relational:DefaultValue", "524288000") + .HasAnnotation("Relational:DefaultValueType", "System.Int64"); + + b.Property("DiskUsage"); + + b.Property("Email") + .HasAnnotation("MaxLength", 256); + + b.Property("EmailConfirmed"); + + b.Property("FullName") + .HasAnnotation("MaxLength", 512); + + b.Property("LockoutEnabled"); + + b.Property("LockoutEnd"); + + b.Property("MaxFileSize"); + + b.Property("NormalizedEmail") + .HasAnnotation("MaxLength", 256); + + b.Property("NormalizedUserName") + .HasAnnotation("MaxLength", 256); + + b.Property("PasswordHash"); + + b.Property("PhoneNumber"); + + b.Property("PhoneNumberConfirmed"); + + b.Property("PostalAddressId"); + + b.Property("SecurityStamp"); + + b.Property("TwoFactorEnabled"); + + b.Property("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("Lang") + .HasAnnotation("MaxLength", 8); + + b.Property("Photo") + .HasAnnotation("MaxLength", 1024); + + b.Property("Rate"); + + b.Property("Title") + .HasAnnotation("MaxLength", 1024); + + b.Property("UserCreated"); + + b.Property("UserModified"); + + b.Property("Visible"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog.BlogTag", b => + { + b.Property("PostId"); + + b.Property("TagId"); + + b.HasKey("PostId", "TagId"); + }); + + modelBuilder.Entity("Yavsc.Models.Blog.Comment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AuthorId") + .IsRequired(); + + b.Property("Content"); + + 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("Description"); + + b.Property("EventDate"); + + b.Property("LocationId"); + + b.Property("PaymentId"); + + b.Property("PerformerId") + .IsRequired(); + + b.Property("PrestationId"); + + b.Property("Previsional"); + + b.Property("Rejected"); + + b.Property("RejectedAt"); + + b.Property("SelectedProfileUserId"); + + b.Property("Status"); + + b.Property("UserCreated"); + + b.Property("UserModified"); + + b.Property("ValidationDate"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairMultiCutQuery", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ActivityCode") + .IsRequired(); + + b.Property("ClientId") + .IsRequired(); + + b.Property("Consent"); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("Description"); + + b.Property("EventDate"); + + b.Property("LocationId"); + + b.Property("PaymentId"); + + b.Property("PerformerId") + .IsRequired(); + + b.Property("Previsional"); + + b.Property("Rejected"); + + b.Property("RejectedAt"); + + b.Property("Status"); + + b.Property("UserCreated"); + + b.Property("UserModified"); + + b.Property("ValidationDate"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairPrestation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Cares"); + + b.Property("Cut"); + + b.Property("Dressing"); + + b.Property("Gender"); + + b.Property("Length"); + + b.Property("Shampoo"); + + b.Property("Tech"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairPrestationCollectionItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("PrestationId"); + + b.Property("QueryId"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairTaint", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Brand"); + + b.Property("ColorId"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Haircut.HairTaintInstance", b => + { + b.Property("TaintId"); + + b.Property("PrestationId"); + + b.HasKey("TaintId", "PrestationId"); + }); + + modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b => + { + b.Property("DeviceId"); + + b.Property("DeclarationDate") + .ValueGeneratedOnAdd() + .HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP"); + + b.Property("DeviceOwnerId"); + + b.Property("GCMRegistrationId") + .IsRequired(); + + b.Property("LatestActivityUpdate"); + + 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.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.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("Description"); + + b.Property("EventDate"); + + b.Property("LocationId"); + + b.Property("LocationType"); + + b.Property("PaymentId"); + + b.Property("PerformerId") + .IsRequired(); + + b.Property("Previsional"); + + b.Property("Reason"); + + b.Property("Rejected"); + + b.Property("RejectedAt"); + + b.Property("Status"); + + b.Property("UserCreated"); + + b.Property("UserModified"); + + b.Property("ValidationDate"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.UserActivity", b => + { + b.Property("DoesCode"); + + b.Property("UserId"); + + b.Property("Weight"); + + b.HasKey("DoesCode", "UserId"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.EMailing.MailingTemplate", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Body") + .HasAnnotation("MaxLength", 65536); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("ManagerId"); + + b.Property("ReplyToAddress"); + + b.Property("ToSend"); + + b.Property("Topic") + .HasAnnotation("MaxLength", 128); + + b.Property("UserCreated"); + + b.Property("UserModified"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.IT.Project", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ActivityCode") + .IsRequired(); + + b.Property("ClientId") + .IsRequired(); + + b.Property("Consent"); + + b.Property("DateCreated"); + + b.Property("DateModified"); + + b.Property("Description"); + + b.Property("GitId"); + + b.Property("Name") + .IsRequired(); + + b.Property("OwnerId"); + + b.Property("PaymentId"); + + b.Property("PerformerId") + .IsRequired(); + + b.Property("Previsional"); + + b.Property("Rejected"); + + b.Property("RejectedAt"); + + b.Property("Status"); + + b.Property("UserCreated"); + + b.Property("UserModified"); + + b.Property("ValidationDate"); + + b.Property("Version"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.IT.ProjectBuildConfiguration", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Name") + .IsRequired(); + + b.Property("ProjectId"); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.IT.SourceCode.GitRepositoryReference", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Branch") + .HasAnnotation("MaxLength", 512); + + b.Property("OwnerId") + .HasAnnotation("MaxLength", 1024); + + b.Property("Path") + .IsRequired(); + + b.Property("Url") + .HasAnnotation("MaxLength", 2048); + + b.HasKey("Id"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim", b => + { + b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole") + .WithMany() + .HasForeignKey("RoleId"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole", b => + { + b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole") + .WithMany() + .HasForeignKey("RoleId"); + + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Models.Access.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.Payment.PayPalPayment") + .WithMany() + .HasForeignKey("PaymentId"); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + .WithMany() + .HasForeignKey("PerformerId"); + }); + + modelBuilder.Entity("Yavsc.Models.Workflow.UserActivity", b => + { + b.HasOne("Yavsc.Models.Workflow.Activity") + .WithMany() + .HasForeignKey("DoesCode"); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.EMailing.MailingTemplate", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("ManagerId"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.IT.Project", b => + { + b.HasOne("Yavsc.Models.Workflow.Activity") + .WithMany() + .HasForeignKey("ActivityCode"); + + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("ClientId"); + + b.HasOne("Yavsc.Server.Models.IT.SourceCode.GitRepositoryReference") + .WithMany() + .HasForeignKey("GitId"); + + b.HasOne("Yavsc.Models.Payment.PayPalPayment") + .WithMany() + .HasForeignKey("PaymentId"); + + b.HasOne("Yavsc.Models.Workflow.PerformerProfile") + .WithMany() + .HasForeignKey("PerformerId"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.IT.ProjectBuildConfiguration", b => + { + b.HasOne("Yavsc.Server.Models.IT.Project") + .WithMany() + .HasForeignKey("ProjectId"); + }); + + modelBuilder.Entity("Yavsc.Server.Models.IT.SourceCode.GitRepositoryReference", b => + { + b.HasOne("Yavsc.Models.ApplicationUser") + .WithMany() + .HasForeignKey("OwnerId"); + }); + } + } +} diff --git a/Yavsc/Migrations/20181212103501_blogLang.cs b/Yavsc/Migrations/20181212103501_blogLang.cs new file mode 100644 index 00000000..7eda6eb1 --- /dev/null +++ b/Yavsc/Migrations/20181212103501_blogLang.cs @@ -0,0 +1,823 @@ +using System; +using System.Collections.Generic; +using Microsoft.Data.Entity.Migrations; + +namespace Yavsc.Migrations +{ + public partial class blogLang : 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_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.DropForeignKey(name: "FK_Project_Activity_ActivityCode", table: "Project"); + migrationBuilder.DropForeignKey(name: "FK_Project_ApplicationUser_ClientId", table: "Project"); + migrationBuilder.DropForeignKey(name: "FK_Project_GitRepositoryReference_GitId", table: "Project"); + migrationBuilder.DropForeignKey(name: "FK_Project_PerformerProfile_PerformerId", table: "Project"); + migrationBuilder.DropForeignKey(name: "FK_ProjectBuildConfiguration_Project_ProjectId", table: "ProjectBuildConfiguration"); + migrationBuilder.AddColumn( + name: "Lang", + table: "BlogPost", + nullable: true); + migrationBuilder.Sql("update \"BlogPost\" set \"Lang\"='fr'"); + 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); + migrationBuilder.AddForeignKey( + name: "FK_Project_Activity_ActivityCode", + table: "Project", + column: "ActivityCode", + principalTable: "Activity", + principalColumn: "Code", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_Project_ApplicationUser_ClientId", + table: "Project", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_Project_GitRepositoryReference_GitId", + table: "Project", + column: "GitId", + principalTable: "GitRepositoryReference", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_Project_PerformerProfile_PerformerId", + table: "Project", + column: "PerformerId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Cascade); + migrationBuilder.AddForeignKey( + name: "FK_ProjectBuildConfiguration_Project_ProjectId", + table: "ProjectBuildConfiguration", + column: "ProjectId", + principalTable: "Project", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim_IdentityRole_RoleId", table: "AspNetRoleClaims"); + migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim_ApplicationUser_UserId", table: "AspNetUserClaims"); + migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin_ApplicationUser_UserId", table: "AspNetUserLogins"); + migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole_IdentityRole_RoleId", table: "AspNetUserRoles"); + migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole_ApplicationUser_UserId", table: "AspNetUserRoles"); + migrationBuilder.DropForeignKey(name: "FK_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.DropForeignKey(name: "FK_Project_Activity_ActivityCode", table: "Project"); + migrationBuilder.DropForeignKey(name: "FK_Project_ApplicationUser_ClientId", table: "Project"); + migrationBuilder.DropForeignKey(name: "FK_Project_GitRepositoryReference_GitId", table: "Project"); + migrationBuilder.DropForeignKey(name: "FK_Project_PerformerProfile_PerformerId", table: "Project"); + migrationBuilder.DropForeignKey(name: "FK_ProjectBuildConfiguration_Project_ProjectId", table: "ProjectBuildConfiguration"); + migrationBuilder.DropColumn(name: "Lang", table: "BlogPost"); + 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_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); + migrationBuilder.AddForeignKey( + name: "FK_Project_Activity_ActivityCode", + table: "Project", + column: "ActivityCode", + principalTable: "Activity", + principalColumn: "Code", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_Project_ApplicationUser_ClientId", + table: "Project", + column: "ClientId", + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_Project_GitRepositoryReference_GitId", + table: "Project", + column: "GitId", + principalTable: "GitRepositoryReference", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_Project_PerformerProfile_PerformerId", + table: "Project", + column: "PerformerId", + principalTable: "PerformerProfile", + principalColumn: "PerformerId", + onDelete: ReferentialAction.Restrict); + migrationBuilder.AddForeignKey( + name: "FK_ProjectBuildConfiguration_Project_ProjectId", + table: "ProjectBuildConfiguration", + column: "ProjectId", + principalTable: "Project", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + } + } +} diff --git a/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs b/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs index 2d6d0f7c..f5d041a9 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 @@ -414,6 +416,9 @@ namespace Yavsc.Migrations b.Property("DateModified"); + b.Property("Lang") + .HasAnnotation("MaxLength", 8); + b.Property("Photo") .HasAnnotation("MaxLength", 1024); diff --git a/Yavsc/Models/ApplicationDbContext.cs b/Yavsc/Models/ApplicationDbContext.cs index 8646a9be..4e988be4 100644 --- a/Yavsc/Models/ApplicationDbContext.cs +++ b/Yavsc/Models/ApplicationDbContext.cs @@ -37,6 +37,7 @@ namespace Yavsc.Models using Blog; using Newtonsoft.Json.Linq; using Yavsc.Abstract.Identity; + using Yavsc.Server.Models.Blog; public class ApplicationDbContext : IdentityDbContext { @@ -63,11 +64,13 @@ namespace Yavsc.Models builder.Entity().HasKey(o => new { o.Code, o.CodeScrutin }); builder.Entity().Property(n => n.icon).HasDefaultValue("exclam"); builder.Entity().HasKey(p => new { room = p.ChannelName, user = p.ChatUserConnectionId }); + foreach (var et in builder.Model.GetEntityTypes()) { if (et.ClrType.GetInterface("IBaseTrackedEntity") != null) et.FindProperty("DateCreated").IsReadOnlyAfterSave = true; } + builder.Entity().HasKey(tr => new { post = tr.PostId, lang = tr.Lang }); } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { @@ -309,7 +312,9 @@ namespace Yavsc.Models public DbSet GitRepositoryReference { get; set; } - public DbSet Projects { get; set; } + public DbSet Projects { get; set; } + + public DbSet BlogTrad { get; set; } } } diff --git a/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.en.resx b/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.en.resx index 5b952b31..6325709d 100644 --- a/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.en.resx +++ b/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.en.resx @@ -746,6 +746,7 @@ English + Portugese This field is required. diff --git a/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.fr.resx b/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.fr.resx index 8a3f415e..166e7e16 100644 --- a/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.fr.resx +++ b/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.fr.resx @@ -285,7 +285,6 @@ Votre message a été envoyé Date minimale du rendez-vous Coût minimal journalier - MinDailyCost Modifié Modifier Modifier les paramètres @@ -359,7 +358,7 @@ Supprimer mon profil professionnel Rôle Ré-initialiser votre mot de passe - Confirmation de ré-initialiser du mot de passe + Confirmation de ré-initialisation du mot de passe Rôle créé Nom du rôle Enregistrer ces paramètres @@ -443,6 +442,7 @@ Supprimer mon profil professionel Français Anglais + Portugais 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. diff --git a/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.pt.resx b/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.pt.resx new file mode 100644 index 00000000..de260633 --- /dev/null +++ b/Yavsc/Resources/Yavsc.Resources.YavscLocalisation.pt.resx @@ -0,0 +1,487 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + Sobre + Accesso rechazado + aceitar notificaçãoes de pedidos de compromisso + Aceitar entres em contacto + saldo da conta + Ativar meu perfil profissional + Actividade + Actividades + Mais + Morada + Aceitar a minha geolocatisaçao, a critério de meus clientes + Um messagem instantâneo fui mandado à {0}, + apresentando-lhe o seu pedido. Você deve ser contatado muito rapidamente. + uma prestação + Aprovado + Pedir uma cotação + Arquivos anexados + Apenas usuários autenticados podem acessar essas informações. + Autor + disponível + De volta à lista + cesta + edição de fatura + supressão factura + Controle de acesso + Fatura criada + Codigo fonte + Atualizado + Editando o artigo + corpo de texte + propor um compromisso para o seu artista + propor um compromisso ao seu provedor de serviços digitais + Reserve os serviços de um artista + Reserve os serviços de um editor de software + calendário + catálogo + Mudar + Formulário de mudança de apelido (avatar, o nome público desta conta de usuário aqui) + Alterar as configurações da sua conta + Entre usando + Escolha sua atividade principal abaixo + Por favor, uma descrição é necessária. + Por favor, um título é necessário. + Por favor, uma data no futuro é necessária. + Por favor, uma data para este serviço é necessária. + figura + círculos + Ação ao clicar + Clique aqui para entrar + Cor + ordem + Confirmação de Pedido + comentário + consultor + Entre em contato com um inquilino + conteúdo + número + A conversão de '{0}' para 'double' era impossível. + criar + Crie um novo artigo + Crie uma nova conta + créditos + Pesquisar por uma data + Data de criação + Data da última modificação + Banco de dados + detalhes + remover + depósito + descrição + Faça uma cotação + Commentar + Seu comentário + Não publique minha atividade + Ocorreu um erro ao gerar seu documento + Nome de exibição + desativar + desativado + Poster + etiquetar + Editar + editado + Editar habilidades relacionadas + ativado + ativar + Data final + Hora de término + e-mail + Digite seu email. + Digite seu nome de usuário ou email. + entradas + estimar + Cotação não encontrada + Pedidos pendente de cotação + Cotação para validar + Cotação para aceder ou recusar + {0} validou e avaliou sua solicitação, com uma cotação para {1: C} + Data do evento + Faturas para produzir + Faturas para honrar + Pedido de cotação + Data do evento + Página da web do evento + Banco de dados existente + Registros externos + Por favor, use uma data futura. + Insira seus dados bancários + Digite seu pedido de compromisso + Conteúdo com acesso restrito + Senha perdida? + confirmação de Senha perdida. + de + Nome completo + O envio da mensagem 'Google Cloud' falhou, mas um email foi enviado + mensagem push enviado + O envio da mensagem Google Cloud a échoué ... + Também fale sobre esse evento + O Google não conseguiu identificar este lugar + Google Calendar + erro Google : {0} + ID de registro Google + Ocultar o texto de origem do artigo + bem-vindo + Ocultar + Ocultado + Eu entendi + ícone + Ícones feitos por + identidade + Imagem URI + Exceção à importação + Erro interno do servidor + Número inválido + lhe pede uma consulta + estão licenciados + Item adicionado ao carrinho. + lugar + conexão + Nome de usuário ou e-mail + Login + desconexão + longo + Atividade principal + homem + gerir + gerir seu registro + Habilidades gerenciadas neste site + Data máxima do compromisso + Custo diário máximo + Código de atividade principalmente exercitado + membros + Sua mensagem foi enviada + Data mínima do compromisso + Custo Mínimo Diário + Alterado + Alterar + Alterar configurações + Minhas estimativas + Nome + necessidades + necessidade + Novo nome de usuário (avatar) + Nova tag + Um e-mail acaba de ser enviado para você, ele contém o link a seguir + para poder atualizar sua senha. + não + Nenhuma técnica especificada + O inquilino não possui um calendário associado. + sem conteúdo + Nenhum depósito foi planejado + não + Usuário inexistente + Nenhuma competência foi registrada por nenhum presbítero para esta atividade. + Não aprovado + Não validada + Não validado + inativo + Off-line + ativo + On-line + Somente usuários autorizados podem entrar em contato com um provedor por email. + Senha + Confirmação de pagamento + Pagamentos feitos + Versão em pdf + Data do serviço + Lugar do serviço + provedores + provedor + perfil provedor + Permanante + Pessoa + foto + foto atualizada + Por favor + por favor, verifique sua caixa de correio, para poder redefinir sua senha + por favor confirme sua nova senha. + Por favor, insira um corpo da mensagem + Por favor, insira um reson, um assunto para sua mensagem + Por favor use o seguinte link para redefinir sua senha: + afixado + Data desejada + Lugar de Presença: {0}.\n + PrévisualiserPrévisualiser le document + Quantia provisória de renda + edição do perfil + Referência do produto + benefício + Configurações profissionais + provedor + ID de provedor + Nome do provedor + Cote + {0} está fazendo uma consulta!!! le {1} à {2} ({3}/da scandale .5-rc12.) + Ler mais ... + razão + registrar + Registre-se como um novo usuário + Ocorreu um erro inesperado, SCANDALE.! $%: + "{0}". + + Por favor, perdoe o inconveniente, mil mil e mil saborts. + Lembre-se da senha + remover + + Excluir meu perfil profissional + função + Redefinir sua senha + Confirmação de reinicialização da senha + função creada + Nome da função + Salve essas configurações + procurar + Selecione um calendário do Google + Enviar + Enviar un messagem privado + Enviar un messagem publico + posicionador + Classe de ajuste + curto + O blog dele + Seu perfil profissional + Posicione abaixo dos parâmetros de sua atividade + Talentos / Competências / Especialidades geridas neste site + Competência + Talentos / Competências / Especialidades + {0} gostaria de receber uma cotação para {1} + Som + Data de início + A data final deve ser depois da data de início. + Hora de início + submeter + Envie as alterações + Tag + Nome do tag + Versão LaTeX + Este site usa cookies + De acordo com seu calendário do Google, este provedor está disponível neste + De acordo com seu calendário do Google, esse provedor pode não estar disponível neste + Este provedor não tem um calendário disponível. + título + para + identificação de fator duplo + Custo unitário + Cancelar inscrição + Use uma conta local para efetuar login + Use outro serviço para conectar + Use minha localização para ter clientes mais próximos + Lista de usuários + Nome de usuário + Lista de usuários assumindo o papel "{0}" + Talentos / habilidades / especialidades do usuário + A função solicitada não é assumida por este usuário + Data de validação + Veja o texto de origem do artigo + foi adicionado ao papel + Não havia nenhum usuário na função "{1}". Você ({0}) foi adicionado à função "{1}". + Site Web + bem-vindo + mulher + {0} foi notificado da sua solicitação, você deve ser contatado rapidamente + Dada a sua agenda, + {0} deve estar disponível para este compromisso + Configurações do músico (o instrumento) + Configurações de DJ + Parâmetros de treinamento (parceiros) + Configurações gerais (visibilidade e apresentação) + Configurações do barbeiro: tarifas, disponibilidade + Sim + Você deve autenticar para poder solicitar uma cotação para um provedor. + Você não é um administrador + As configurações da sua conta + Seu pedido de compromisso + Sua senha foi atualizada. + Suas citações + Sua atividade + Sua necessidade + Seu pedido foi enviado + Seus talentos, suas especialidades, o campo de suas atividades + Suas publicações + Seu perfil + Sua mensagem foi enviada + Também fale sobre esse evento + Excluir meu perfil profissional + Francês + Inglês + Português + Nome de usuário inválido. + Os caracteres válidos são: o sublinhado (_), o pequeno título (-), o apóstrofo ('), as letras minúsculas e maiúsculas de a a z, os números de 0 a 9, o espaço e o ponto. + Este campo é obrigatório. + Campo inválido ... + A senha deve conter pelo menos 6 caracteres. + A senha deve conter pelo menos um caractere especial (nem um número nem uma letra). + As senhas devem conter pelo menos um número ('0' à '9'). + As senhas devem conter pelo menos uma letra maiúscula ('A' à 'Z'). + A senha e sua confirmação não são as mesmas. + Confirmação de senha + Confirme sua senha + O envio de e-mail para confirmação do endereço de e-mail falhou. + Um e-mail foi enviado para confirmação do endereço de e-mail. + Por favor, confirme seu endereço de e-mail + Você criou sua conta {0} com sucesso, +mas o seu endereço de e-mail tem que ser confirmado. +Para fazer isso, siga o seguinte link : <{1}>. + +-- +{0} - {2} <{3}> + Tamanho máximo: {0} caractere. +Este campo é +pelo menos {0} e no máximo {1} caractere (s). +Este campo é +no máximo {0} caracter (es) ({1} em excesso). +Um e-mail foi enviado para {0}. +Um cliente acabou de validar uma solicitação de serviço contra você: + + Benefício: {0} + Cliente: {1} + Data: {2} + Endereço: {3} + +----- +{4} + +Fatura esperada (não liquidada): {5} +Um cliente acabou de validar uma solicitação de serviço contra você: + + Benefício: {0} + Cliente: {1} + Data: {2} + Endereço: {3} + +----- +{4} + +Conjunto de faturas: {5} + +Receba a newsletter mensal + + + alisamento + meio-longo + Cabeleireiro em casa + benefício en Cabeleireiro em casa + Um pedido (de {0}) em cabeleireiro em casa acaba de ser validado + criança + Meches + + diff --git a/Yavsc/Services/GoogleApis/Translate.cs b/Yavsc/Services/GoogleApis/Translate.cs new file mode 100644 index 00000000..c4b28098 --- /dev/null +++ b/Yavsc/Services/GoogleApis/Translate.cs @@ -0,0 +1,60 @@ +using Yavsc.Server; +using GoogleTranslateNET; +using System; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.OptionsModel; +using Microsoft.AspNet.Localization; +using System.Linq; + +namespace Yavsc.Services.GoogleApis +{ + public class Translator : ITranslator + { + GoogleTranslate _gg; + ILogger _logger; + + public Translator(ILoggerFactory loggerFactory, + IOptions rqLocOptions, + IOptions gSettings) + { + _gg = new GoogleTranslate(gSettings.Value.ApiKey); + _logger = loggerFactory.CreateLogger(); + } + + /// + /// + /// + /// + /// + static Language GetLanguageFromCountryCode(string lang) + { + switch (lang) { + case "fr": + case "fr-FR": + case "French": + return Language.French; + + case "en": + case "en-GB": + case "en-US": + case "English": + return Language.English; + + case "pt": + case "br": + return Language.Portuguese; + } + return Language.Automatic; + } + + public string[] Translate(string slang, string dlang, string[] text) + { + var destinationLanguage = GetLanguageFromCountryCode(dlang); + if (destinationLanguage == Language.Unknown) + throw new Exception ("destinationLanguage == Language.Unknown"); + var sourceLanguage = GetLanguageFromCountryCode(slang); + var gResult = _gg.Translate(sourceLanguage, destinationLanguage, text); + return gResult.Select(tr => tr.TranslatedText).ToArray(); + } + } +} \ No newline at end of file diff --git a/Yavsc/ViewComponents/BlogIndexViewComponent.cs b/Yavsc/ViewComponents/BlogIndexViewComponent.cs index d4eaca09..0e2d7968 100644 --- a/Yavsc/ViewComponents/BlogIndexViewComponent.cs +++ b/Yavsc/ViewComponents/BlogIndexViewComponent.cs @@ -5,6 +5,9 @@ using Microsoft.Extensions.Logging; using Microsoft.AspNet.Authorization; using Microsoft.Extensions.OptionsModel; using Yavsc.Models; +using Microsoft.Data.Entity; +using System.Linq; +using Yavsc.Models.Blog; namespace Yavsc.ViewComponents { @@ -26,9 +29,31 @@ namespace Yavsc.ViewComponents } // Renders blog index ofr the specified user by name - public async Task InvokeAsync(string userName) + public async Task InvokeAsync(string viewerId, int skip=0, int maxLen=25) { - return View("Default"); + long[] usercircles = _context.Circle.Include(c=>c.Members). + Where(c=>c.Members.Any(m=>m.MemberId == viewerId)) + .Select(c=>c.Id).ToArray(); + IQueryable posts ; + var allposts = _context.Blogspot + .Include(b => b.Author) + .Include(p=>p.ACL) + .Include(p=>p.Tags) + .Include(p=>p.Comments) + .Where(p=>p.AuthorId == viewerId || p.Visible); + + if (usercircles != null) { + posts = allposts.Where(p=> p.ACL.Count==0 || p.ACL.Any(a=> usercircles.Contains(a.CircleId))) + ; + } + else { + posts = allposts.Where(p => p.ACL.Count == 0); + } + + var data = posts.OrderByDescending( p=> p.DateCreated).ToArray(); + var grouped = data.GroupBy(p=> p.Title).Skip(skip).Take(maxLen); + + return View("Default", grouped); } } -} \ No newline at end of file +} diff --git a/Yavsc/Views/Blogspot/Index.cshtml b/Yavsc/Views/Blogspot/Index.cshtml index a6cde23e..3ecf5051 100644 --- a/Yavsc/Views/Blogspot/Index.cshtml +++ b/Yavsc/Views/Blogspot/Index.cshtml @@ -39,17 +39,6 @@

@ViewData["Title"]

@ViewData["StatusMessage"]

@if (User.IsSignedIn()) { - -

@SR["Create a new article"]

@@ -57,68 +46,6 @@
- +@await Component.InvokeAsync("BlogIndex",User.GetUserId(),0,25) -@foreach (var group in Model) { - var title = group.Key; - string secondclass=""; - var first = group.First(); - string trclass = (first.Visible) ? "visiblepost" : "hiddenpost"; -
-
- -

-@if (first.Photo==null) { } -else {@first.Title} -
- -
-
@first.Author.UserName , - (posté le @first.DateCreated.ToString("dddd d MMM yyyy à H:mm") - @if ((first.DateModified - first.DateCreated).Minutes > 0){  - @:- Modifié le @first.DateModified.ToString("dddd d MMM yyyy à H:mm",System.Globalization.CultureInfo.CurrentUICulture) - })
-
-
-
    - @if (await AuthorizationService.AuthorizeAsync(User, first, new ViewRequirement())) { -
  • - Details -
  • - } - @if (await AuthorizationService.AuthorizeAsync(User, first, new EditRequirement())) { -
  • @SR["Edit"] -
  • -
  • @SR["Delete"] -
  • - } -
-
-
- long gcount = group.Count(); - @if (gcount>1) { -
-
@(gcount-1) autre@(gcount>2?"s":"") au même titre:
- - - @foreach (var item in group.Skip(1)) { - trclass = ((item.Visible)?"visiblepost":"hiddenpost"); -
-
- - @((item.Content?.Length > 120) ? item.Content.Substring(0, 120) + "..." : item.Content) - -
- -
- } -
- } -} -
- - + diff --git a/Yavsc/Views/Home/About.cshtml b/Yavsc/Views/Home/About.cshtml index c3297f5b..869645b9 100755 --- a/Yavsc/Views/Home/About.cshtml +++ b/Yavsc/Views/Home/About.cshtml @@ -163,9 +163,7 @@ La "pré-production" affiche les sites suivants: * [Lua](https://lua.pschneider.fr) +

@Model

- - - diff --git a/Yavsc/Views/Home/About.pt.cshtml b/Yavsc/Views/Home/About.pt.cshtml new file mode 100755 index 00000000..1d847005 --- /dev/null +++ b/Yavsc/Views/Home/About.pt.cshtml @@ -0,0 +1,167 @@ +@{ + ViewData["Title"] = @SR["About"]+" "+@SiteSettings.Value.Title; +} +

@ViewData["Title"]

+ + + +## O objetivo + +Esta aplicação é construída para conectar artistas +do campo musical com seu público. + +## Operation + +Os usuários do site são artista, cliente ou administrador. Todos eles têm direito ao seu blog. +Para artistas, é uma maneira de promover seus negócios. +Eles podem publicar artigos, cheios de vídeos e fotos. +Para os clientes, é uma maneira de quebrar o gelo com seus ídolos, +pela descrição detalhada de seus centros de interesse. + +O aplicativo também alimenta um mensageiro instantâneo, disponível desde +um navegador da web ou de um aplicativo para dispositivos móveis +pode garantir a preservação do sigilo sobre qualquer informação pessoal, +cliente e provedor. + +Então venha (ou não) um pedido, um pagamento do cliente, +a entrega, uma coleta do retorno do cliente e um pagamento do provedor de serviços. + +Nem o cliente nem o provedor são anônimos para os aplicativos, +eles são até formalmente autenticados pela aquisição de um primeiro +faturamento on-line ou ao entrar em seu perfil profissional. + +Durante a fase de construção de um contrato de serviço, +o cliente e o artista podem se beneficiar de um canal de comunicação privado e anônimo, +que está fechado para a validação final do referido contrato. + +Valide um contrato é: + +* Escolha o tipo de contrato +* Concordo com os parâmetros do contrato +* Faça ambas as partes assinarem +* Implementar qualquer adiantamento + +Uma vez validado, o contrato é publicado para ambas as partes. a fatura é publicada para o cliente, +quem pode homenageá-lo ao sistema, caso em que esse cliente recebe uma pontuação de solvente e o contrato é marcado como provisionado. + +Em caso de falta de fornecimento, o sistema terá o cuidado de marcar o contrato como provisório, e avisar o artista +para executar qualquer serviço relacionado, pois o pagamento associado deixa dúvidas. + +Depois que o serviço associado tiver sido executado, os pagamentos relativos serão feitos ao artista. + +Para um contrato executado e não honrado pelo cliente, o processo de processo de recuperação é contratado, caso contrário, o contrato é arquivado, +Os certificados de pagamento estão disponíveis para o artista e a fatura é marcada como paga e depois repassada ao cliente. + +### Para o artista + +O artista escolhe vários parâmetros que farão o seu perfil: + +* O tipo de atividades que ele quer promover, o tipo de serviços que ele oferece (é um DJ, + um cantor solo, um músico solo, um conjunto musical clássico, uma banda) +* O preço de seu contato com um novo cliente + (quanto recebo por solicitação de cliente processada sem peso de mais de um dia) +* O lugar onde ele pratica e, se sim, até onde ele pode se mover. +* um calendário opcional do Google, para consultar para estabelecer sua disponibilidade +* Parâmetros adicionais dependendo do tipo de atividade, por exemplo, para + conjuntos, seu tamanho, se houver, seu repertório ou indicações do estilo de sua música) + +### Para o cliente + +Ele escolhe um lugar e uma data para declarar um evento futuro +(Ele pode programar o quanto quiser). + +Ele pode, navegar pelas publicações dos artistas e começar, +com base em um de seus projetos de eventos, a negociação de um contrato de serviço. + +Ele tem acesso ao conhecimento de dias conhecidos como artistas livres pelo sistema. + +## Confidencialidade + +Em nenhum momento, nenhum endereço de correspondência, nenhum endereço de e-mail e nenhum número de telefone +não são transmitidos para clientes ou artistas. Apenas o sistema tem acesso a essas informações. + +Além disso, o direito de retirada é permanente e sua implementação imediata. +Artistas e clientes podem solicitar sua desinscrição, +que imediatamente desativa as publicações associadas às suas informações, +e planeia a eliminação completa desta informação no prazo de quinze dias +do aplicativo, a menos que seja um pedido contraditório. +A operação é anulável até duas semanas após a sua programação. + + + + +Este é o meu site perso, uma configuração de _Yavsc_ (outro negócio muito pequeno). + +* [README](https://github.com/pazof/yavsc/blob/vnext/README.md) +* [licença: GNU GPL v3](https://github.com/pazof/yavsc/blob/vnext/LICENSE) + +Outras instalações: + + +* [Coiffure](http://coiffure.pschneider.fr) +* [ZicMoove](http://linkmuse.pschneider.fr) +* [Yavsc](http://yavsc.pschneider.fr) + + + + + + Yet Another Very Small Company ... + +* [README](https://github.com/pazof/yavsc/blob/vnext/README.md) +* [license: GNU FPL v3](https://github.com/pazof/yavsc/blob/vnext/LICENSE) + + + + + + +## Yet Another Very Small Company : +* [README](https://github.com/pazof/yavsc/blob/vnext/README.md) +* [license: GNU FPL v3](https://github.com/pazof/yavsc/blob/vnext/LICENSE) + +En production: + +* [Coiffure](https://coiffure.pschneider.fr) +* [ZicMoove](https://zicmoove.pschneider.fr) +* [Lua](https://lua.pschneider.fr) +* [Yavsc](https://yavsc.pschneider.fr) + + + + + + + +Você está no site da ordem em cabeleireiro em casa de Soraya Boudjouraf, +um ás de cabeleireiro, que trabalha na região de Paris. + +Ao validar um formulário de pedido aqui, é para ela que você notifica sua solicitação. + +Você pode [Deixe-lhe o seu número de telefone] (/ HairCutCommand / HairCut? ActivityCode = Brush & performerId = 1bd841ab-c305-4971-940d-7ddca818310c) + e / ou detalhes sobre o seu pedido, +ela vai ligar de volta. + + + + +## Este é um site de desenvolvimento. + +Este recurso só diz respeito ao desenvolvimento do software que o implementa. +É efêmero e praticamente constantemente força 500 códigos. + +Por favor, desculpe a equipe de desenvolvimento para informá-lo sobre este endereço e pelo inconveniente. + +A "pré-produção" exibe os seguintes sites: + +* [Coiffure](https://coiffure.pschneider.fr) +* [ZicMoove](https://zicmoove.pschneider.fr) +* [Yavsc](https://yavsc.pschneider.fr) +* [Lua](https://lua.pschneider.fr) + + + + +

+@Model +

diff --git a/Yavsc/Views/Shared/Components/BlogIndex/Default.cshtml b/Yavsc/Views/Shared/Components/BlogIndex/Default.cshtml new file mode 100644 index 00000000..399298a5 --- /dev/null +++ b/Yavsc/Views/Shared/Components/BlogIndex/Default.cshtml @@ -0,0 +1,64 @@ +@model IEnumerable> + +@if (User.IsSignedIn()) { + + + +} + + +@foreach (var group in Model) { + var title = group.Key ?? "@"; + string secondclass=""; + var first = group.First(); + string ftrclass = (first.Visible) ? "visiblepost" : "hiddenpost"; + + + @foreach (var item in group) { + var trclass = (item.Visible)?"visiblepost":"hiddenpost"; + + + + + + + } +} +
+@title
+ + + @((item.Content?.Length > 256) ? item.Content.Substring(0, 256) + " ..." : item.Content) + (@item.Author.UserName , + + posté le @item.DateCreated.ToString("dddd d MMM yyyy à H:mm") + @if ((item.DateModified - item.DateCreated).Minutes > 0){  + @:- Modifié le @item.DateModified.ToString("dddd d MMM yyyy à H:mm") + }) + + +
    + @if (await AuthorizationService.AuthorizeAsync(User, item, new ViewRequirement())) { +
  • + @SR["Details"] +
  • + } + @if (await AuthorizationService.AuthorizeAsync(User, item, new EditRequirement())) { +
  • @SR["Edit"] +
  • +
  • @SR["Delete"] +
  • + } +
+
+ + diff --git a/Yavsc/Views/_ViewImports.cshtml b/Yavsc/Views/_ViewImports.cshtml index f51d06c3..159bbb1d 100755 --- a/Yavsc/Views/_ViewImports.cshtml +++ b/Yavsc/Views/_ViewImports.cshtml @@ -37,7 +37,6 @@ @using Yavsc.ViewModels; @using Yavsc.ViewModels.Account; -@using Yavsc.ViewModels.Blogspot; @using Yavsc.ViewModels.Administration; @using Yavsc.ViewModels.Auth; @using Yavsc.ViewModels.Manage; diff --git a/Yavsc/project.json b/Yavsc/project.json index bf240a97..c1bc52af 100755 --- a/Yavsc/project.json +++ b/Yavsc/project.json @@ -1,175 +1,180 @@ { - "version": "1.0.5-*", - "description": "encore une très petite entreprise", - "authors": [ - "Paul Schneider " - ], - "packOptions": { - "repository": { - "type": "git", - "url": "https://github.com/pazof/yavsc" - }, - "licenseUrl": "https://github.com/pazof/yavsc/blob/vnext/LICENSE", - "requireLicenseAcceptance": true, - "owners": [ - "Paul Schneider " - ], - "summary": "Yet another very small company", - "projectUrl": "http://yavsc.pschneider.fr", - "tags": [ - "Blog", - "PoS", - "Chat" - ] + "version": "1.0.5-*", + "description": "encore une très petite entreprise", + "authors": [ + "Paul Schneider " + ], + "packOptions": { + "repository": { + "type": "git", + "url": "https://github.com/pazof/yavsc" }, - "userSecretsId": "aspnet5-YavscWeb-a0dadd21-2ced-43d3-96f9-7e504345102f", - "exclude": [ - "bin", - "wwwroot", - "node_modules", - "bower_components", - "contrib" + "licenseUrl": "https://github.com/pazof/yavsc/blob/vnext/LICENSE", + "requireLicenseAcceptance": true, + "owners": [ + "Paul Schneider " ], - "buildOptions": { - "debugType": "full", - "emitEntryPoint": true, - "outputName": "Yavsc", - "compile": { - "include": "*.cs" - }, - "embed": [ - "Resources/**/*.resx" - ] - }, - "configurations": { - "Debug": { - "compilationOptions": { - "emitEntryPoint": true, - "define": [ - "DEBUG", - "TRACE" - ], - "optimize": false, - "debugType": "full", - "platform": "anycpu" - } - }, - "Release": { - "compilationOptions": { - "define": [ - "RELEASE", - "TRACE" - ], - "optimize": true - } - } + "summary": "Yet another very small company", + "projectUrl": "http://yavsc.pschneider.fr", + "tags": [ + "Blog", + "PoS", + "Chat" + ] + }, + "userSecretsId": "aspnet5-YavscWeb-a0dadd21-2ced-43d3-96f9-7e504345102f", + "exclude": [ + "bin", + "wwwroot", + "node_modules", + "bower_components", + "contrib" + ], + "buildOptions": { + "debugType": "full", + "emitEntryPoint": true, + "outputName": "Yavsc", + "compile": { + "include": "*.cs" }, - "webroot": "wwwroot", - "tooling": { - "defaultNamespace": "Yavsc" + "embed": [ + "Resources/**/*.resx" + ] + }, + "configurations": { + "Debug": { + "compilationOptions": { + "emitEntryPoint": true, + "define": [ + "DEBUG", + "TRACE" + ], + "optimize": false, + "debugType": "full", + "platform": "anycpu" + } }, - "dependencies": { - "EntityFramework.Commands": "7.0.0-rc1-final", - "EntityFramework.Core": "7.0.0-rc1-final", - "EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final", - "EntityFramework.Relational": "7.0.0-rc1-final", - "EntityFramework7.Npgsql": "3.1.0-rc1-3", - "EntityFramework7.Npgsql.Design": "3.1.0-rc1-5", - "MailKit": "1.12.0", - "MarkdownDeep-av.NET": "1.5.6", - "Microsoft.AspNet.Authentication.Cookies": "1.0.0-rc1-final", - "Microsoft.AspNet.Authentication.Facebook": "1.0.0-rc1-final", - "Microsoft.AspNet.Authentication.Twitter": "1.0.0-rc1-final", - "Microsoft.AspNet.Authorization": "1.0.0-rc1-final", - "Microsoft.AspNet.Diagnostics.Entity": "7.0.0-rc1-final", - "Microsoft.AspNet.Http.Abstractions": "1.0.0-rc1-final", - "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-rc1-*", - "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-*", - "Microsoft.AspNet.Localization": "1.0.0-rc1-final", - "Microsoft.AspNet.Mvc": "6.0.0-rc1-*", - "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-*", - "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final", - "Microsoft.AspNet.Server.WebListener": "1.0.0-rc1-final", - "Microsoft.AspNet.SignalR.Core": "2.2.1", - "Microsoft.AspNet.SignalR.JS": "2.2.1", - "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-*", - "Microsoft.AspNet.Tooling.Razor": "1.0.0-rc1-*", - "Microsoft.AspNet.WebSockets.Server": "1.0.0-rc1-*", - "Microsoft.AspNet.Session": "1.0.0-rc1-final", - "Microsoft.AspNet.Web.Optimization": "1.1.3", - "Microsoft.AspNet.Http.Extensions": "1.0.0-rc1-final", - "Microsoft.AspNet.DataProtection": "1.0.0-rc1-final", - "Microsoft.AspNet.DataProtection.SystemWeb": "1.0.0-rc1-final", - "Microsoft.AspNet.Authentication.OAuth": "1.0.0-rc1-final", - "Microsoft.AspNet.Mvc.Formatters.Json": "6.0.0-rc1-final", - "Microsoft.AspNet.OWin": "1.0.0-rc1-final", - "Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4", - "Microsoft.Framework.Configuration.Abstractions": "1.0.0-beta8", - "Microsoft.Framework.Configuration.Binder": "1.0.0-beta8", - "Microsoft.Framework.Configuration.Json": "1.0.0-beta8", - "Microsoft.Extensions.Configuration.Abstractions": "1.0.0-rc1-final", - "Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-final", - "Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final", - "Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc1-final", - "Microsoft.Extensions.Logging": "1.0.0-rc1-final", - "Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final", - "Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final", - "Microsoft.Extensions.Logging.TraceSource": "1.0.0-rc1-final", - "Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0-rc1-final", - "Microsoft.Extensions.Globalization.CultureInfoCache": "1.0.0-rc1-final", - "Microsoft.Extensions.Localization": "1.0.0-rc1-final", - "Microsoft.Extensions.Localization.Abstractions": "1.0.0-rc1-final", - "Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc1-final", - "Microsoft.Extensions.WebEncoders.Core": "1.0.0-rc1-final", - "Microsoft.Extensions.Options": "0.0.1-alpha", - "Microsoft.Extensions.WebEncoders": "1.0.0-rc1-final", - "Microsoft.Extensions.CodeGeneration": "1.0.0-rc1-final", - "Microsoft.Extensions.CodeGenerators.Mvc": "1.0.0-rc1-final", - "System.Json": "4.0.20126.16343", - "OAuth.AspNet.Token": { - "type": "build" - }, - "OAuth.AspNet.AuthServer": { - "type": "build" - }, - "PayPalMerchant-net451": { - "version": "2.7.109" - }, - "Gapi.net45": "1.0.1", - "Yavsc.Abstract": { "type": "build" }, - "Yavsc.Server": { "type": "build" } + "Release": { + "compilationOptions": { + "define": [ + "RELEASE", + "TRACE" + ], + "optimize": true + } + } + }, + "webroot": "wwwroot", + "tooling": { + "defaultNamespace": "Yavsc" + }, + "dependencies": { + "EntityFramework.Commands": "7.0.0-rc1-final", + "EntityFramework.Core": "7.0.0-rc1-final", + "EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final", + "EntityFramework.Relational": "7.0.0-rc1-final", + "EntityFramework7.Npgsql": "3.1.0-rc1-3", + "EntityFramework7.Npgsql.Design": "3.1.0-rc1-5", + "MailKit": "1.12.0", + "MarkdownDeep-av.NET": "1.5.6", + "Microsoft.AspNet.Authentication.Cookies": "1.0.0-rc1-final", + "Microsoft.AspNet.Authentication.Facebook": "1.0.0-rc1-final", + "Microsoft.AspNet.Authentication.Twitter": "1.0.0-rc1-final", + "Microsoft.AspNet.Authorization": "1.0.0-rc1-final", + "Microsoft.AspNet.Diagnostics.Entity": "7.0.0-rc1-final", + "Microsoft.AspNet.Http.Abstractions": "1.0.0-rc1-final", + "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-rc1-*", + "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-*", + "Microsoft.AspNet.Localization": "1.0.0-rc1-final", + "Microsoft.AspNet.Mvc": "6.0.0-rc1-*", + "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-*", + "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final", + "Microsoft.AspNet.Server.WebListener": "1.0.0-rc1-final", + "Microsoft.AspNet.SignalR.Core": "2.2.1", + "Microsoft.AspNet.SignalR.JS": "2.2.1", + "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-*", + "Microsoft.AspNet.Tooling.Razor": "1.0.0-rc1-*", + "Microsoft.AspNet.WebSockets.Server": "1.0.0-rc1-*", + "Microsoft.AspNet.Session": "1.0.0-rc1-final", + "Microsoft.AspNet.Web.Optimization": "1.1.3", + "Microsoft.AspNet.Http.Extensions": "1.0.0-rc1-final", + "Microsoft.AspNet.DataProtection": "1.0.0-rc1-final", + "Microsoft.AspNet.DataProtection.SystemWeb": "1.0.0-rc1-final", + "Microsoft.AspNet.Authentication.OAuth": "1.0.0-rc1-final", + "Microsoft.AspNet.Mvc.Formatters.Json": "6.0.0-rc1-final", + "Microsoft.AspNet.OWin": "1.0.0-rc1-final", + "Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4", + "Microsoft.Framework.Configuration.Abstractions": "1.0.0-beta8", + "Microsoft.Framework.Configuration.Binder": "1.0.0-beta8", + "Microsoft.Framework.Configuration.Json": "1.0.0-beta8", + "Microsoft.Extensions.Configuration.Abstractions": "1.0.0-rc1-final", + "Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-final", + "Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final", + "Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc1-final", + "Microsoft.Extensions.Logging": "1.0.0-rc1-final", + "Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final", + "Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final", + "Microsoft.Extensions.Logging.TraceSource": "1.0.0-rc1-final", + "Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0-rc1-final", + "Microsoft.Extensions.Globalization.CultureInfoCache": "1.0.0-rc1-final", + "Microsoft.Extensions.Localization": "1.0.0-rc1-final", + "Microsoft.Extensions.Localization.Abstractions": "1.0.0-rc1-final", + "Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc1-final", + "Microsoft.Extensions.WebEncoders.Core": "1.0.0-rc1-final", + "Microsoft.Extensions.Options": "0.0.1-alpha", + "Microsoft.Extensions.WebEncoders": "1.0.0-rc1-final", + "Microsoft.Extensions.CodeGeneration": "1.0.0-rc1-final", + "Microsoft.Extensions.CodeGenerators.Mvc": "1.0.0-rc1-final", + "System.Json": "4.0.20126.16343", + "OAuth.AspNet.Token": { + "type": "build" }, - "commands": { - "web": "Microsoft.AspNet.Server.Kestrel --server.urls http://*:5000", - "coiffure": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:88", - "lua": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:85", - "luatest": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:5001", - "kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:5000", - "linkmuse": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:87", - "yavsc": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:86", - "yavscpre": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:84", - "ef": "EntityFramework.Commands", - "gen": "Microsoft.Extensions.CodeGeneration" + "OAuth.AspNet.AuthServer": { + "type": "build" }, - "frameworks": { - "dnx451": { - "frameworkAssemblies": { - "System.Drawing": "4.0.0.0", - "System.Net": "4.0.0.0", - "System.Xml": "4.0.0.0", - "System": "4.0.0.0" - } - } + "PayPalMerchant-net451": { + "version": "2.7.109" }, - "publishOptions": { - "exclude": [ - "**.user", - "**.vspscc", - "contrib/**/*.*" - ] + "Gapi.net45": "1.0.1", + "Yavsc.Abstract": { + "type": "build" }, - "scripts": { - "prepublish": "gulp min" + "Yavsc.Server": { + "type": "build" }, - "embed": "Views/**/*.cshtml" -} + "GoogleTranslate": "1.0.5" + }, + "commands": { + "web": "Microsoft.AspNet.Server.Kestrel --server.urls http://*:5000", + "coiffure": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:88", + "lua": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:85", + "luatest": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:5001", + "kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:5000", + "linkmuse": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:87", + "yavsc": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:86", + "yavscpre": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:84", + "ef": "EntityFramework.Commands", + "gen": "Microsoft.Extensions.CodeGeneration" + }, + "frameworks": { + "dnx451": { + "frameworkAssemblies": { + "System.Drawing": "4.0.0.0", + "System.Net": "4.0.0.0", + "System.Xml": "4.0.0.0", + "System": "4.0.0.0" + } + } + }, + "publishOptions": { + "exclude": [ + "**.user", + "**.vspscc", + "contrib/**/*.*" + ] + }, + "scripts": { + "prepublish": "gulp min" + }, + "embed": "Views/**/*.cshtml" +} \ No newline at end of file diff --git a/Yavsc/wwwroot/css/main/site.css b/Yavsc/wwwroot/css/main/site.css index 3a37abc2..889b6deb 100644 --- a/Yavsc/wwwroot/css/main/site.css +++ b/Yavsc/wwwroot/css/main/site.css @@ -372,10 +372,12 @@ footer { } .blogphoto { - float: left; margin: 1em; - max-width: 100em; - max-height: 100em; + max-width: 100%; + max-height: 100%; + image-orientation: from-image; /* Utilise les données EXIF + de l'image */ + } body { @@ -402,4 +404,4 @@ h5, h6 { font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 700; -} \ No newline at end of file +}