diff --git a/src/Yavsc.Abstract/Constants.cs b/src/Yavsc.Abstract/Constants.cs
index ec8b651d..b55a3ee5 100644
--- a/src/Yavsc.Abstract/Constants.cs
+++ b/src/Yavsc.Abstract/Constants.cs
@@ -19,10 +19,10 @@ namespace Yavsc
public const string CompanyClaimType = "https://schemas.pschneider.fr/identity/claims/Company";
public const string UserNameRegExp = @"^[a-zA-Z][a-zA-Z0-9._-]*$";
public const string UserFileNamePatternRegExp = @"^([a-zA-Z0-9._-]*/)*[a-zA-Z0-9._-]+$";
- public const string AuthorizePath = "~/authorize";
- public const string TokenPath = "~/token";
- public const string LoginPath = "~/signin";
- public const string LogoutPath = "~/signout";
+ public const string AuthorizePath = "/authorize";
+ public const string TokenPath = "/token";
+ public const string LoginPath = "/signin";
+ public const string LogoutPath = "/signout";
public const string SignalRPath = "/api/signalr";
diff --git a/src/Yavsc.Abstract/Interfaces/IEmailSender.cs b/src/Yavsc.Abstract/Interfaces/IEmailSender.cs
deleted file mode 100644
index 901b77d0..00000000
--- a/src/Yavsc.Abstract/Interfaces/IEmailSender.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-
-using System.Threading.Tasks;
-using Yavsc.Abstract.Manage;
-
-namespace Yavsc.Services
-{
- public interface IEmailSender
- {
- ///
- /// Sends en email.
- ///
- /// user name in database
- /// user's email
- /// email subject
- /// message
- /// the message id
- Task SendEmailAsync(string username, string email, string subject, string message);
- }
-}
diff --git a/src/Yavsc.Server/Models/ApplicationUser.cs b/src/Yavsc.Server/Models/ApplicationUser.cs
index 7a88f440..9907f58c 100644
--- a/src/Yavsc.Server/Models/ApplicationUser.cs
+++ b/src/Yavsc.Server/Models/ApplicationUser.cs
@@ -9,11 +9,11 @@ using Yavsc.Models.Bank;
using Yavsc.Models.Access;
namespace Yavsc.Models
{
- public class ApplicationUser : IdentityUser, IBaseTrackedEntity
+ [Table("AspNetUsers")]
+ public class ApplicationUser : IdentityUser
{
-
- ///
- /// Another me, as a byte array.
+ ///
+ /// Another me, as a byte array.TG7@Eu%80rufzkhbb
/// This value points a picture that may be used
/// to present the user
///
@@ -113,24 +113,5 @@ namespace Yavsc.Models
[InverseProperty("Member")]
public virtual List Membership { get; set; }
- public DateTime DateCreated
- {
- get; set;
- }
-
- public string UserCreated
- {
- get; set;
- }
-
- public DateTime DateModified
- {
- get; set;
- }
-
- public string UserModified
- {
- get; set;
- }
}
}
diff --git a/src/Yavsc.Server/Services/TranslationService.cs b/src/Yavsc.Server/Services/TranslationService.cs
deleted file mode 100644
index d727246c..00000000
--- a/src/Yavsc.Server/Services/TranslationService.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Yavsc.Server.Services
-{
- public class TranslationService
- {
-
- }
-}
\ No newline at end of file
diff --git a/src/Yavsc.Server/Settings/ThirdPartyFiles.cs b/src/Yavsc.Server/Settings/ThirdPartyFiles.cs
deleted file mode 100644
index 00823dc9..00000000
--- a/src/Yavsc.Server/Settings/ThirdPartyFiles.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Yavsc
-{
-
- public class ThirdPartyFiles {
-
- }
-}
\ No newline at end of file
diff --git a/src/Yavsc.Server/Settings/UserPolicies.cs b/src/Yavsc.Server/Settings/UserPolicies.cs
index 2aef87ff..5f48426b 100644
--- a/src/Yavsc.Server/Settings/UserPolicies.cs
+++ b/src/Yavsc.Server/Settings/UserPolicies.cs
@@ -10,8 +10,7 @@ namespace Yavsc.Server.Settings
new Dictionary>
{
{ "allow-monthly", u => u.AllowMonthlyEmail },
- { "email-not-confirmed", u => !u.EmailConfirmed && u.DateCreated < DateTime.Now.AddDays(-7) },
- { "user-to-remove", u => !u.EmailConfirmed && u.DateCreated < DateTime.Now.AddDays(-14) }
+ { "email-not-confirmed", u => !u.EmailConfirmed }
};
}
}
diff --git a/src/Yavsc.Server/ViewModels/Account/LoginViewModel.cs b/src/Yavsc.Server/ViewModels/Account/LoginViewModel.cs
index 68773a33..3ff7f655 100755
--- a/src/Yavsc.Server/ViewModels/Account/LoginViewModel.cs
+++ b/src/Yavsc.Server/ViewModels/Account/LoginViewModel.cs
@@ -6,14 +6,15 @@ using Yavsc.Attributes.Validation;
namespace Yavsc.ViewModels.Account
{
// TODO external autentication providers
- public class SignInViewModel
+
+ public class SignInModel
{
- ///
+ ///
/// Local user's name.
///
///
[YaRequired]
- public string UserName { get; set; }
+ public string EMail { get; set; }
///
/// Local user's password .
@@ -46,11 +47,6 @@ namespace Yavsc.ViewModels.Account
///
public string ReturnUrl { get; set; }
- ///
- /// Lists external identity provider descriptions.
- ///
- /// an enumeration of the descriptions.
- public IEnumerable ExternalProviders { get; set; }
}
public class YaAuthenticationDescription {
diff --git a/src/Yavsc.Server/ViewModels/Account/ResetPasswordViewModel.cs b/src/Yavsc.Server/ViewModels/Account/ResetPasswordViewModel.cs
index 6352b3f9..b72e6cb5 100644
--- a/src/Yavsc.Server/ViewModels/Account/ResetPasswordViewModel.cs
+++ b/src/Yavsc.Server/ViewModels/Account/ResetPasswordViewModel.cs
@@ -18,7 +18,5 @@ namespace Yavsc.ViewModels.Account
[Display(Name = "Confirmer le mot de passe")]
[Compare("Password", ErrorMessage = "Le mot de passe et sa confirmation ne sont pas les mêmes.")]
public string ConfirmPassword { get; set; }
-
- public string Code { get; set; }
}
}
diff --git a/src/Yavsc/ApiControllers/accounting/ApplicationUserApiController.cs b/src/Yavsc/ApiControllers/accounting/ApplicationUserApiController.cs
index 02638ca3..ac9de3b1 100644
--- a/src/Yavsc/ApiControllers/accounting/ApplicationUserApiController.cs
+++ b/src/Yavsc/ApiControllers/accounting/ApplicationUserApiController.cs
@@ -24,20 +24,20 @@ namespace Yavsc.Controllers
// GET: api/ApplicationUserApi
[HttpGet]
- public IEnumerable GetApplicationUser()
+ public IEnumerable GetApplicationUser(int skip=0, int take = 25)
{
- return _context.Users.OrderByDescending(u => u.DateModified).Take(25)
- .Select(u=> new UserInfo {
+ return _context.Users.Skip(skip).Take(take)
+ .Select(u=> new UserInfo{
UserId = u.Id,
UserName = u.UserName,
- Avatar = u.Avatar });
+ Avatar = u.Avatar});
}
[HttpGet("search/{pattern}")]
- public IEnumerable SearchApplicationUser(string pattern)
+ public IEnumerable SearchApplicationUser(string pattern, int skip=0, int take = 25)
{
return _context.Users.Where(u => u.UserName.Contains(pattern))
- .OrderByDescending(u => u.DateModified).Take(25)
+ .Skip(skip).Take(take)
.Select(u=> new UserInfo {
UserId = u.Id,
UserName = u.UserName,
diff --git a/src/Yavsc/Controllers/Accounting/AccountController.cs b/src/Yavsc/Controllers/Accounting/AccountController.cs
index de1294b4..fdd975fa 100644
--- a/src/Yavsc/Controllers/Accounting/AccountController.cs
+++ b/src/Yavsc/Controllers/Accounting/AccountController.cs
@@ -1,3 +1,4 @@
+using System.Web;
using System.Security.Claims;
using Microsoft.AspNetCore.Authorization;
@@ -13,6 +14,8 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Options;
using Yavsc.Helpers;
using Yavsc.Abstract.Manage;
+using Microsoft.AspNetCore.Identity.UI.Services;
+using Yavsc.Interface;
namespace Yavsc.Controllers
{
@@ -23,7 +26,7 @@ namespace Yavsc.Controllers
private const int defaultLen = 10;
private readonly UserManager _userManager;
private readonly SignInManager _signInManager;
- private readonly IEmailSender _emailSender;
+ private readonly ITrueEmailSender _emailSender;
// private readonly ISmsSender _smsSender;
private readonly ILogger _logger;
readonly SiteSettings _siteSettings;
@@ -39,7 +42,7 @@ namespace Yavsc.Controllers
public AccountController(
UserManager userManager,
SignInManager signInManager,
- IEmailSender emailSender,
+ ITrueEmailSender emailSender,
IOptions siteSettings,
ILoggerFactory loggerFactory, IOptions twilioSettings,
IStringLocalizer localizer,
@@ -65,12 +68,9 @@ namespace Yavsc.Controllers
}
[Authorize(Roles = Constants.AdminGroupName)]
- [Route("Account/UserList/{page?}/{len?}")]
- public async Task UserList(string page, string len)
+ [Route("Account/UserList/{pageNum}/{len?}")]
+ public async Task UserList(int pageNum, int pageLen = defaultLen)
{
- int pageNum = page!=null ? int.Parse(page) : 0;
- int pageLen = len!=null ? int.Parse(len) : defaultLen;
-
var users = _dbContext.Users.OrderBy(u=>u.UserName);
var shown = pageNum * pageLen;
var toShow = users.Skip(shown).Take(pageLen);
@@ -96,7 +96,7 @@ namespace Yavsc.Controllers
// will be redirected to after a successful authentication and not
// the redirect_uri of the requesting client application against the third
// party identity provider.
- return View(new SignInViewModel
+ return View(new SignInModel
{
ReturnUrl = returnUrl ?? "/",
});
@@ -122,16 +122,17 @@ namespace Yavsc.Controllers
[AllowAnonymous]
[HttpPost(Constants.LoginPath)]
- public async Task SignIn(SignInViewModel model)
+ public async Task SignIn(SignInModel model)
{
- if (Request.Method == "POST")
+ if (Request.Method == "POST") // "hGbkk9B94NAae#aG"
+
{
if (model.Provider ==null || model.Provider == "LOCAL")
{
if (ModelState.IsValid)
{
var user = _dbContext.Users.Include(u=>u.Membership).FirstOrDefault(
- u=>u.UserName == model.UserName);
+ u=>u.Email == model.EMail);
if (user != null)
{
@@ -149,7 +150,7 @@ namespace Yavsc.Controllers
}
// This doesn't count login failures towards account lockout
// To enable password failures to trigger account lockout, set lockoutOnFailure: true
- var result = await _signInManager.PasswordSignInAsync(model.UserName, model.Password, model.RememberMe, lockoutOnFailure: false);
+ var result = await _signInManager.PasswordSignInAsync(model.EMail, model.Password, model.RememberMe, lockoutOnFailure: false);
if (result.Succeeded)
{
@@ -171,7 +172,7 @@ namespace Yavsc.Controllers
}
else
{
- ModelState.AddModelError(string.Empty, $"Invalid login attempt. ({model.UserName}, {model.Password})");
+ ModelState.AddModelError(string.Empty, $"Invalid login attempt. ({model.EMail}, {model.Password})");
return this.ViewOk(model);
}
}
@@ -245,19 +246,11 @@ namespace Yavsc.Controllers
// Send an email with this link
var code = await _userManager.GenerateEmailConfirmationTokenAsync(user);
var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code }, protocol: "https", host: Startup.Authority);
- var emailSent = await _emailSender.SendEmailAsync(model.UserName, model.Email, _localizer["ConfirmYourAccountTitle"],
+ await _emailSender.SendEmailAsync(model.UserName, model.Email, _localizer["ConfirmYourAccountTitle"],
string.Format(_localizer["ConfirmYourAccountBody"], _siteSettings.Title, callbackUrl, _siteSettings.Slogan, _siteSettings.Audience));
// No, wait for more than a login pass submission:
// do not await _signInManager.SignInAsync(user, isPersistent: false);
- if (emailSent==null)
- {
- _logger.LogWarning("User created with error sending email confirmation request");
- this.NotifyWarning(
- "E-mail confirmation",
- _localizer["ErrorSendingEmailForConfirm"]
- );
- }
- else
+
this.NotifyInfo(
"E-mail confirmation",
_localizer["EmailSentForConfirm"]
@@ -305,7 +298,7 @@ namespace Yavsc.Controllers
string.Format(this._localizer["ConfirmYourAccountBody"],
_siteSettings.Title, callbackUrl, _siteSettings.Slogan,
_siteSettings.Audience));
- return res;
+ return new EmailSentViewModel { EMail = user.Email, Sent = true, MessageId = res };
}
private async Task SendEMailFactorAsync(ApplicationUser user, string provider)
@@ -318,7 +311,7 @@ namespace Yavsc.Controllers
string.Format(this._localizer["AccountEmailFactorBody"],
_siteSettings.Title, callbackUrl, _siteSettings.Slogan,
_siteSettings.Audience, code));
- return res;
+ return new EmailSentViewModel { EMail = user.Email, Sent = true, MessageId = res };;
}
//
// POST: /Account/LogOff
@@ -553,10 +546,12 @@ namespace Yavsc.Controllers
// For more information on how to enable account confirmation and password reset please visit http://go.microsoft.com/fwlink/?LinkID=532713
// Send an email with this link
var code = await _userManager.GeneratePasswordResetTokenAsync(user);
- var callbackUrl = Url.Action("ResetPassword", "Account", new { userId = user.Id, code },
- protocol: "https", host: Startup.Authority);
+ var callbackUrl = _siteSettings.Audience + "/Account/ResetPassword/" +
+ HttpUtility.UrlEncode(user.Id) + "/" + HttpUtility.UrlEncode(code);
+
var sent = await _emailSender.SendEmailAsync(user.UserName, user.Email, _localizer["Reset Password"],
- _localizer["Please reset your password by following this link:"] + " <" + callbackUrl + ">");
+ _localizer["Please reset your password by "] + " following this link");
return View("ForgotPasswordConfirmation", sent);
}
@@ -574,21 +569,23 @@ namespace Yavsc.Controllers
}
// GET: /Account/ResetPassword
- [HttpGet]
+ [HttpGet("/Account/ResetPassword/{id}/{code}")]
[AllowAnonymous]
- public async Task ResetPassword(string UserId)
+ public async Task ResetPassword(string id, string code)
{
- var user = await _userManager.FindByIdAsync(UserId);
+ var user = await _userManager.FindByIdAsync(id);
if (user==null) return new BadRequestResult();
// We just serve the form to reset here.
- return View();
+ return View(new ResetPasswordViewModel { });
}
// POST: /Account/ResetPassword
- [HttpPost]
+ [HttpPost("/Account/ResetPassword/{id}/{code}")]
[AllowAnonymous]
[ValidateAntiForgeryToken]
- public async Task ResetPassword(ResetPasswordViewModel model)
+ public async Task ResetPassword([FromRoute] string id,
+ [FromRoute] string code,
+ ResetPasswordViewModel model)
{
if (!ModelState.IsValid)
{
@@ -600,7 +597,9 @@ namespace Yavsc.Controllers
// Don't reveal that the user does not exist
return RedirectToAction(nameof(AccountController.ResetPasswordConfirmation), "Account");
}
- var result = await _userManager.ResetPasswordAsync(user, model.Code, model.Password);
+ // code : "CfDJ8DmPlC3R8%2fNMqGlHZHZMwbjaXxgD3GW3H75Ubt+4Sbw%2fn%2fdg9X8Bll+CLIh%2fquI+Z96XEkx7bfrZiB+wpPb+b5%2ffgzgy+cQnKfX9J7%2fLNro+F3uE5JkXSlUc1WqVW2mVQrpWHjx1Dbn2n77TTGym3ttQoECsTR%2foo27dW9U11pmRJuTiwPBJZBOt0ffIRmgDDHh2f0VySTQEwjfRiLdCwctL%2fmh21ympJMKJl5PZnTVs"
+ var result = await _userManager.ResetPasswordAsync(user,
+ HttpUtility.UrlDecode(code), model.Password);
if (result.Succeeded)
{
diff --git a/src/Yavsc/Controllers/Accounting/ManageController.cs b/src/Yavsc/Controllers/Accounting/ManageController.cs
index 2833f9d9..9e6150cb 100644
--- a/src/Yavsc/Controllers/Accounting/ManageController.cs
+++ b/src/Yavsc/Controllers/Accounting/ManageController.cs
@@ -14,6 +14,7 @@ using Yavsc.ViewModels.Calendar;
using Yavsc.Models;
using Yavsc.Services;
using Yavsc.ViewModels.Manage;
+using Microsoft.AspNetCore.Identity.UI.Services;
namespace Yavsc.Controllers
{
diff --git a/src/Yavsc/Controllers/Contracting/CommandController.cs b/src/Yavsc/Controllers/Contracting/CommandController.cs
index cee83971..b6a37dd1 100644
--- a/src/Yavsc/Controllers/Contracting/CommandController.cs
+++ b/src/Yavsc/Controllers/Contracting/CommandController.cs
@@ -7,6 +7,7 @@ using Microsoft.Extensions.Localization;
namespace Yavsc.Controllers
{
using Helpers;
+ using Microsoft.AspNetCore.Identity.UI.Services;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Options;
using Models;
@@ -14,6 +15,8 @@ namespace Yavsc.Controllers
using Models.Relationship;
using Models.Workflow;
using Services;
+ using Yavsc.Interface;
+ using Yavsc.Settings;
public class CommandController : Controller
{
@@ -21,7 +24,7 @@ namespace Yavsc.Controllers
protected ApplicationDbContext _context;
protected GoogleAuthSettings _googleSettings;
protected IYavscMessageSender _MessageSender;
- protected IEmailSender _emailSender;
+ protected ITrueEmailSender _emailSender;
protected IStringLocalizer _localizer;
protected SiteSettings _siteSettings;
protected SmtpSettings _smtpSettings;
@@ -33,7 +36,7 @@ namespace Yavsc.Controllers
UserManager userManager,
ICalendarManager calendarManager,
IStringLocalizer localizer,
- IEmailSender emailSender,
+ ITrueEmailSender emailSender,
IOptions smtpSettings,
IOptions siteSettings,
ILoggerFactory loggerFactory)
diff --git a/src/Yavsc/Controllers/Haircut/HairCutCommandController.cs b/src/Yavsc/Controllers/Haircut/HairCutCommandController.cs
index 837acae4..7f2d97f6 100644
--- a/src/Yavsc/Controllers/Haircut/HairCutCommandController.cs
+++ b/src/Yavsc/Controllers/Haircut/HairCutCommandController.cs
@@ -22,6 +22,9 @@ namespace Yavsc.Controllers
using PayPal.PayPalAPIInterfaceService.Model;
using Microsoft.Extensions.Options;
using Microsoft.EntityFrameworkCore;
+ using Microsoft.AspNetCore.Identity.UI.Services;
+ using Yavsc.Interface;
+ using Yavsc.Settings;
public class HairCutCommandController : CommandController
{
@@ -32,7 +35,7 @@ namespace Yavsc.Controllers
IYavscMessageSender GCMSender,
UserManager userManager,
IStringLocalizer localizer,
- IEmailSender emailSender,
+ ITrueEmailSender emailSender,
IOptions smtpSettings,
IOptions siteSettings,
ICalendarManager calManager,
diff --git a/src/Yavsc/DataProtection/key-ab1c0839-2078-41c1-b8be-72fa977278d4.xml b/src/Yavsc/DataProtection/key-ab1c0839-2078-41c1-b8be-72fa977278d4.xml
new file mode 100644
index 00000000..9e0eb800
--- /dev/null
+++ b/src/Yavsc/DataProtection/key-ab1c0839-2078-41c1-b8be-72fa977278d4.xml
@@ -0,0 +1,16 @@
+
+
+ 2023-04-05T20:58:19.6046151Z
+ 2023-04-05T20:58:19.598076Z
+ 2023-07-04T20:58:19.598076Z
+
+
+
+
+
+
+ fc3m/BUIbMxSbIjZ7fBO4iIiQZVjA5IVlrEFCwBsBJDvYbJJkaCphoeP15iJEsd2Zv3x946xfNyo+c+9WU2xoQ==
+
+
+
+
\ No newline at end of file
diff --git a/src/Yavsc/Interfaces/ITrueEmailSender.cs b/src/Yavsc/Interfaces/ITrueEmailSender.cs
new file mode 100644
index 00000000..79251ea1
--- /dev/null
+++ b/src/Yavsc/Interfaces/ITrueEmailSender.cs
@@ -0,0 +1,15 @@
+
+namespace Yavsc.Interface
+{
+public interface ITrueEmailSender
+{
+ //
+ // Résumé :
+ // This API supports the ASP.NET Core Identity default UI infrastructure and is
+ // not intended to be used directly from your code. This API may change or be removed
+ // in future releases.
+ Task SendEmailAsync(string name, string email, string subject, string htmlMessage);
+}
+
+
+}
diff --git a/src/Yavsc/Migrations/20190730164137_publicCircle.Designer.cs b/src/Yavsc/Migrations/2019/20190730164137_publicCircle.Designer.cs
similarity index 100%
rename from src/Yavsc/Migrations/20190730164137_publicCircle.Designer.cs
rename to src/Yavsc/Migrations/2019/20190730164137_publicCircle.Designer.cs
diff --git a/src/Yavsc/Migrations/20190730164137_publicCircle.cs b/src/Yavsc/Migrations/2019/20190730164137_publicCircle.cs
similarity index 100%
rename from src/Yavsc/Migrations/20190730164137_publicCircle.cs
rename to src/Yavsc/Migrations/2019/20190730164137_publicCircle.cs
diff --git a/src/Yavsc/Migrations/20190803204448_fileCircle.Designer.cs b/src/Yavsc/Migrations/2019/20190803204448_fileCircle.Designer.cs
similarity index 100%
rename from src/Yavsc/Migrations/20190803204448_fileCircle.Designer.cs
rename to src/Yavsc/Migrations/2019/20190803204448_fileCircle.Designer.cs
diff --git a/src/Yavsc/Migrations/20190803204448_fileCircle.cs b/src/Yavsc/Migrations/2019/20190803204448_fileCircle.cs
similarity index 100%
rename from src/Yavsc/Migrations/20190803204448_fileCircle.cs
rename to src/Yavsc/Migrations/2019/20190803204448_fileCircle.cs
diff --git a/src/Yavsc/Migrations/20190804232432_circleAnnotations.Designer.cs b/src/Yavsc/Migrations/2019/20190804232432_circleAnnotations.Designer.cs
similarity index 100%
rename from src/Yavsc/Migrations/20190804232432_circleAnnotations.Designer.cs
rename to src/Yavsc/Migrations/2019/20190804232432_circleAnnotations.Designer.cs
diff --git a/src/Yavsc/Migrations/20190804232432_circleAnnotations.cs b/src/Yavsc/Migrations/2019/20190804232432_circleAnnotations.cs
similarity index 100%
rename from src/Yavsc/Migrations/20190804232432_circleAnnotations.cs
rename to src/Yavsc/Migrations/2019/20190804232432_circleAnnotations.cs
diff --git a/src/Yavsc/Migrations/20190819220343_intrumentRatingConstraint.Designer.cs b/src/Yavsc/Migrations/2019/20190819220343_intrumentRatingConstraint.Designer.cs
similarity index 100%
rename from src/Yavsc/Migrations/20190819220343_intrumentRatingConstraint.Designer.cs
rename to src/Yavsc/Migrations/2019/20190819220343_intrumentRatingConstraint.Designer.cs
diff --git a/src/Yavsc/Migrations/20190819220343_intrumentRatingConstraint.cs b/src/Yavsc/Migrations/2019/20190819220343_intrumentRatingConstraint.cs
similarity index 100%
rename from src/Yavsc/Migrations/20190819220343_intrumentRatingConstraint.cs
rename to src/Yavsc/Migrations/2019/20190819220343_intrumentRatingConstraint.cs
diff --git a/src/Yavsc/Migrations/20190819221632_instRateWInst.Designer.cs b/src/Yavsc/Migrations/2019/20190819221632_instRateWInst.Designer.cs
similarity index 100%
rename from src/Yavsc/Migrations/20190819221632_instRateWInst.Designer.cs
rename to src/Yavsc/Migrations/2019/20190819221632_instRateWInst.Designer.cs
diff --git a/src/Yavsc/Migrations/20190819221632_instRateWInst.cs b/src/Yavsc/Migrations/2019/20190819221632_instRateWInst.cs
similarity index 100%
rename from src/Yavsc/Migrations/20190819221632_instRateWInst.cs
rename to src/Yavsc/Migrations/2019/20190819221632_instRateWInst.cs
diff --git a/src/Yavsc/Migrations/20190826132314_bugDescriptionLength.Designer.cs b/src/Yavsc/Migrations/2019/20190826132314_bugDescriptionLength.Designer.cs
similarity index 100%
rename from src/Yavsc/Migrations/20190826132314_bugDescriptionLength.Designer.cs
rename to src/Yavsc/Migrations/2019/20190826132314_bugDescriptionLength.Designer.cs
diff --git a/src/Yavsc/Migrations/20190826132314_bugDescriptionLength.cs b/src/Yavsc/Migrations/2019/20190826132314_bugDescriptionLength.cs
similarity index 100%
rename from src/Yavsc/Migrations/20190826132314_bugDescriptionLength.cs
rename to src/Yavsc/Migrations/2019/20190826132314_bugDescriptionLength.cs
diff --git a/src/Yavsc/Migrations/20210530122042_template-key.Designer.cs b/src/Yavsc/Migrations/2021/20210530122042_template-key.Designer.cs
similarity index 100%
rename from src/Yavsc/Migrations/20210530122042_template-key.Designer.cs
rename to src/Yavsc/Migrations/2021/20210530122042_template-key.Designer.cs
diff --git a/src/Yavsc/Migrations/20210530122042_template-key.cs b/src/Yavsc/Migrations/2021/20210530122042_template-key.cs
similarity index 100%
rename from src/Yavsc/Migrations/20210530122042_template-key.cs
rename to src/Yavsc/Migrations/2021/20210530122042_template-key.cs
diff --git a/src/Yavsc/Migrations/20210530213408_mailling-not-mailling-lists.Designer.cs b/src/Yavsc/Migrations/2021/20210530213408_mailling-not-mailling-lists.Designer.cs
similarity index 100%
rename from src/Yavsc/Migrations/20210530213408_mailling-not-mailling-lists.Designer.cs
rename to src/Yavsc/Migrations/2021/20210530213408_mailling-not-mailling-lists.Designer.cs
diff --git a/src/Yavsc/Migrations/20210530213408_mailling-not-mailling-lists.cs b/src/Yavsc/Migrations/2021/20210530213408_mailling-not-mailling-lists.cs
similarity index 100%
rename from src/Yavsc/Migrations/20210530213408_mailling-not-mailling-lists.cs
rename to src/Yavsc/Migrations/2021/20210530213408_mailling-not-mailling-lists.cs
diff --git a/src/Yavsc/Migrations/20210603172023_no-more-circle-autorisation-to-file.Designer.cs b/src/Yavsc/Migrations/2021/20210603172023_no-more-circle-autorisation-to-file.Designer.cs
similarity index 100%
rename from src/Yavsc/Migrations/20210603172023_no-more-circle-autorisation-to-file.Designer.cs
rename to src/Yavsc/Migrations/2021/20210603172023_no-more-circle-autorisation-to-file.Designer.cs
diff --git a/src/Yavsc/Migrations/20210603172023_no-more-circle-autorisation-to-file.cs b/src/Yavsc/Migrations/2021/20210603172023_no-more-circle-autorisation-to-file.cs
similarity index 100%
rename from src/Yavsc/Migrations/20210603172023_no-more-circle-autorisation-to-file.cs
rename to src/Yavsc/Migrations/2021/20210603172023_no-more-circle-autorisation-to-file.cs
diff --git a/src/Yavsc/Migrations/20230405203545_userreload.Designer.cs b/src/Yavsc/Migrations/20230405203545_userreload.Designer.cs
new file mode 100644
index 00000000..78750130
--- /dev/null
+++ b/src/Yavsc/Migrations/20230405203545_userreload.Designer.cs
@@ -0,0 +1,3556 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+using Yavsc.Models;
+
+#nullable disable
+
+namespace Yavsc.Migrations
+{
+ [DbContext(typeof(ApplicationDbContext))]
+ [Migration("20230405203545_userreload")]
+ partial class userreload
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "7.0.4")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnType("text");
+
+ b.Property("Name")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("NormalizedName")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedName")
+ .IsUnique()
+ .HasDatabaseName("RoleNameIndex");
+
+ b.ToTable("AspNetRoles", (string)null);
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("ClaimType")
+ .HasColumnType("text");
+
+ b.Property("ClaimValue")
+ .HasColumnType("text");
+
+ b.Property("RoleId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RoleId");
+
+ b.ToTable("AspNetRoleClaims", (string)null);
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("ClaimType")
+ .HasColumnType("text");
+
+ b.Property("ClaimValue")
+ .HasColumnType("text");
+
+ b.Property("UserId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("AspNetUserClaims", (string)null);
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
+ {
+ b.Property("LoginProvider")
+ .HasColumnType("text");
+
+ b.Property("ProviderKey")
+ .HasColumnType("text");
+
+ b.Property("ProviderDisplayName")
+ .HasColumnType("text");
+
+ b.Property("UserId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("LoginProvider", "ProviderKey");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("AspNetUserLogins", (string)null);
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("text");
+
+ b.Property("RoleId")
+ .HasColumnType("text");
+
+ b.HasKey("UserId", "RoleId");
+
+ b.HasIndex("RoleId");
+
+ b.ToTable("AspNetUserRoles", (string)null);
+ });
+
+ modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("text");
+
+ b.Property("LoginProvider")
+ .HasColumnType("text");
+
+ b.Property("Name")
+ .HasColumnType("text");
+
+ b.Property("Value")
+ .HasColumnType("text");
+
+ b.HasKey("UserId", "LoginProvider", "Name");
+
+ b.ToTable("AspNetUserTokens", (string)null);
+ });
+
+ modelBuilder.Entity("Yavsc.Abstract.Identity.ClientProviderInfo", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("text");
+
+ b.Property("Avatar")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("BillingAddressId")
+ .HasColumnType("bigint");
+
+ b.Property("EMail")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Phone")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("UserName")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("UserId");
+
+ b.ToTable("ClientProviderInfo");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Access.Ban", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("DateModified")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Reason")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("TargetId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("UserCreated")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("UserModified")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("TargetId");
+
+ b.ToTable("Ban");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("OwnerId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("UserId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("OwnerId");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("BlackListed");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Access.CircleAuthorizationToBlogPost", b =>
+ {
+ b.Property("CircleId")
+ .HasColumnType("bigint");
+
+ b.Property("BlogPostId")
+ .HasColumnType("bigint");
+
+ b.HasKey("CircleId", "BlogPostId");
+
+ b.HasIndex("BlogPostId");
+
+ b.ToTable("CircleAuthorizationToBlogPost");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("text");
+
+ b.Property("ContactCredits")
+ .HasColumnType("bigint");
+
+ b.Property("Credits")
+ .HasColumnType("numeric");
+
+ b.HasKey("UserId");
+
+ b.ToTable("BankStatus");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text");
+
+ b.Property("AccessFailedCount")
+ .HasColumnType("integer");
+
+ b.Property("AllowMonthlyEmail")
+ .HasColumnType("boolean");
+
+ b.Property("Avatar")
+ .IsRequired()
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(512)
+ .HasColumnType("character varying(512)")
+ .HasDefaultValue("/images/Users/icon_user.png");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnType("text");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("DateModified")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("DedicatedGoogleCalendar")
+ .HasMaxLength(512)
+ .HasColumnType("character varying(512)");
+
+ b.Property("DiskQuota")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint")
+ .HasDefaultValue(524288000L);
+
+ b.Property("DiskUsage")
+ .HasColumnType("bigint");
+
+ b.Property("Email")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("EmailConfirmed")
+ .HasColumnType("boolean");
+
+ b.Property("FullName")
+ .IsRequired()
+ .HasMaxLength(512)
+ .HasColumnType("character varying(512)");
+
+ b.Property("LockoutEnabled")
+ .HasColumnType("boolean");
+
+ b.Property("LockoutEnd")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("MaxFileSize")
+ .HasColumnType("bigint");
+
+ b.Property("NormalizedEmail")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("NormalizedUserName")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("PasswordHash")
+ .HasColumnType("text");
+
+ b.Property("PhoneNumber")
+ .HasColumnType("text");
+
+ b.Property("PhoneNumberConfirmed")
+ .HasColumnType("boolean");
+
+ b.Property("PostalAddressId")
+ .HasColumnType("bigint");
+
+ b.Property("SecurityStamp")
+ .HasColumnType("text");
+
+ b.Property("TwoFactorEnabled")
+ .HasColumnType("boolean");
+
+ b.Property("UserCreated")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("UserModified")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("UserName")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.HasKey("Id");
+
+ b.HasAlternateKey("Email");
+
+ b.HasIndex("NormalizedEmail")
+ .HasDatabaseName("EmailIndex");
+
+ b.HasIndex("NormalizedUserName")
+ .IsUnique()
+ .HasDatabaseName("UserNameIndex");
+
+ b.HasIndex("PostalAddressId");
+
+ b.ToTable("AspNetUsers", (string)null);
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Auth.Client", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text");
+
+ b.Property("Active")
+ .HasColumnType("boolean");
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("LogoutRedirectUri")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("character varying(100)");
+
+ b.Property("RedirectUri")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("RefreshTokenLifeTime")
+ .HasColumnType("integer");
+
+ b.Property("Secret")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Type")
+ .HasColumnType("integer");
+
+ b.HasKey("Id");
+
+ b.ToTable("Applications");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Auth.OAuth2Tokens", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("text");
+
+ b.Property("AccessToken")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Expiration")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("ExpiresIn")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("RefreshToken")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("TokenType")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("UserId");
+
+ b.ToTable("OAuth2Tokens");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Auth.RefreshToken", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text");
+
+ b.Property("ClientId")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)");
+
+ b.Property("ExpiresUtc")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("IssuedUtc")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("ProtectedTicket")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Subject")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)");
+
+ b.HasKey("Id");
+
+ b.ToTable("RefreshTokens");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("BalanceId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("ExecDate")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Impact")
+ .HasColumnType("numeric");
+
+ b.Property("Reason")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("BalanceId");
+
+ b.ToTable("BankBook");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Bank.BankIdentity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("AccountNumber")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("BIC")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("BankCode")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("BankedKey")
+ .HasColumnType("integer");
+
+ b.Property("IBAN")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("UserId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("WicketCode")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("BankIdentity");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Count")
+ .HasColumnType("integer");
+
+ b.Property("Currency")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(512)
+ .HasColumnType("character varying(512)");
+
+ b.Property("EstimateId")
+ .HasColumnType("bigint");
+
+ b.Property("EstimateTemplateId")
+ .HasColumnType("bigint");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("UnitaryCost")
+ .HasColumnType("numeric");
+
+ b.HasKey("Id");
+
+ b.HasIndex("EstimateId");
+
+ b.HasIndex("EstimateTemplateId");
+
+ b.ToTable("CommandLine");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("AttachedFilesString")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("AttachedGraphicsString")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("ClientId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("ClientValidationDate")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("CommandId")
+ .HasColumnType("bigint");
+
+ b.Property("CommandType")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("OwnerId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("ProviderValidationDate")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ClientId");
+
+ b.HasIndex("CommandId");
+
+ b.HasIndex("OwnerId");
+
+ b.ToTable("Estimates");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Billing.EstimateTemplate", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("OwnerId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.ToTable("EstimateTemplates");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Billing.ExceptionSIREN", b =>
+ {
+ b.Property("SIREN")
+ .HasColumnType("text");
+
+ b.HasKey("SIREN");
+
+ b.ToTable("ExceptionsSIREN");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Blog.BlogPost", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("AuthorId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Content")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("DateModified")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Lang")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Photo")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Rate")
+ .HasColumnType("integer");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("UserCreated")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("UserModified")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Visible")
+ .HasColumnType("boolean");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AuthorId");
+
+ b.ToTable("Blogspot");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Blog.BlogTag", b =>
+ {
+ b.Property("PostId")
+ .HasColumnType("bigint");
+
+ b.Property("TagId")
+ .HasColumnType("bigint");
+
+ b.HasKey("PostId", "TagId");
+
+ b.HasIndex("TagId");
+
+ b.ToTable("BlogTag");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Blog.Comment", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("AuthorId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Content")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("DateModified")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("ParentId")
+ .HasColumnType("bigint");
+
+ b.Property("PostId")
+ .HasColumnType("bigint");
+
+ b.Property("UserCreated")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("UserModified")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Visible")
+ .HasColumnType("boolean");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AuthorId");
+
+ b.HasIndex("ParentId");
+
+ b.HasIndex("PostId");
+
+ b.ToTable("Comment");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Calendar.Schedule", b =>
+ {
+ b.Property("OwnerId")
+ .HasColumnType("text");
+
+ b.HasKey("OwnerId");
+
+ b.ToTable("Schedule");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Calendar.ScheduledEvent", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("PeriodEnd")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("PeriodStart")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Reccurence")
+ .HasColumnType("integer");
+
+ b.Property("ScheduleOwnerId")
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ScheduleOwnerId");
+
+ b.HasIndex("PeriodStart", "PeriodEnd");
+
+ b.ToTable("ScheduledEvent");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Chat.ChatConnection", b =>
+ {
+ b.Property("ConnectionId")
+ .HasColumnType("text");
+
+ b.Property("ApplicationUserId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Connected")
+ .HasColumnType("boolean");
+
+ b.Property("UserAgent")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("ConnectionId");
+
+ b.HasIndex("ApplicationUserId");
+
+ b.ToTable("ChatConnection");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Chat.ChatRoom", b =>
+ {
+ b.Property("Name")
+ .HasColumnType("text");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("DateModified")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("LatestJoinPart")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("OwnerId")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Topic")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("UserCreated")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("UserModified")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Name");
+
+ b.HasIndex("OwnerId");
+
+ b.ToTable("ChatRoom");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Chat.ChatRoomAccess", b =>
+ {
+ b.Property("ChannelName")
+ .HasColumnType("text");
+
+ b.Property("UserId")
+ .HasColumnType("text");
+
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Level")
+ .HasColumnType("integer");
+
+ b.HasKey("ChannelName", "UserId");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("ChatRoomAccess");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Cratie.Option", b =>
+ {
+ b.Property("Code")
+ .HasColumnType("text");
+
+ b.Property("CodeScrutin")
+ .HasColumnType("text");
+
+ b.Property("DateCreated")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("DateModified")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("UserCreated")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("UserModified")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Code", "CodeScrutin");
+
+ b.ToTable("Option");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Drawing.Color", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Blue")
+ .HasColumnType("smallint");
+
+ b.Property("Green")
+ .HasColumnType("smallint");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("Red")
+ .HasColumnType("smallint");
+
+ b.HasKey("Id");
+
+ b.ToTable("Color");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Forms.Form", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text");
+
+ b.Property("Summary")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.HasKey("Id");
+
+ b.ToTable("Form");
+ });
+
+ modelBuilder.Entity("Yavsc.Models.Haircut.BrusherProfile", b =>
+ {
+ b.Property("UserId")
+ .HasColumnType("text");
+
+ b.Property("ActionDistance")
+ .HasColumnType("integer");
+
+ b.Property("CarePrice")
+ .HasColumnType("numeric");
+
+ b.Property("FlatFeeDiscount")
+ .HasColumnType("numeric");
+
+ b.Property("HalfBalayagePrice")
+ .HasColumnType("numeric");
+
+ b.Property("HalfBrushingPrice")
+ .HasColumnType("numeric");
+
+ b.Property("HalfColorPrice")
+ .HasColumnType("numeric");
+
+ b.Property("HalfDefrisPrice")
+ .HasColumnType("numeric");
+
+ b.Property("HalfFoldingPrice")
+ .HasColumnType("numeric");
+
+ b.Property("HalfMechPrice")
+ .HasColumnType("numeric");
+
+ b.Property("HalfMultiColorPrice")
+ .HasColumnType("numeric");
+
+ b.Property("HalfPermanentPrice")
+ .HasColumnType("numeric");
+
+ b.Property