This commit is contained in:
2017-03-03 00:13:27 +01:00
123 changed files with 22644 additions and 313 deletions

View File

@ -34,7 +34,7 @@ namespace Yavsc.Controllers
/// <param name="maxId">returned Ids must be lower than this value</param>
/// <returns>book queries</returns>
[HttpGet]
public IEnumerable<BookQueryProviderInfo> GetCommands(long maxId=long.MaxValue)
public IEnumerable<RdvQueryProviderInfo> GetCommands(long maxId=long.MaxValue)
{
var uid = User.GetUserId();
var now = DateTime.Now;
@ -42,7 +42,7 @@ namespace Yavsc.Controllers
var result = _context.Commands.Include(c => c.Location).
Include(c => c.Client).Where(c => c.PerformerId == uid && c.Id < maxId && c.EventDate > now
&& c.ValidationDate == null).
Select(c => new BookQueryProviderInfo
Select(c => new RdvQueryProviderInfo
{
Client = new ClientProviderInfo {
UserName = c.Client.UserName,
@ -71,7 +71,7 @@ namespace Yavsc.Controllers
}
var uid = User.GetUserId();
BookQuery bookQuery = _context.Commands.Where(c => c.ClientId == uid || c.PerformerId == uid).Single(m => m.Id == id);
RdvQuery bookQuery = _context.Commands.Where(c => c.ClientId == uid || c.PerformerId == uid).Single(m => m.Id == id);
if (bookQuery == null)
{
@ -83,7 +83,7 @@ namespace Yavsc.Controllers
// PUT: api/BookQueryApi/5
[HttpPut("{id}")]
public IActionResult PutBookQuery(long id, [FromBody] BookQuery bookQuery)
public IActionResult PutBookQuery(long id, [FromBody] RdvQuery bookQuery)
{
if (!ModelState.IsValid)
{
@ -121,7 +121,7 @@ namespace Yavsc.Controllers
// POST: api/BookQueryApi
[HttpPost]
public IActionResult PostBookQuery([FromBody] BookQuery bookQuery)
public IActionResult PostBookQuery([FromBody] RdvQuery bookQuery)
{
if (!ModelState.IsValid)
{
@ -162,7 +162,7 @@ namespace Yavsc.Controllers
return HttpBadRequest(ModelState);
}
var uid = User.GetUserId();
BookQuery bookQuery = _context.Commands.Single(m => m.Id == id);
RdvQuery bookQuery = _context.Commands.Single(m => m.Id == id);
if (bookQuery == null)
{

View File

@ -126,7 +126,7 @@ namespace Yavsc.Controllers
}
}
if (estimate.CommandId!=null) {
var query = _context.BookQueries.FirstOrDefault(q => q.Id == estimate.CommandId);
var query = _context.RdvQueries.FirstOrDefault(q => q.Id == estimate.CommandId);
if (query == null || query.PerformerId!= uid)
throw new InvalidOperationException();
query.ValidationDate = DateTime.Now;

View File

@ -51,4 +51,4 @@ namespace Yavsc.Controllers
return new BadRequestObjectResult(ModelState);
}
}
}
}

View File

@ -3,6 +3,10 @@ using Microsoft.AspNet.Mvc;
namespace Yavsc.ApiControllers
{
using Models;
/// <summary>
/// Base class for managing performers profiles
/// </summary>
[Produces("application/json"),Route("api/profile")]
public abstract class ProfileApiController<T> : Controller
{

View File

@ -0,0 +1,121 @@
using System.Threading.Tasks;
using Microsoft.AspNet.Mvc;
using System.Security.Claims;
using Microsoft.Data.Entity;
using Yavsc.Models;
using Yavsc.Models.Haircut;
using Microsoft.AspNet.Authorization;
namespace Yavsc.Controllers
{
[Authorize(Roles="Performer")]
public class BrusherProfileController : Controller
{
private ApplicationDbContext _context;
public BrusherProfileController(ApplicationDbContext context)
{
_context = context;
}
// GET: BrusherProfile
public async Task<IActionResult> Index()
{
var existing = await _context.BrusherProfile.SingleOrDefaultAsync(p=>p.UserId == User.GetUserId());
return View(existing);
}
// GET: BrusherProfile/Details/5
public async Task<IActionResult> Details(string id)
{
if (id == null)
{
id = User.GetUserId();
}
BrusherProfile brusherProfile = await _context.BrusherProfile.SingleAsync(m => m.UserId == id);
if (brusherProfile == null)
{
return HttpNotFound();
}
return View(brusherProfile);
}
// GET: BrusherProfile/Create
public IActionResult Create()
{
return View();
}
// GET: BrusherProfile/Edit/5
public async Task<IActionResult> Edit(string id)
{
if (id == null)
{
id = User.GetUserId();
}
BrusherProfile brusherProfile = await _context.BrusherProfile.SingleOrDefaultAsync(m => m.UserId == id);
if (brusherProfile == null)
{
brusherProfile = new BrusherProfile { };
}
return View(brusherProfile);
}
// POST: BrusherProfile/Edit/5
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(BrusherProfile brusherProfile)
{
if (string.IsNullOrEmpty(brusherProfile.UserId))
{
// a creation
brusherProfile.UserId = User.GetUserId();
if (ModelState.IsValid)
{
_context.BrusherProfile.Add(brusherProfile);
await _context.SaveChangesAsync();
return RedirectToAction("Index");
}
}
else if (ModelState.IsValid)
{
_context.Update(brusherProfile);
await _context.SaveChangesAsync();
return RedirectToAction("Index");
}
return View(brusherProfile);
}
// GET: BrusherProfile/Delete/5
[ActionName("Delete")]
public async Task<IActionResult> Delete(string id)
{
if (id == null)
{
return HttpNotFound();
}
BrusherProfile brusherProfile = await _context.BrusherProfile.SingleAsync(m => m.UserId == id);
if (brusherProfile == null)
{
return HttpNotFound();
}
return View(brusherProfile);
}
// POST: BrusherProfile/Delete/5
[HttpPost, ActionName("Delete")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(string id)
{
BrusherProfile brusherProfile = await _context.BrusherProfile.SingleAsync(m => m.UserId == id);
_context.BrusherProfile.Remove(brusherProfile);
await _context.SaveChangesAsync();
return RedirectToAction("Index");
}
}
}

View File

@ -22,16 +22,16 @@ namespace Yavsc.Controllers
[ServiceFilter(typeof(LanguageActionFilter))]
public class CommandController : Controller
{
private UserManager<ApplicationUser> _userManager;
private ApplicationDbContext _context;
private GoogleAuthSettings _googleSettings;
private IGoogleCloudMessageSender _GCMSender;
private IEmailSender _emailSender;
private IStringLocalizer _localizer;
SiteSettings _siteSettings;
SmtpSettings _smtpSettings;
protected UserManager<ApplicationUser> _userManager;
protected ApplicationDbContext _context;
protected GoogleAuthSettings _googleSettings;
protected IGoogleCloudMessageSender _GCMSender;
protected IEmailSender _emailSender;
protected IStringLocalizer _localizer;
protected SiteSettings _siteSettings;
protected SmtpSettings _smtpSettings;
private readonly ILogger _logger;
protected readonly ILogger _logger;
public CommandController(ApplicationDbContext context, IOptions<GoogleAuthSettings> googleSettings,
IGoogleCloudMessageSender GCMSender,
UserManager<ApplicationUser> userManager,
@ -57,7 +57,7 @@ namespace Yavsc.Controllers
public IActionResult Index()
{
var uid = User.GetUserId();
return View(_context.BookQueries
return View(_context.RdvQueries
.Include(x => x.Client)
.Include(x => x.PerformerProfile)
.Include(x => x.PerformerProfile.Performer)
@ -74,7 +74,7 @@ namespace Yavsc.Controllers
return HttpNotFound();
}
BookQuery command = _context.BookQueries
RdvQuery command = _context.RdvQueries
.Include(x => x.Location)
.Include(x => x.PerformerProfile)
.Single(m => m.Id == id);
@ -113,7 +113,7 @@ namespace Yavsc.Controllers
ViewBag.GoogleSettings = _googleSettings;
var userid = User.GetUserId();
var user = _userManager.FindByIdAsync(userid).Result;
return View(new BookQuery(activityCode,new Location(),DateTime.Now.AddHours(4))
return View(new RdvQuery(activityCode,new Location(),DateTime.Now.AddHours(4))
{
PerformerProfile = pro,
PerformerId = pro.PerformerId,
@ -126,7 +126,7 @@ namespace Yavsc.Controllers
// POST: Command/Create
[HttpPost, Authorize]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create(BookQuery command)
public async Task<IActionResult> Create(RdvQuery command)
{
var uid = User.GetUserId();
@ -161,7 +161,7 @@ namespace Yavsc.Controllers
command.Location=existingLocation;
}
else _context.Attach<Location>(command.Location);
_context.BookQueries.Add(command, GraphBehavior.IncludeDependents);
_context.RdvQueries.Add(command, GraphBehavior.IncludeDependents);
_context.SaveChanges(User.GetUserId());
var yaev = command.CreateEvent(_localizer);
@ -206,7 +206,7 @@ namespace Yavsc.Controllers
return HttpNotFound();
}
BookQuery command = _context.BookQueries.Single(m => m.Id == id);
RdvQuery command = _context.RdvQueries.Single(m => m.Id == id);
if (command == null)
{
return HttpNotFound();
@ -217,7 +217,7 @@ namespace Yavsc.Controllers
// POST: Command/Edit/5
[HttpPost]
[ValidateAntiForgeryToken]
public IActionResult Edit(BookQuery command)
public IActionResult Edit(RdvQuery command)
{
if (ModelState.IsValid)
{
@ -237,7 +237,7 @@ namespace Yavsc.Controllers
return HttpNotFound();
}
BookQuery command = _context.BookQueries.Single(m => m.Id == id);
RdvQuery command = _context.RdvQueries.Single(m => m.Id == id);
if (command == null)
{
return HttpNotFound();
@ -251,8 +251,8 @@ namespace Yavsc.Controllers
[ValidateAntiForgeryToken]
public IActionResult DeleteConfirmed(long id)
{
BookQuery command = _context.BookQueries.Single(m => m.Id == id);
_context.BookQueries.Remove(command);
RdvQuery command = _context.RdvQueries.Single(m => m.Id == id);
_context.RdvQueries.Remove(command);
_context.SaveChanges(User.GetUserId());
return RedirectToAction("Index");
}

View File

@ -50,7 +50,7 @@ namespace Yavsc.Controllers
}
private void SetViewBag(CommandForm commandForm=null) {
ViewBag.ActivityCode = new SelectList(_context.Activities, "Code", "Name", commandForm?.ActivityCode);
ViewBag.Action = Startup.Forms.Select( c => new SelectListItem { Text = c, Selected = commandForm?.Action == c } );
ViewBag.ActionName = Startup.Forms.Select( c => new SelectListItem { Value = c, Text = c, Selected = (commandForm?.ActionName == c) } );
}
// POST: CommandForms/Create
[HttpPost]

View File

@ -48,7 +48,7 @@ namespace Yavsc.Controllers
}
ViewBag.HasConfigurableSettings = (userActivity.Does.SettingsClassName != null);
if (ViewBag.HasConfigurableSettings)
ViewBag.SettingsClassControllerName = Startup.ProfileTypes[userActivity.Does.SettingsClassName].Name;
ViewBag.SettingsControllerName = Startup.ProfileTypes[userActivity.Does.SettingsClassName].Name;
return View(userActivity);
}

View File

@ -81,7 +81,7 @@ namespace Yavsc.Controllers
public IActionResult Create()
{
var uid = User.GetUserId();
IQueryable<BookQuery> queries = _context.BookQueries.Include(q=>q.Location).Where(bq=>bq.PerformerId == uid);
IQueryable<RdvQuery> queries = _context.RdvQueries.Include(q=>q.Location).Where(bq=>bq.PerformerId == uid);
//.Select(bq=>new SelectListItem{ Text = bq.Client.UserName, Value = bq.Client.Id });
ViewBag.Clients = queries.Select(q=>q.Client).Distinct();
ViewBag.Queries = queries;
@ -103,7 +103,7 @@ namespace Yavsc.Controllers
_context.Estimates
.Add(estimate);
_context.SaveChanges(User.GetUserId());
var query = _context.BookQueries.FirstOrDefault(
var query = _context.RdvQueries.FirstOrDefault(
q=>q.Id == estimate.CommandId
);
var perfomerProfile = _context.Performers
@ -111,7 +111,7 @@ namespace Yavsc.Controllers
perpr => perpr.Performer).FirstOrDefault(
x=>x.PerformerId == query.PerformerId
);
var command = _context.BookQueries.FirstOrDefault(
var command = _context.RdvQueries.FirstOrDefault(
cmd => cmd.Id == estimate.CommandId
);

View File

@ -10,22 +10,27 @@ using System.Security.Claims;
namespace Yavsc.Controllers
{
using Helpers;
using Microsoft.Extensions.Localization;
using Models;
using Models.Workflow;
using ViewModels.FrontOffice;
public class FrontOfficeController : Controller
{
ApplicationDbContext _context;
UserManager<ApplicationUser> _userManager;
ILogger _logger;
IStringLocalizer _SR;
public FrontOfficeController(ApplicationDbContext context,
UserManager<ApplicationUser> userManager,
ILoggerFactory loggerFactory)
ILoggerFactory loggerFactory,
IStringLocalizer<Yavsc.Resources.YavscLocalisation> SR)
{
_context = context;
_userManager = userManager;
_logger = loggerFactory.CreateLogger<FrontOfficeController>();
_SR = SR;
}
public ActionResult Index()
{
@ -46,7 +51,7 @@ namespace Yavsc.Controllers
return View(model);
}
[Route("Profiles/{id?}"), HttpGet, AllowAnonymous]
[AllowAnonymous]
public ActionResult Profiles(string id)
{
if (id == null)
@ -57,39 +62,19 @@ namespace Yavsc.Controllers
var result = _context.ListPerformers(id);
return View(result);
}
[Route("Profiles/{id}"), HttpPost, AllowAnonymous]
public ActionResult Profiles(BookQuery bookQuery)
[AllowAnonymous]
public ActionResult HairCut(string id)
{
if (ModelState.IsValid)
if (id == null)
{
var pro = _context.Performers.Include(
pr => pr.Performer
).FirstOrDefault(
x => x.PerformerId == bookQuery.PerformerId
);
if (pro == null)
return HttpNotFound();
// Let's create a command
if (bookQuery.Id == 0)
{
_context.BookQueries.Add(bookQuery);
}
else
{
_context.BookQueries.Update(bookQuery);
}
_context.SaveChanges(User.GetUserId());
// TODO Send sys notifications &
// notify the user (make him a basket badge)
return View("Index");
throw new NotImplementedException("No Activity code");
}
ViewBag.Activities = _context.ActivityItems(null);
return View("Profiles", _context.Performers.Include(p => p.Performer).Where
(p => p.Active).OrderBy(
x => x.MinDailyCost
));
ViewBag.Activity = _context.Activities.FirstOrDefault(a => a.Code == id);
var result = _context.ListPerformers(id);
return View(result);
}
[Produces("text/x-tex"), Authorize, Route("estimate-{id}.tex")]
public ViewResult EstimateTex(long id)

View File

@ -0,0 +1,225 @@
using System;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNet.Authorization;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Mvc;
using Microsoft.Data.Entity;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.OptionsModel;
namespace Yavsc.Controllers
{
using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Google.Messaging;
using Yavsc.Models.Relationship;
using Yavsc.Services;
using Newtonsoft.Json;
using Microsoft.AspNet.Http;
using Yavsc.Extensions;
using Yavsc.Models.Haircut;
public class HairCutCommandController : CommandController
{
public HairCutCommandController(ApplicationDbContext context,
IOptions<GoogleAuthSettings> googleSettings,
IGoogleCloudMessageSender GCMSender,
UserManager<ApplicationUser> userManager,
IStringLocalizer<Yavsc.Resources.YavscLocalisation> localizer,
IEmailSender emailSender,
IOptions<SmtpSettings> smtpSettings,
IOptions<SiteSettings> siteSettings,
ILoggerFactory loggerFactory) : base(context,googleSettings,GCMSender,userManager,
localizer,emailSender,smtpSettings,siteSettings,loggerFactory)
{
}
[HttpPost, Authorize]
[ValidateAntiForgeryToken]
public async Task<IActionResult> CreateHairCutQuery(HairCutQuery command)
{
var uid = User.GetUserId();
var prid = command.PerformerId;
if (string.IsNullOrWhiteSpace(uid)
|| string.IsNullOrWhiteSpace(prid))
throw new InvalidOperationException(
"This method needs a PerformerId"
);
var pro = _context.Performers.Include(
u => u.Performer
).Include(u => u.Performer.Devices)
.FirstOrDefault(
x => x.PerformerId == command.PerformerId
);
var user = await _userManager.FindByIdAsync(uid);
command.Client = user;
command.ClientId = uid;
command.PerformerProfile = pro;
// FIXME Why!!
// ModelState.ClearValidationState("PerformerProfile.Avatar");
// ModelState.ClearValidationState("Client.Avatar");
// ModelState.ClearValidationState("ClientId");
ModelState.MarkFieldSkipped("ClientId");
if (ModelState.IsValid)
{
var existingLocation = _context.Locations.FirstOrDefault( x=>x.Address == command.Location.Address
&& x.Longitude == command.Location.Longitude && x.Latitude == command.Location.Latitude );
if (existingLocation!=null) {
command.Location=existingLocation;
}
else _context.Attach<Location>(command.Location);
_context.HairCutQueries.Add(command, GraphBehavior.IncludeDependents);
_context.SaveChanges(User.GetUserId());
var yaev = command.CreateEvent(_localizer);
MessageWithPayloadResponse grep = null;
if (pro.AcceptNotifications
&& pro.AcceptPublicContact)
{
if (pro.Performer.Devices.Count > 0) {
var regids = command.PerformerProfile.Performer
.Devices.Select(d => d.GCMRegistrationId);
grep = await _GCMSender.NotifyHairCutQueryAsync(_googleSettings,regids,yaev);
}
// TODO setup a profile choice to allow notifications
// both on mailbox and mobile
// if (grep==null || grep.success<=0 || grep.failure>0)
ViewBag.GooglePayload=grep;
if (grep!=null)
_logger.LogWarning($"Performer: {command.PerformerProfile.Performer.UserName} success: {grep.success} failure: {grep.failure}");
await _emailSender.SendEmailAsync(
_siteSettings, _smtpSettings,
command.PerformerProfile.Performer.Email,
yaev.Topic+" "+yaev.Sender,
$"{yaev.Message}\r\n-- \r\n{yaev.Previsional}\r\n{yaev.EventDate}\r\n"
);
}
ViewBag.Activity = _context.Activities.FirstOrDefault(a=>a.Code == command.ActivityCode);
ViewBag.GoogleSettings = _googleSettings;
return View("CommandConfirmation",command);
}
ViewBag.Activity = _context.Activities.FirstOrDefault(a=>a.Code == command.ActivityCode);
ViewBag.GoogleSettings = _googleSettings;
return View(command);
}
[ValidateAntiForgeryToken]
public ActionResult HairCut(string performerId, string activityCode)
{
HairPrestation pPrestation=null;
var prestaJson = HttpContext.Session.GetString("HairCutPresta") ;
if (prestaJson!=null) {
pPrestation = JsonConvert.DeserializeObject<HairPrestation>(prestaJson);
}
else pPrestation = new HairPrestation {};
ViewBag.HairTaints = _context.HairTaint.Include(t=>t.Color);
ViewBag.HairTechnos = EnumExtensions.GetSelectList(typeof(HairTechnos),_localizer);
ViewBag.HairLength = EnumExtensions.GetSelectList(typeof(HairLength),_localizer);
ViewBag.Activity = _context.Activities.First(a => a.Code == activityCode);
ViewBag.Gender = EnumExtensions.GetSelectList(typeof(HairCutGenders),_localizer);
ViewBag.HairDressings = EnumExtensions.GetSelectList(typeof(HairDressings),_localizer);
ViewBag.ColorsClass = ( pPrestation.Tech == HairTechnos.Color
|| pPrestation.Tech == HairTechnos.Mech ) ? "":"hidden";
ViewBag.TechClass = ( pPrestation.Gender == HairCutGenders.Women ) ? "":"hidden";
ViewData["PerfPrefs"] = _context.BrusherProfile.Single(p=>p.UserId == performerId);
var perfer = _context.Performers.Include(
p=>p.Performer
).Single(p=>p.PerformerId == performerId);
var result = new HairCutQuery {
PerformerProfile = perfer,
PerformerId = perfer.PerformerId,
ClientId = User.GetUserId(),
Prestation = pPrestation
};
return View(result);
}
[HttpPost, Authorize]
[ValidateAntiForgeryToken]
public async Task<IActionResult> CreateHairMultiCutQuery(HairMultiCutQuery command)
{
var uid = User.GetUserId();
var prid = command.PerformerId;
if (string.IsNullOrWhiteSpace(uid)
|| string.IsNullOrWhiteSpace(prid))
throw new InvalidOperationException(
"This method needs a PerformerId"
);
var pro = _context.Performers.Include(
u => u.Performer
).Include(u => u.Performer.Devices)
.FirstOrDefault(
x => x.PerformerId == command.PerformerId
);
var user = await _userManager.FindByIdAsync(uid);
command.Client = user;
command.ClientId = uid;
command.PerformerProfile = pro;
// FIXME Why!!
// ModelState.ClearValidationState("PerformerProfile.Avatar");
// ModelState.ClearValidationState("Client.Avatar");
// ModelState.ClearValidationState("ClientId");
ModelState.MarkFieldSkipped("ClientId");
if (ModelState.IsValid)
{
var existingLocation = _context.Locations.FirstOrDefault( x=>x.Address == command.Location.Address
&& x.Longitude == command.Location.Longitude && x.Latitude == command.Location.Latitude );
if (existingLocation!=null) {
command.Location=existingLocation;
}
else _context.Attach<Location>(command.Location);
_context.HairMultiCutQueries.Add(command, GraphBehavior.IncludeDependents);
_context.SaveChanges(User.GetUserId());
var yaev = command.CreateEvent(_localizer);
MessageWithPayloadResponse grep = null;
if (pro.AcceptNotifications
&& pro.AcceptPublicContact)
{
if (pro.Performer.Devices.Count > 0) {
var regids = command.PerformerProfile.Performer
.Devices.Select(d => d.GCMRegistrationId);
grep = await _GCMSender.NotifyHairCutQueryAsync(_googleSettings,regids,yaev);
}
// TODO setup a profile choice to allow notifications
// both on mailbox and mobile
// if (grep==null || grep.success<=0 || grep.failure>0)
ViewBag.GooglePayload=grep;
if (grep!=null)
_logger.LogWarning($"Performer: {command.PerformerProfile.Performer.UserName} success: {grep.success} failure: {grep.failure}");
await _emailSender.SendEmailAsync(
_siteSettings, _smtpSettings,
command.PerformerProfile.Performer.Email,
yaev.Topic+" "+yaev.Sender,
$"{yaev.Message}\r\n-- \r\n{yaev.Previsional}\r\n{yaev.EventDate}\r\n"
);
}
ViewBag.Activity = _context.Activities.FirstOrDefault(a=>a.Code == command.ActivityCode);
ViewBag.GoogleSettings = _googleSettings;
return View("CommandConfirmation",command);
}
ViewBag.Activity = _context.Activities.FirstOrDefault(a=>a.Code == command.ActivityCode);
ViewBag.GoogleSettings = _googleSettings;
return View(command);
}
}
}

View File

@ -0,0 +1,120 @@
using System.Threading.Tasks;
using Microsoft.AspNet.Mvc;
using Microsoft.Data.Entity;
using Yavsc.Models;
using Yavsc.Models.Haircut;
namespace Yavsc.Controllers
{
public class HairPrestationsController : Controller
{
private ApplicationDbContext _context;
public HairPrestationsController(ApplicationDbContext context)
{
_context = context;
}
// GET: HairPrestations
public async Task<IActionResult> Index()
{
return View(await _context.HairPrestation.ToListAsync());
}
// GET: HairPrestations/Details/5
public async Task<IActionResult> Details(long? id)
{
if (id == null)
{
return HttpNotFound();
}
HairPrestation hairPrestation = await _context.HairPrestation.SingleAsync(m => m.Id == id);
if (hairPrestation == null)
{
return HttpNotFound();
}
return View(hairPrestation);
}
// GET: HairPrestations/Create
public IActionResult Create()
{
return View();
}
// POST: HairPrestations/Create
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create(HairPrestation hairPrestation)
{
if (ModelState.IsValid)
{
_context.HairPrestation.Add(hairPrestation);
await _context.SaveChangesAsync();
return RedirectToAction("Index");
}
return View(hairPrestation);
}
// GET: HairPrestations/Edit/5
public async Task<IActionResult> Edit(long? id)
{
if (id == null)
{
return HttpNotFound();
}
HairPrestation hairPrestation = await _context.HairPrestation.SingleAsync(m => m.Id == id);
if (hairPrestation == null)
{
return HttpNotFound();
}
return View(hairPrestation);
}
// POST: HairPrestations/Edit/5
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(HairPrestation hairPrestation)
{
if (ModelState.IsValid)
{
_context.Update(hairPrestation);
await _context.SaveChangesAsync();
return RedirectToAction("Index");
}
return View(hairPrestation);
}
// GET: HairPrestations/Delete/5
[ActionName("Delete")]
public async Task<IActionResult> Delete(long? id)
{
if (id == null)
{
return HttpNotFound();
}
HairPrestation hairPrestation = await _context.HairPrestation.SingleAsync(m => m.Id == id);
if (hairPrestation == null)
{
return HttpNotFound();
}
return View(hairPrestation);
}
// POST: HairPrestations/Delete/5
[HttpPost, ActionName("Delete")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(long id)
{
HairPrestation hairPrestation = await _context.HairPrestation.SingleAsync(m => m.Id == id);
_context.HairPrestation.Remove(hairPrestation);
await _context.SaveChangesAsync();
return RedirectToAction("Index");
}
}
}

View File

@ -103,7 +103,7 @@ namespace Yavsc.Controllers
UserName = user.UserName,
PostsCounter = pc,
Balance = user.AccountBalance,
ActiveCommandCount = _dbContext.BookQueries.Count(x => (x.ClientId == user.Id) && (x.EventDate > DateTime.Now)),
ActiveCommandCount = _dbContext.RdvQueries.Count(x => (x.ClientId == user.Id) && (x.EventDate > DateTime.Now)),
HasDedicatedCalendar = !string.IsNullOrEmpty(user.DedicatedGoogleCalendar),
Roles = await _userManager.GetRolesAsync(user),
PostalAddress = user.PostalAddress?.Address,
@ -580,8 +580,9 @@ namespace Yavsc.Controllers
}
else ModelState.AddModelError(string.Empty, $"Access denied ({uid} vs {model.PerformerId})");
}
ViewBag.Activities = _dbContext.ActivityItems(new List<UserActivity>());
ViewBag.GoogleSettings = _googleSettings;
model.Performer = _dbContext.Users.Single(u=>u.Id == model.PerformerId);
return View(model);
}

View File

@ -0,0 +1,78 @@

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Reflection;
using Microsoft.AspNet.Mvc.Rendering;
using Microsoft.Extensions.Localization;
namespace Yavsc.Extensions
{
public static class EnumExtensions
{
public static List<SelectListItem> GetSelectList (Type type, IStringLocalizer SR, Enum valueSelected)
{
var typeInfo = type.GetTypeInfo();
var values = Enum.GetValues(type).Cast<Enum>();
var items = new List<SelectListItem>();
foreach (var value in values)
{
items.Add(new SelectListItem {
Text = SR[GetDescription(value, typeInfo)],
Value = value.ToString(),
Selected = value == valueSelected
});
}
return items;
}
public static List<SelectListItem> GetSelectList (Type type, IStringLocalizer SR)
{
var typeInfo = type.GetTypeInfo();
var values = Enum.GetValues(type).Cast<Enum>();
var items = new List<SelectListItem>();
foreach (var value in values)
{
items.Add(new SelectListItem {
Text = SR[GetDescription(value, typeInfo)],
Value = value.ToString()
});
}
return items;
}
public static string GetDescription(this Enum value, TypeInfo typeInfo )
{
var declaredMember = typeInfo.DeclaredMembers.FirstOrDefault(i => i.Name == value.ToString());
var attribute = declaredMember?.GetCustomAttribute<DisplayAttribute>();
return attribute == null ? value.ToString() : attribute.Description ?? attribute.Name;
}
public static string GetDescription(this Enum value)
{
var type = value.GetType();
var typeInfo = type.GetTypeInfo();
return GetDescription(value, typeInfo);
}
public static IEnumerable<string> GetDescriptions(Type type)
{
var values = Enum.GetValues(type).Cast<Enum>();
var descriptions = new List<string>();
foreach (var value in values)
{
descriptions.Add(value.GetDescription());
}
return descriptions;
}
public static Enum GetEnumFromDescription(string description, Type enumType)
{
var enumValues = Enum.GetValues(enumType).Cast<Enum>();
var descriptionToEnum = enumValues.ToDictionary(k => k.GetDescription(), v => v);
return descriptionToEnum[description];
}
}
}

View File

@ -4,13 +4,22 @@ namespace Yavsc.Helpers
{
using Models.Workflow;
using Models.Messaging;
using Yavsc.Models.Haircut;
public static class EventHelpers
{
public static BookQueryEvent CreateEvent(this BookQuery query,
public static RdvQueryEvent CreateEvent(this RdvQuery query,
IStringLocalizer SR)
{
var yaev = new BookQueryEvent
{
var yaev = new RdvQueryEvent
{
Sender = query.ClientId,
Message = string.Format(SR["RdvToPerf"],
query.Client.UserName,
query.EventDate.ToString("dddd dd/MM/yyyy à HH:mm"),
query.Location.Address,
query.ActivityCode)+
"\n"+query.Reason,
Client = new ClientProviderInfo { 
UserName = query.Client.UserName ,
UserId = query.ClientId,
@ -24,6 +33,54 @@ namespace Yavsc.Helpers
};
return yaev;
}
public static HairCutQueryEvent CreateEvent(this HairCutQuery query,
IStringLocalizer SR)
{
var yaev = new HairCutQueryEvent
{
Sender = query.ClientId,
Message = string.Format(SR["RdvToPerf"],
query.Client.UserName,
query.EventDate.ToString("dddd dd/MM/yyyy à HH:mm"),
query.Location.Address,
query.ActivityCode),
Client = new ClientProviderInfo { 
UserName = query.Client.UserName ,
UserId = query.ClientId,
Avatar = query.Client.Avatar } ,
Previsional = query.Previsional,
EventDate = query.EventDate,
Location = query.Location,
Id = query.Id,
Reason = "Coupe particulier",
ActivityCode = query.ActivityCode
};
return yaev;
}
public static HairCutQueryEvent CreateEvent(this HairMultiCutQuery query,
IStringLocalizer SR)
{
var yaev = new HairCutQueryEvent
{
Sender = query.ClientId,
Message = string.Format(SR["RdvToPerf"],
query.Client.UserName,
query.EventDate.ToString("dddd dd/MM/yyyy à HH:mm"),
query.Location.Address,
query.ActivityCode),
Client = new ClientProviderInfo { 
UserName = query.Client.UserName ,
UserId = query.ClientId,
Avatar = query.Client.Avatar } ,
Previsional = query.Previsional,
EventDate = query.EventDate,
Location = query.Location,
Id = query.Id,
Reason = "Commande groupée!",
ActivityCode = query.ActivityCode
};
return yaev;
}
}
}

View File

@ -38,6 +38,7 @@ namespace Yavsc
if (Context.User != null)
{
isAuth = Context.User.Identity.IsAuthenticated;
userName = Context.User.Identity.Name;
var group = isAuth ?
"authenticated" : "anonymous";
// Log ("Cx: " + group);
@ -54,8 +55,9 @@ namespace Yavsc
UserAgent = Context.Request.Headers["User-Agent"],
Connected = true
});
db.SaveChanges(user.Id);
db.SaveChanges();
}
}
}
else Groups.Add(Context.ConnectionId, "anonymous");
@ -76,16 +78,16 @@ namespace Yavsc
var cx = db.Connections.SingleOrDefault(c => c.ConnectionId == Context.ConnectionId);
if (cx != null)
{
var user = db.Users.Single(u => u.UserName == userName);
if (stopCalled)
{
var user = db.Users.Single(u => u.UserName == userName);
user.Connections.Remove(cx);
}
else
{
cx.Connected = false;
}
db.SaveChanges(user.Id);
db.SaveChanges();
}
}
}
@ -108,7 +110,7 @@ namespace Yavsc
if (cx != null)
{
cx.Connected = true;
db.SaveChanges(user.Id);
db.SaveChanges();
}
else cx = new Connection { ConnectionId = Context.ConnectionId,
UserAgent = Context.Request.Headers["User-Agent"],
@ -145,9 +147,10 @@ namespace Yavsc
var cx = db.Connections.SingleOrDefault(c=>c.ConnectionId == Context.ConnectionId);
if (cx!=null) {
db.Connections.Remove(cx);
db.SaveChanges(cx.ApplicationUserId);
db.SaveChanges();
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,744 @@
using System;
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations
{
public partial class hairPrestations : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_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_BaseProduct_ArticleId", table: "CommandLine");
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
migrationBuilder.DropForeignKey(name: "FK_Estimate_ApplicationUser_ClientId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_Estimate_BookQuery_CommandId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_Estimate_PerformerProfile_OwnerId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_HairTaint_Color_ColorId", table: "HairTaint");
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_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
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_UserActivity_Activity_DoesCode", table: "UserActivity");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
migrationBuilder.DropColumn(name: "ArticleId", table: "CommandLine");
migrationBuilder.DropTable("BaseProduct");
migrationBuilder.DropTable("BookQuery");
// les id de requete existant venaient d'une table nomée "BookQuery"
// qui n'existe plus.
migrationBuilder.Sql("DELETE FROM \"Estimate\"");
migrationBuilder.Sql("DELETE FROM \"CommandLine\"");
migrationBuilder.CreateTable(
name: "HairMultiCutQuery",
columns: table => new
{
Id = table.Column<long>(nullable: false)
.Annotation("Npgsql:Serial", true),
ActivityCode = table.Column<string>(nullable: false),
ClientId = table.Column<string>(nullable: false),
DateCreated = table.Column<DateTime>(nullable: false),
DateModified = table.Column<DateTime>(nullable: false),
EventDate = table.Column<DateTime>(nullable: false),
LocationId = table.Column<long>(nullable: true),
PerformerId = table.Column<string>(nullable: false),
Previsional = table.Column<decimal>(nullable: true),
Status = table.Column<int>(nullable: false),
UserCreated = table.Column<string>(nullable: true),
UserModified = table.Column<string>(nullable: true),
ValidationDate = table.Column<DateTime>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_HairMultiCutQuery", x => x.Id);
table.ForeignKey(
name: "FK_HairMultiCutQuery_Activity_ActivityCode",
column: x => x.ActivityCode,
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_HairMultiCutQuery_ApplicationUser_ClientId",
column: x => x.ClientId,
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_HairMultiCutQuery_Location_LocationId",
column: x => x.LocationId,
principalTable: "Location",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId",
column: x => x.PerformerId,
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Product",
columns: table => new
{
Id = table.Column<long>(nullable: false)
.Annotation("Npgsql:Serial", true),
Depth = table.Column<decimal>(nullable: false),
Description = table.Column<string>(nullable: true),
Height = table.Column<decimal>(nullable: false),
Name = table.Column<string>(nullable: true),
Price = table.Column<decimal>(nullable: true),
Public = table.Column<bool>(nullable: false),
Weight = table.Column<decimal>(nullable: false),
Width = table.Column<decimal>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Product", x => x.Id);
});
migrationBuilder.CreateTable(
name: "RdvQuery",
columns: table => new
{
Id = table.Column<long>(nullable: false)
.Annotation("Npgsql:Serial", true),
ActivityCode = table.Column<string>(nullable: false),
ClientId = table.Column<string>(nullable: false),
DateCreated = table.Column<DateTime>(nullable: false),
DateModified = table.Column<DateTime>(nullable: false),
EventDate = table.Column<DateTime>(nullable: false),
LocationId = table.Column<long>(nullable: true),
LocationTypeId = table.Column<long>(nullable: true),
PerformerId = table.Column<string>(nullable: false),
Previsional = table.Column<decimal>(nullable: true),
Reason = table.Column<string>(nullable: true),
Status = table.Column<int>(nullable: false),
UserCreated = table.Column<string>(nullable: true),
UserModified = table.Column<string>(nullable: true),
ValidationDate = table.Column<DateTime>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_RdvQuery", x => x.Id);
table.ForeignKey(
name: "FK_RdvQuery_Activity_ActivityCode",
column: x => x.ActivityCode,
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_RdvQuery_ApplicationUser_ClientId",
column: x => x.ClientId,
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_RdvQuery_Location_LocationId",
column: x => x.LocationId,
principalTable: "Location",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_RdvQuery_LocationType_LocationTypeId",
column: x => x.LocationTypeId,
principalTable: "LocationType",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_RdvQuery_PerformerProfile_PerformerId",
column: x => x.PerformerId,
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "HairPrestation",
columns: table => new
{
Id = table.Column<long>(nullable: false)
.Annotation("Npgsql:Serial", true),
Cares = table.Column<bool>(nullable: false),
Cut = table.Column<bool>(nullable: false),
Dressing = table.Column<int>(nullable: false),
Gender = table.Column<int>(nullable: false),
HairMultiCutQueryId = table.Column<long>(nullable: true),
Length = table.Column<int>(nullable: false),
Shampoo = table.Column<bool>(nullable: false),
Tech = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_HairPrestation", x => x.Id);
table.ForeignKey(
name: "FK_HairPrestation_HairMultiCutQuery_HairMultiCutQueryId",
column: x => x.HairMultiCutQueryId,
principalTable: "HairMultiCutQuery",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "HairCutQuery",
columns: table => new
{
Id = table.Column<long>(nullable: false)
.Annotation("Npgsql:Serial", true),
ActivityCode = table.Column<string>(nullable: false),
ClientId = table.Column<string>(nullable: false),
DateCreated = table.Column<DateTime>(nullable: false),
DateModified = table.Column<DateTime>(nullable: false),
EventDate = table.Column<DateTime>(nullable: false),
LocationId = table.Column<long>(nullable: true),
PerformerId = table.Column<string>(nullable: false),
PrestationId = table.Column<long>(nullable: true),
Previsional = table.Column<decimal>(nullable: true),
Status = table.Column<int>(nullable: false),
UserCreated = table.Column<string>(nullable: true),
UserModified = table.Column<string>(nullable: true),
ValidationDate = table.Column<DateTime>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_HairCutQuery", x => x.Id);
table.ForeignKey(
name: "FK_HairCutQuery_Activity_ActivityCode",
column: x => x.ActivityCode,
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_HairCutQuery_ApplicationUser_ClientId",
column: x => x.ClientId,
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_HairCutQuery_Location_LocationId",
column: x => x.LocationId,
principalTable: "Location",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_HairCutQuery_PerformerProfile_PerformerId",
column: x => x.PerformerId,
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_HairCutQuery_HairPrestation_PrestationId",
column: x => x.PrestationId,
principalTable: "HairPrestation",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.AddColumn<long>(
name: "HairPrestationId",
table: "HairTaint",
nullable: true);
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_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_Blog_BlogPostId",
table: "CircleAuthorizationToBlogPost",
column: "BlogPostId",
principalTable: "Blog",
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_Estimate_RdvQuery_CommandId",
table: "Estimate",
column: "CommandId",
principalTable: "RdvQuery",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Estimate_PerformerProfile_OwnerId",
table: "Estimate",
column: "OwnerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
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_HairTaint_HairPrestation_HairPrestationId",
table: "HairTaint",
column: "HairPrestationId",
principalTable: "HairPrestation",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
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_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_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
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_UserActivity_Activity_DoesCode",
table: "UserActivity",
column: "DoesCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_PerformerProfile_UserId",
table: "UserActivity",
column: "UserId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_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_Estimate_RdvQuery_CommandId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_Estimate_PerformerProfile_OwnerId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_HairTaint_Color_ColorId", table: "HairTaint");
migrationBuilder.DropForeignKey(name: "FK_HairTaint_HairPrestation_HairPrestationId", table: "HairTaint");
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_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
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_UserActivity_Activity_DoesCode", table: "UserActivity");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
migrationBuilder.DropColumn(name: "HairPrestationId", table: "HairTaint");
migrationBuilder.DropTable("HairCutQuery");
migrationBuilder.DropTable("Product");
migrationBuilder.DropTable("RdvQuery");
migrationBuilder.DropTable("HairPrestation");
migrationBuilder.DropTable("HairMultiCutQuery");
migrationBuilder.CreateTable(
name: "BaseProduct",
columns: table => new
{
Id = table.Column<long>(nullable: false)
.Annotation("Npgsql:Serial", true),
Description = table.Column<string>(nullable: true),
Discriminator = table.Column<string>(nullable: false),
Name = table.Column<string>(nullable: true),
Public = table.Column<bool>(nullable: false),
Depth = table.Column<decimal>(nullable: true),
Height = table.Column<decimal>(nullable: true),
Price = table.Column<decimal>(nullable: true),
Weight = table.Column<decimal>(nullable: true),
Width = table.Column<decimal>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_BaseProduct", x => x.Id);
});
migrationBuilder.CreateTable(
name: "BookQuery",
columns: table => new
{
Id = table.Column<long>(nullable: false)
.Annotation("Npgsql:Serial", true),
ActivityCode = table.Column<string>(nullable: false),
ClientId = table.Column<string>(nullable: false),
DateCreated = table.Column<DateTime>(nullable: false),
DateModified = table.Column<DateTime>(nullable: false),
EventDate = table.Column<DateTime>(nullable: false),
LocationId = table.Column<long>(nullable: true),
LocationTypeId = table.Column<long>(nullable: true),
PerformerId = table.Column<string>(nullable: false),
Previsional = table.Column<decimal>(nullable: true),
Reason = table.Column<string>(nullable: true),
Status = table.Column<int>(nullable: false),
UserCreated = table.Column<string>(nullable: true),
UserModified = table.Column<string>(nullable: true),
ValidationDate = table.Column<DateTime>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_BookQuery", x => x.Id);
table.ForeignKey(
name: "FK_BookQuery_Activity_ActivityCode",
column: x => x.ActivityCode,
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_BookQuery_ApplicationUser_ClientId",
column: x => x.ClientId,
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_BookQuery_Location_LocationId",
column: x => x.LocationId,
principalTable: "Location",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_BookQuery_LocationType_LocationTypeId",
column: x => x.LocationTypeId,
principalTable: "LocationType",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_BookQuery_PerformerProfile_PerformerId",
column: x => x.PerformerId,
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.AddColumn<long>(
name: "ArticleId",
table: "CommandLine",
nullable: true);
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_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_Blog_BlogPostId",
table: "CircleAuthorizationToBlogPost",
column: "BlogPostId",
principalTable: "Blog",
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_BaseProduct_ArticleId",
table: "CommandLine",
column: "ArticleId",
principalTable: "BaseProduct",
principalColumn: "Id",
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_Estimate_BookQuery_CommandId",
table: "Estimate",
column: "CommandId",
principalTable: "BookQuery",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Estimate_PerformerProfile_OwnerId",
table: "Estimate",
column: "OwnerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
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_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_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_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
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_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);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,600 @@
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations
{
public partial class brusherProfile : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_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_Estimate_PerformerProfile_OwnerId", table: "Estimate");
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_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_HairTaint_Color_ColorId", table: "HairTaint");
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_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
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.CreateTable(
name: "BrusherProfile",
columns: table => new
{
UserId = table.Column<string>(nullable: false),
CarePrice = table.Column<decimal>(nullable: false),
EndOfTheDay = table.Column<int>(nullable: false),
HalfBalayagePrice = table.Column<decimal>(nullable: false),
HalfBrushingPrice = table.Column<decimal>(nullable: false),
HalfColorPrice = table.Column<decimal>(nullable: false),
HalfDefrisPrice = table.Column<decimal>(nullable: false),
HalfMechPrice = table.Column<decimal>(nullable: false),
HalfMultiColorPrice = table.Column<decimal>(nullable: false),
HalfPermanentPrice = table.Column<decimal>(nullable: false),
KidCutPrice = table.Column<decimal>(nullable: false),
LongBalayagePrice = table.Column<decimal>(nullable: false),
LongBrushingPrice = table.Column<decimal>(nullable: false),
LongColorPrice = table.Column<decimal>(nullable: false),
LongDefrisPrice = table.Column<decimal>(nullable: false),
LongMechPrice = table.Column<decimal>(nullable: false),
LongMultiColorPrice = table.Column<decimal>(nullable: false),
LongPermanentPrice = table.Column<decimal>(nullable: false),
ManCutPrice = table.Column<decimal>(nullable: false),
ShampooPrice = table.Column<decimal>(nullable: false),
ShortBalayagePrice = table.Column<decimal>(nullable: false),
ShortBrushingPrice = table.Column<decimal>(nullable: false),
ShortColorPrice = table.Column<decimal>(nullable: false),
ShortDefrisPrice = table.Column<decimal>(nullable: false),
ShortMechPrice = table.Column<decimal>(nullable: false),
ShortMultiColorPrice = table.Column<decimal>(nullable: false),
ShortPermanentPrice = table.Column<decimal>(nullable: false),
StartOfTheDay = table.Column<int>(nullable: false),
WomenHalfCutPrice = table.Column<decimal>(nullable: false),
WomenLongCutPrice = table.Column<decimal>(nullable: false),
WomenShortCutPrice = table.Column<decimal>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_BrusherProfile", x => x.UserId);
});
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_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_Blog_BlogPostId",
table: "CircleAuthorizationToBlogPost",
column: "BlogPostId",
principalTable: "Blog",
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_Estimate_PerformerProfile_OwnerId",
table: "Estimate",
column: "OwnerId",
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_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_HairTaint_Color_ColorId",
table: "HairTaint",
column: "ColorId",
principalTable: "Color",
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_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_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CommandForm_Activity_ActivityCode",
table: "CommandForm",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_Location_OrganizationAddressId",
table: "PerformerProfile",
column: "OrganizationAddressId",
principalTable: "Location",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
table: "PerformerProfile",
column: "PerformerId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_RdvQuery_Activity_ActivityCode",
table: "RdvQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_RdvQuery_ApplicationUser_ClientId",
table: "RdvQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_RdvQuery_PerformerProfile_PerformerId",
table: "RdvQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_Activity_DoesCode",
table: "UserActivity",
column: "DoesCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_PerformerProfile_UserId",
table: "UserActivity",
column: "UserId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_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_Estimate_PerformerProfile_OwnerId", table: "Estimate");
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_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_HairTaint_Color_ColorId", table: "HairTaint");
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_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
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.DropTable("BrusherProfile");
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_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_Blog_BlogPostId",
table: "CircleAuthorizationToBlogPost",
column: "BlogPostId",
principalTable: "Blog",
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_Estimate_PerformerProfile_OwnerId",
table: "Estimate",
column: "OwnerId",
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_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_HairTaint_Color_ColorId",
table: "HairTaint",
column: "ColorId",
principalTable: "Color",
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_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_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
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);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,569 @@
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations
{
public partial class actionName : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_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_Estimate_PerformerProfile_OwnerId", table: "Estimate");
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_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_HairTaint_Color_ColorId", table: "HairTaint");
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_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_Activity_ActivityCode", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_ApplicationUser_ClientId", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_PerformerProfile_PerformerId", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
migrationBuilder.DropColumn(name: "Action", table: "CommandForm");
migrationBuilder.AddColumn<string>(
name: "ActionName",
table: "CommandForm",
nullable: true);
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_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_Blog_BlogPostId",
table: "CircleAuthorizationToBlogPost",
column: "BlogPostId",
principalTable: "Blog",
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_Estimate_PerformerProfile_OwnerId",
table: "Estimate",
column: "OwnerId",
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_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_HairTaint_Color_ColorId",
table: "HairTaint",
column: "ColorId",
principalTable: "Color",
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_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_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CommandForm_Activity_ActivityCode",
table: "CommandForm",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_Location_OrganizationAddressId",
table: "PerformerProfile",
column: "OrganizationAddressId",
principalTable: "Location",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
table: "PerformerProfile",
column: "PerformerId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_RdvQuery_Activity_ActivityCode",
table: "RdvQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_RdvQuery_ApplicationUser_ClientId",
table: "RdvQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_RdvQuery_PerformerProfile_PerformerId",
table: "RdvQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_Activity_DoesCode",
table: "UserActivity",
column: "DoesCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_PerformerProfile_UserId",
table: "UserActivity",
column: "UserId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_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_Estimate_PerformerProfile_OwnerId", table: "Estimate");
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_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_HairTaint_Color_ColorId", table: "HairTaint");
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_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_Activity_ActivityCode", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_ApplicationUser_ClientId", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_PerformerProfile_PerformerId", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
migrationBuilder.DropColumn(name: "ActionName", table: "CommandForm");
migrationBuilder.AddColumn<string>(
name: "Action",
table: "CommandForm",
nullable: true);
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_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_Blog_BlogPostId",
table: "CircleAuthorizationToBlogPost",
column: "BlogPostId",
principalTable: "Blog",
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_Estimate_PerformerProfile_OwnerId",
table: "Estimate",
column: "OwnerId",
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_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_HairTaint_Color_ColorId",
table: "HairTaint",
column: "ColorId",
principalTable: "Color",
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_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_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
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);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,565 @@
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations
{
public partial class brusherActiondistance : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_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_Estimate_PerformerProfile_OwnerId", table: "Estimate");
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_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_HairTaint_Color_ColorId", table: "HairTaint");
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_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_Activity_ActivityCode", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_ApplicationUser_ClientId", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_PerformerProfile_PerformerId", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
migrationBuilder.AddColumn<int>(
name: "ActionDistance",
table: "BrusherProfile",
nullable: false,
defaultValue: 0);
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_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_Blog_BlogPostId",
table: "CircleAuthorizationToBlogPost",
column: "BlogPostId",
principalTable: "Blog",
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_Estimate_PerformerProfile_OwnerId",
table: "Estimate",
column: "OwnerId",
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_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_HairTaint_Color_ColorId",
table: "HairTaint",
column: "ColorId",
principalTable: "Color",
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_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_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CommandForm_Activity_ActivityCode",
table: "CommandForm",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_Location_OrganizationAddressId",
table: "PerformerProfile",
column: "OrganizationAddressId",
principalTable: "Location",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
table: "PerformerProfile",
column: "PerformerId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_RdvQuery_Activity_ActivityCode",
table: "RdvQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_RdvQuery_ApplicationUser_ClientId",
table: "RdvQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_RdvQuery_PerformerProfile_PerformerId",
table: "RdvQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_Activity_DoesCode",
table: "UserActivity",
column: "DoesCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_PerformerProfile_UserId",
table: "UserActivity",
column: "UserId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_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_Estimate_PerformerProfile_OwnerId", table: "Estimate");
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_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_HairTaint_Color_ColorId", table: "HairTaint");
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_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_Activity_ActivityCode", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_ApplicationUser_ClientId", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_PerformerProfile_PerformerId", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
migrationBuilder.DropColumn(name: "ActionDistance", table: "BrusherProfile");
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_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_Blog_BlogPostId",
table: "CircleAuthorizationToBlogPost",
column: "BlogPostId",
principalTable: "Blog",
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_Estimate_PerformerProfile_OwnerId",
table: "Estimate",
column: "OwnerId",
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_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_HairTaint_Color_ColorId",
table: "HairTaint",
column: "ColorId",
principalTable: "Color",
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_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_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
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);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,565 @@
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations
{
public partial class manbrushing : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_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_Estimate_PerformerProfile_OwnerId", table: "Estimate");
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_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_HairTaint_Color_ColorId", table: "HairTaint");
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_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_Activity_ActivityCode", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_ApplicationUser_ClientId", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_PerformerProfile_PerformerId", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
migrationBuilder.AddColumn<decimal>(
name: "ManBrushPrice",
table: "BrusherProfile",
nullable: false,
defaultValue: 0m);
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_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_Blog_BlogPostId",
table: "CircleAuthorizationToBlogPost",
column: "BlogPostId",
principalTable: "Blog",
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_Estimate_PerformerProfile_OwnerId",
table: "Estimate",
column: "OwnerId",
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_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_HairTaint_Color_ColorId",
table: "HairTaint",
column: "ColorId",
principalTable: "Color",
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_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_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CommandForm_Activity_ActivityCode",
table: "CommandForm",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_Location_OrganizationAddressId",
table: "PerformerProfile",
column: "OrganizationAddressId",
principalTable: "Location",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
table: "PerformerProfile",
column: "PerformerId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_RdvQuery_Activity_ActivityCode",
table: "RdvQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_RdvQuery_ApplicationUser_ClientId",
table: "RdvQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_RdvQuery_PerformerProfile_PerformerId",
table: "RdvQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_Activity_DoesCode",
table: "UserActivity",
column: "DoesCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_PerformerProfile_UserId",
table: "UserActivity",
column: "UserId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_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_Estimate_PerformerProfile_OwnerId", table: "Estimate");
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_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_HairTaint_Color_ColorId", table: "HairTaint");
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_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_Activity_ActivityCode", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_ApplicationUser_ClientId", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_PerformerProfile_PerformerId", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
migrationBuilder.DropColumn(name: "ManBrushPrice", table: "BrusherProfile");
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_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_Blog_BlogPostId",
table: "CircleAuthorizationToBlogPost",
column: "BlogPostId",
principalTable: "Blog",
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_Estimate_PerformerProfile_OwnerId",
table: "Estimate",
column: "OwnerId",
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_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_HairTaint_Color_ColorId",
table: "HairTaint",
column: "ColorId",
principalTable: "Color",
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_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_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
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);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,577 @@
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations
{
public partial class folding : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_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_Estimate_PerformerProfile_OwnerId", table: "Estimate");
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_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_HairTaint_Color_ColorId", table: "HairTaint");
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_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_Activity_ActivityCode", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_ApplicationUser_ClientId", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_PerformerProfile_PerformerId", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
migrationBuilder.AddColumn<decimal>(
name: "HalfFoldingPrice",
table: "BrusherProfile",
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn<decimal>(
name: "LongFoldingPrice",
table: "BrusherProfile",
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn<decimal>(
name: "ShortFoldingPrice",
table: "BrusherProfile",
nullable: false,
defaultValue: 0m);
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_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_Blog_BlogPostId",
table: "CircleAuthorizationToBlogPost",
column: "BlogPostId",
principalTable: "Blog",
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_Estimate_PerformerProfile_OwnerId",
table: "Estimate",
column: "OwnerId",
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_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_HairTaint_Color_ColorId",
table: "HairTaint",
column: "ColorId",
principalTable: "Color",
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_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_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CommandForm_Activity_ActivityCode",
table: "CommandForm",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_Location_OrganizationAddressId",
table: "PerformerProfile",
column: "OrganizationAddressId",
principalTable: "Location",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
table: "PerformerProfile",
column: "PerformerId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_RdvQuery_Activity_ActivityCode",
table: "RdvQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_RdvQuery_ApplicationUser_ClientId",
table: "RdvQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_RdvQuery_PerformerProfile_PerformerId",
table: "RdvQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_Activity_DoesCode",
table: "UserActivity",
column: "DoesCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_PerformerProfile_UserId",
table: "UserActivity",
column: "UserId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_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_Estimate_PerformerProfile_OwnerId", table: "Estimate");
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_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_HairTaint_Color_ColorId", table: "HairTaint");
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_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_Activity_ActivityCode", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_ApplicationUser_ClientId", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_PerformerProfile_PerformerId", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
migrationBuilder.DropColumn(name: "HalfFoldingPrice", table: "BrusherProfile");
migrationBuilder.DropColumn(name: "LongFoldingPrice", table: "BrusherProfile");
migrationBuilder.DropColumn(name: "ShortFoldingPrice", table: "BrusherProfile");
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_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_Blog_BlogPostId",
table: "CircleAuthorizationToBlogPost",
column: "BlogPostId",
principalTable: "Blog",
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_Estimate_PerformerProfile_OwnerId",
table: "Estimate",
column: "OwnerId",
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_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_HairTaint_Color_ColorId",
table: "HairTaint",
column: "ColorId",
principalTable: "Color",
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_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_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
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);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,613 @@
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations
{
public partial class brusherProfileDiscount : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_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_Estimate_PerformerProfile_OwnerId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_Activity_ActivityCode", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_ApplicationUser_ClientId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_Location_LocationId", 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_HairTaint_Color_ColorId", table: "HairTaint");
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_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
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.AlterColumn<long>(
name: "PrestationId",
table: "HairCutQuery",
nullable: false);
migrationBuilder.AlterColumn<long>(
name: "LocationId",
table: "HairCutQuery",
nullable: false);
migrationBuilder.AddColumn<decimal>(
name: "FlatFeeDiscount",
table: "BrusherProfile",
nullable: false,
defaultValue: 0m);
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_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_Blog_BlogPostId",
table: "CircleAuthorizationToBlogPost",
column: "BlogPostId",
principalTable: "Blog",
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_Estimate_PerformerProfile_OwnerId",
table: "Estimate",
column: "OwnerId",
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_Location_LocationId",
table: "HairCutQuery",
column: "LocationId",
principalTable: "Location",
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_HairTaint_Color_ColorId",
table: "HairTaint",
column: "ColorId",
principalTable: "Color",
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_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_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CommandForm_Activity_ActivityCode",
table: "CommandForm",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_Location_OrganizationAddressId",
table: "PerformerProfile",
column: "OrganizationAddressId",
principalTable: "Location",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
table: "PerformerProfile",
column: "PerformerId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_RdvQuery_Activity_ActivityCode",
table: "RdvQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_RdvQuery_ApplicationUser_ClientId",
table: "RdvQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_RdvQuery_PerformerProfile_PerformerId",
table: "RdvQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_Activity_DoesCode",
table: "UserActivity",
column: "DoesCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_PerformerProfile_UserId",
table: "UserActivity",
column: "UserId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_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_Estimate_PerformerProfile_OwnerId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_Activity_ActivityCode", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_ApplicationUser_ClientId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_Location_LocationId", 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_HairTaint_Color_ColorId", table: "HairTaint");
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_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_Activity_ActivityCode", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_ApplicationUser_ClientId", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_PerformerProfile_PerformerId", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
migrationBuilder.DropColumn(name: "FlatFeeDiscount", table: "BrusherProfile");
migrationBuilder.AlterColumn<long>(
name: "PrestationId",
table: "HairCutQuery",
nullable: true);
migrationBuilder.AlterColumn<long>(
name: "LocationId",
table: "HairCutQuery",
nullable: true);
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_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_Blog_BlogPostId",
table: "CircleAuthorizationToBlogPost",
column: "BlogPostId",
principalTable: "Blog",
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_Estimate_PerformerProfile_OwnerId",
table: "Estimate",
column: "OwnerId",
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_Location_LocationId",
table: "HairCutQuery",
column: "LocationId",
principalTable: "Location",
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_HairTaint_Color_ColorId",
table: "HairTaint",
column: "ColorId",
principalTable: "Color",
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_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_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
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);
}
}
}

View File

@ -306,8 +306,6 @@ namespace Yavsc.Migrations
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<long?>("ArticleId");
b.Property<int>("Count");
b.Property<string>("Description")
@ -441,6 +439,182 @@ namespace Yavsc.Migrations
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Haircut.BrusherProfile", b =>
{
b.Property<string>("UserId");
b.Property<int>("ActionDistance");
b.Property<decimal>("CarePrice");
b.Property<int>("EndOfTheDay");
b.Property<decimal>("FlatFeeDiscount");
b.Property<decimal>("HalfBalayagePrice");
b.Property<decimal>("HalfBrushingPrice");
b.Property<decimal>("HalfColorPrice");
b.Property<decimal>("HalfDefrisPrice");
b.Property<decimal>("HalfFoldingPrice");
b.Property<decimal>("HalfMechPrice");
b.Property<decimal>("HalfMultiColorPrice");
b.Property<decimal>("HalfPermanentPrice");
b.Property<decimal>("KidCutPrice");
b.Property<decimal>("LongBalayagePrice");
b.Property<decimal>("LongBrushingPrice");
b.Property<decimal>("LongColorPrice");
b.Property<decimal>("LongDefrisPrice");
b.Property<decimal>("LongFoldingPrice");
b.Property<decimal>("LongMechPrice");
b.Property<decimal>("LongMultiColorPrice");
b.Property<decimal>("LongPermanentPrice");
b.Property<decimal>("ManBrushPrice");
b.Property<decimal>("ManCutPrice");
b.Property<decimal>("ShampooPrice");
b.Property<decimal>("ShortBalayagePrice");
b.Property<decimal>("ShortBrushingPrice");
b.Property<decimal>("ShortColorPrice");
b.Property<decimal>("ShortDefrisPrice");
b.Property<decimal>("ShortFoldingPrice");
b.Property<decimal>("ShortMechPrice");
b.Property<decimal>("ShortMultiColorPrice");
b.Property<decimal>("ShortPermanentPrice");
b.Property<int>("StartOfTheDay");
b.Property<decimal>("WomenHalfCutPrice");
b.Property<decimal>("WomenLongCutPrice");
b.Property<decimal>("WomenShortCutPrice");
b.HasKey("UserId");
});
modelBuilder.Entity("Yavsc.Models.Haircut.HairCutQuery", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ActivityCode")
.IsRequired();
b.Property<string>("ClientId")
.IsRequired();
b.Property<DateTime>("DateCreated");
b.Property<DateTime>("DateModified");
b.Property<DateTime>("EventDate");
b.Property<long?>("LocationId")
.IsRequired();
b.Property<string>("PerformerId")
.IsRequired();
b.Property<long>("PrestationId");
b.Property<decimal?>("Previsional");
b.Property<int>("Status");
b.Property<string>("UserCreated");
b.Property<string>("UserModified");
b.Property<DateTime?>("ValidationDate");
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Haircut.HairMultiCutQuery", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ActivityCode")
.IsRequired();
b.Property<string>("ClientId")
.IsRequired();
b.Property<DateTime>("DateCreated");
b.Property<DateTime>("DateModified");
b.Property<DateTime>("EventDate");
b.Property<long?>("LocationId");
b.Property<string>("PerformerId")
.IsRequired();
b.Property<decimal?>("Previsional");
b.Property<int>("Status");
b.Property<string>("UserCreated");
b.Property<string>("UserModified");
b.Property<DateTime?>("ValidationDate");
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Haircut.HairPrestation", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<bool>("Cares");
b.Property<bool>("Cut");
b.Property<int>("Dressing");
b.Property<int>("Gender");
b.Property<long?>("HairMultiCutQueryId");
b.Property<int>("Length");
b.Property<bool>("Shampoo");
b.Property<int>("Tech");
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Haircut.HairTaint", b =>
{
b.Property<long>("Id")
@ -450,6 +624,8 @@ namespace Yavsc.Migrations
b.Property<long>("ColorId");
b.Property<long?>("HairPrestationId");
b.HasKey("Id");
});
@ -475,25 +651,28 @@ namespace Yavsc.Migrations
b.HasKey("DeviceId");
});
modelBuilder.Entity("Yavsc.Models.Market.BaseProduct", b =>
modelBuilder.Entity("Yavsc.Models.Market.Product", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<decimal>("Depth");
b.Property<string>("Description");
b.Property<string>("Discriminator")
.IsRequired();
b.Property<decimal>("Height");
b.Property<string>("Name");
b.Property<decimal?>("Price");
b.Property<bool>("Public");
b.Property<decimal>("Weight");
b.Property<decimal>("Width");
b.HasKey("Id");
b.HasAnnotation("Relational:DiscriminatorProperty", "Discriminator");
b.HasAnnotation("Relational:DiscriminatorValue", "BaseProduct");
});
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
@ -773,51 +952,12 @@ namespace Yavsc.Migrations
b.HasKey("Code");
});
modelBuilder.Entity("Yavsc.Models.Workflow.BookQuery", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ActivityCode")
.IsRequired();
b.Property<string>("ClientId")
.IsRequired();
b.Property<DateTime>("DateCreated");
b.Property<DateTime>("DateModified");
b.Property<DateTime>("EventDate");
b.Property<long?>("LocationId");
b.Property<long?>("LocationTypeId");
b.Property<string>("PerformerId")
.IsRequired();
b.Property<decimal?>("Previsional");
b.Property<string>("Reason");
b.Property<int>("Status");
b.Property<string>("UserCreated");
b.Property<string>("UserModified");
b.Property<DateTime?>("ValidationDate");
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Workflow.CommandForm", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Action");
b.Property<string>("ActionName");
b.Property<string>("ActivityCode")
.IsRequired();
@ -877,6 +1017,45 @@ namespace Yavsc.Migrations
b.HasKey("UserId");
});
modelBuilder.Entity("Yavsc.Models.Workflow.RdvQuery", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ActivityCode")
.IsRequired();
b.Property<string>("ClientId")
.IsRequired();
b.Property<DateTime>("DateCreated");
b.Property<DateTime>("DateModified");
b.Property<DateTime>("EventDate");
b.Property<long?>("LocationId");
b.Property<long?>("LocationTypeId");
b.Property<string>("PerformerId")
.IsRequired();
b.Property<decimal?>("Previsional");
b.Property<string>("Reason");
b.Property<int>("Status");
b.Property<string>("UserCreated");
b.Property<string>("UserModified");
b.Property<DateTime?>("ValidationDate");
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Workflow.UserActivity", b =>
{
b.Property<string>("DoesCode");
@ -888,23 +1067,6 @@ namespace Yavsc.Migrations
b.HasKey("DoesCode", "UserId");
});
modelBuilder.Entity("Yavsc.Models.Market.Product", b =>
{
b.HasBaseType("Yavsc.Models.Market.BaseProduct");
b.Property<decimal>("Depth");
b.Property<decimal>("Height");
b.Property<decimal?>("Price");
b.Property<decimal>("Weight");
b.Property<decimal>("Width");
b.HasAnnotation("Relational:DiscriminatorValue", "Product");
});
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
{
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
@ -982,10 +1144,6 @@ namespace Yavsc.Migrations
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
{
b.HasOne("Yavsc.Models.Market.BaseProduct")
.WithMany()
.HasForeignKey("ArticleId");
b.HasOne("Yavsc.Models.Billing.Estimate")
.WithMany()
.HasForeignKey("EstimateId");
@ -1001,7 +1159,7 @@ namespace Yavsc.Migrations
.WithMany()
.HasForeignKey("ClientId");
b.HasOne("Yavsc.Models.Workflow.BookQuery")
b.HasOne("Yavsc.Models.Workflow.RdvQuery")
.WithMany()
.HasForeignKey("CommandId");
@ -1024,11 +1182,64 @@ namespace Yavsc.Migrations
.HasForeignKey("ApplicationUserId");
});
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.Workflow.PerformerProfile")
.WithMany()
.HasForeignKey("PerformerId");
b.HasOne("Yavsc.Models.Haircut.HairPrestation")
.WithMany()
.HasForeignKey("PrestationId");
});
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.Workflow.PerformerProfile")
.WithMany()
.HasForeignKey("PerformerId");
});
modelBuilder.Entity("Yavsc.Models.Haircut.HairPrestation", b =>
{
b.HasOne("Yavsc.Models.Haircut.HairMultiCutQuery")
.WithMany()
.HasForeignKey("HairMultiCutQueryId");
});
modelBuilder.Entity("Yavsc.Models.Haircut.HairTaint", b =>
{
b.HasOne("Yavsc.Models.Drawing.Color")
.WithMany()
.HasForeignKey("ColorId");
b.HasOne("Yavsc.Models.Haircut.HairPrestation")
.WithMany()
.HasForeignKey("HairPrestationId");
});
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
@ -1124,29 +1335,6 @@ namespace Yavsc.Migrations
.HasForeignKey("ParentCode");
});
modelBuilder.Entity("Yavsc.Models.Workflow.BookQuery", b =>
{
b.HasOne("Yavsc.Models.Workflow.Activity")
.WithMany()
.HasForeignKey("ActivityCode");
b.HasOne("Yavsc.Models.ApplicationUser")
.WithMany()
.HasForeignKey("ClientId");
b.HasOne("Yavsc.Models.Relationship.Location")
.WithMany()
.HasForeignKey("LocationId");
b.HasOne("Yavsc.Models.Relationship.LocationType")
.WithMany()
.HasForeignKey("LocationTypeId");
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
.WithMany()
.HasForeignKey("PerformerId");
});
modelBuilder.Entity("Yavsc.Models.Workflow.CommandForm", b =>
{
b.HasOne("Yavsc.Models.Workflow.Activity")
@ -1180,6 +1368,29 @@ namespace Yavsc.Migrations
.HasForeignKey("PerformerId");
});
modelBuilder.Entity("Yavsc.Models.Workflow.RdvQuery", b =>
{
b.HasOne("Yavsc.Models.Workflow.Activity")
.WithMany()
.HasForeignKey("ActivityCode");
b.HasOne("Yavsc.Models.ApplicationUser")
.WithMany()
.HasForeignKey("ClientId");
b.HasOne("Yavsc.Models.Relationship.Location")
.WithMany()
.HasForeignKey("LocationId");
b.HasOne("Yavsc.Models.Relationship.LocationType")
.WithMany()
.HasForeignKey("LocationTypeId");
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
.WithMany()
.HasForeignKey("PerformerId");
});
modelBuilder.Entity("Yavsc.Models.Workflow.UserActivity", b =>
{
b.HasOne("Yavsc.Models.Workflow.Activity")

View File

@ -91,13 +91,15 @@ namespace Yavsc.Models
/// on his profile).
/// </summary>
/// <returns></returns>
public DbSet<BookQuery> Commands { get; set; }
public DbSet<RdvQuery> Commands { get; set; }
/// <summary>
/// Special commands, talking about
/// a given place and date.
/// </summary>
/// <returns></returns>
public DbSet<BookQuery> BookQueries { get; set; }
public DbSet<RdvQuery> RdvQueries { get; set; }
public DbSet<HairCutQuery> HairCutQueries { get; set; }
public DbSet<HairMultiCutQuery> HairMultiCutQueries { get; set; }
public DbSet<PerformerProfile> Performers { get; set; }
public DbSet<Estimate> Estimates { get; set; }
public DbSet<AccountBalance> BankStatus { get; set; }
@ -269,6 +271,10 @@ namespace Yavsc.Models
public DbSet<Notification> Notification { get; set; }
public DbSet<DimissClicked> DimissClicked { get; set; }
public DbSet<HairPrestation> HairPrestation { get; set; }
public DbSet<BrusherProfile> BrusherProfile { get; set; }
}

View File

@ -2,19 +2,19 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using Yavsc.Models.Market;
namespace Yavsc.Models.Billing
{
using YavscLib.Billing;
public class CommandLine {
public class CommandLine : ICommandLine {
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[Required,MaxLength(512)]
public string Description { get; set; }
public BaseProduct Article { get; set; }
public int Count { get; set; }
[DisplayFormat(DataFormatString="{0:C}")]

View File

@ -7,9 +7,9 @@ using System.Linq;
namespace Yavsc.Models.Billing
{
using Interfaces;
using Models.Workflow;
using Newtonsoft.Json;
using YavscLib.Workflow;
public partial class Estimate : IEstimate
{
@ -24,7 +24,7 @@ namespace Yavsc.Models.Billing
/// </summary>
/// <returns></returns>
[ForeignKey("CommandId"),JsonIgnore]
public BookQuery Query { get; set; }
public RdvQuery Query { get; set; }
public string Description { get; set; }
public string Title { get; set; }

View File

@ -5,11 +5,12 @@ using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models.Billing
{
using Interfaces.Workflow;
using Workflow;
using YavscLib;
using Interfaces.Workflow;
using Newtonsoft.Json;
using Workflow;
using YavscLib;
public abstract class NominativeServiceCommand : IBaseTrackedEntity, IQuery
public abstract class NominativeServiceCommand : IBaseTrackedEntity, IQuery
{
public DateTime DateCreated
{
@ -60,6 +61,10 @@ using YavscLib;
/// </summary>
/// <returns></returns>
[Required]
public string ActivityCode { get; set; }
[ForeignKey("ActivityCode"),JsonIgnore]
public virtual Activity Context  { get; set ; }
}
}

View File

@ -35,7 +35,7 @@ namespace Yavsc.Models.Calendar
/// <returns>The free dates.</returns>
/// <param name="username">Username.</param>
/// <param name="req">Req.</param>
IFreeDateSet GetFreeDates(string username, BookQuery req);
IFreeDateSet GetFreeDates(string username, RdvQuery req);
/// <summary>
/// Book the specified username and ev.
/// </summary>

View File

@ -0,0 +1,139 @@
using System.ComponentModel.DataAnnotations;
using YavscLib;
namespace Yavsc.Models.Haircut
{
public class BrusherProfile : ISpecializationSettings
{
[Key]
public string UserId
{
get; set;
}
[Display(Name="Rayon d'action"),DisplayFormat(DataFormatString="{0} km")]
public int ActionDistance { get; set; }
/// <summary>
/// StartOfTheDay In munutes
/// </summary>
/// <returns></returns>
[Display(Name="Début de la journée")]
public int StartOfTheDay { get; set;}
/// <summary>
/// End Of The Day, In munutes
/// </summary>
/// <returns></returns>
[Display(Name="Fin de la journée")]
public int EndOfTheDay { get; set;}
[Display(Name="Coupe femme cheveux longs"),DisplayFormat(DataFormatString="{0:C}")]
public decimal WomenLongCutPrice { get; set; }
[Display(Name="Coupe femme cheveux mi-longs"),DisplayFormat(DataFormatString="{0:C}")]
public decimal WomenHalfCutPrice { get; set; }
[Display(Name="Coupe femme cheveux courts"),DisplayFormat(DataFormatString="{0:C}")]
public decimal WomenShortCutPrice { get; set; }
[Display(Name="Coupe homme"),DisplayFormat(DataFormatString="{0:C}")]
public decimal ManCutPrice { get; set; }
[Display(Name="brushing homme"),DisplayFormat(DataFormatString="{0:C}")]
public decimal ManBrushPrice { get; set; }
[Display(Name="Coupe enfant"),DisplayFormat(DataFormatString="{0:C}")]
public decimal KidCutPrice { get; set; }
[Display(Name="Brushing cheveux longs"),DisplayFormat(DataFormatString="{0:C}")]
public decimal LongBrushingPrice { get; set; }
[Display(Name="Brushing cheveux mi-longs"),DisplayFormat(DataFormatString="{0:C}")]
public decimal HalfBrushingPrice { get; set; }
[Display(Name="Brushing cheveux courts"),DisplayFormat(DataFormatString="{0:C}")]
public decimal ShortBrushingPrice { get; set; }
[Display(Name="couleur cheveux longs"),DisplayFormat(DataFormatString="{0:C}")]
public decimal LongColorPrice { get; set; }
[Display(Name="couleur cheveux mi-longs"),DisplayFormat(DataFormatString="{0:C}")]
public decimal HalfColorPrice { get; set; }
[Display(Name="couleur cheveux courts"),DisplayFormat(DataFormatString="{0:C}")]
public decimal ShortColorPrice { get; set; }
[Display(Name="couleur multiple cheveux longs"),DisplayFormat(DataFormatString="{0:C}")]
public decimal LongMultiColorPrice { get; set; }
[Display(Name="couleur multiple cheveux mi-longs"),DisplayFormat(DataFormatString="{0:C}")]
public decimal HalfMultiColorPrice { get; set; }
[Display(Name="couleur multiple cheveux courts"),DisplayFormat(DataFormatString="{0:C}")]
public decimal ShortMultiColorPrice { get; set; }
[Display(Name="permanente cheveux longs"),DisplayFormat(DataFormatString="{0:C}")]
public decimal LongPermanentPrice { get; set; }
[Display(Name="permanente cheveux mi-longs"),DisplayFormat(DataFormatString="{0:C}")]
public decimal HalfPermanentPrice { get; set; }
[Display(Name="permanente cheveux courts"),DisplayFormat(DataFormatString="{0:C}")]
public decimal ShortPermanentPrice { get; set; }
[Display(Name="défrisage cheveux longs"),DisplayFormat(DataFormatString="{0:C}")]
public decimal LongDefrisPrice { get; set; }
[Display(Name="défrisage cheveux mi-longs"),DisplayFormat(DataFormatString="{0:C}")]
public decimal HalfDefrisPrice { get; set; }
[Display(Name="défrisage cheveux courts"),DisplayFormat(DataFormatString="{0:C}")]
public decimal ShortDefrisPrice { get; set; }
[Display(Name="mêches sur cheveux longs"),DisplayFormat(DataFormatString="{0:C}")]
public decimal LongMechPrice { get; set; }
[Display(Name="mêches sur cheveux mi-longs"),DisplayFormat(DataFormatString="{0:C}")]
public decimal HalfMechPrice { get; set; }
[Display(Name="mêches sur cheveux courts"),DisplayFormat(DataFormatString="{0:C}")]
public decimal ShortMechPrice { get; set; }
[Display(Name="balayage cheveux longs"),DisplayFormat(DataFormatString="{0:C}")]
public decimal LongBalayagePrice { get; set; }
[Display(Name="balayage cheveux mi-longs"),DisplayFormat(DataFormatString="{0:C}")]
public decimal HalfBalayagePrice { get; set; }
[Display(Name="balayage cheveux courts"),DisplayFormat(DataFormatString="{0:C}")]
public decimal ShortBalayagePrice { get; set; }
[Display(Name="Mise en plis cheveux longs"),DisplayFormat(DataFormatString="{0:C}")]
public decimal LongFoldingPrice { get; set; }
[Display(Name="Mise en plis cheveux mi-longs"),DisplayFormat(DataFormatString="{0:C}")]
public decimal HalfFoldingPrice { get; set; }
[Display(Name="Mise en plis cheveux courts"),DisplayFormat(DataFormatString="{0:C}")]
public decimal ShortFoldingPrice { get; set; }
[Display(Name="Shampoing"),DisplayFormat(DataFormatString="{0:C}")]
public decimal ShampooPrice { get; set; }
[Display(Name="Soin"),DisplayFormat(DataFormatString="{0:C}")]
public decimal CarePrice { get; set; }
[Display(Name="Remise au forfait coupe+technique"),DisplayFormat(DataFormatString="{0:C}")]
public decimal FlatFeeDiscount { get; set; }
}
}

View File

@ -1,9 +1,17 @@
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Haircut
{
public enum HairCutGenders : int
{
Kid = 1,
[Display(Name="Femme")]
Women,
[Display(Name="Homme")]
Man,
Women
[Display(Name="Enfant")]
Kid
}
}

View File

@ -1,7 +1,9 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Billing;
using Yavsc.Models.Relationship;
namespace Yavsc.Models.Haircut
{
@ -9,6 +11,21 @@ namespace Yavsc.Models.Haircut
{
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
HairPrestation [] Prestations { get; set; }
[Required]
public long PrestationId { get; set; }
[ForeignKey("PrestationId")]
public virtual HairPrestation Prestation { get; set; }
[Required]
public Location Location { get; set; }
public DateTime EventDate
{
get;
set;
}
}
}

View File

@ -2,7 +2,7 @@ using Yavsc.Interfaces.Workflow;
namespace Yavsc.Models.Haircut
{
public class HairCutQueryEvent : BookQueryProviderInfo, IEvent
public class HairCutQueryEvent : RdvQueryProviderInfo, IEvent
{
public HairCutQueryEvent()
{

View File

@ -1,7 +1,14 @@
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Haircut
{
public enum HairDressings {
Coiffage,
Brushing,
[Display(Name="Mise en plis")]
Folding
}
}

View File

@ -1,9 +1,16 @@
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Haircut
{
public enum HairLength : int
{
Short = 1,
[Display(Name="Mi-longs")]
HalfLong,
[Display(Name="Courts")]
Short = 1,
[Display(Name="Longs")]
Long
}
}

View File

@ -0,0 +1,23 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Billing;
using Yavsc.Models.Relationship;
namespace Yavsc.Models.Haircut
{
public class HairMultiCutQuery : NominativeServiceCommand
{
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
HairPrestation [] Prestations { get; set; }
public Location Location { get; set; }
public DateTime EventDate
{
get;
set;
}
}
}

View File

@ -1,18 +1,44 @@
using Yavsc.Models.Market;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models.Haircut
{
public class HairPrestation : Service
public class HairPrestation
{
// Homme ou enfant => Coupe seule
// Couleur => Shampoing
// Forfaits : Coupe + Technique
// pas de coupe => technique
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[Display(Name="Longueur de cheveux")]
public HairLength Length { get; set; }
[Display(Name="Pour qui")]
public HairCutGenders Gender { get; set; }
[Display(Name="Coupe")]
public bool Cut { get; set; }
[Display(Name="Coiffage")]
public HairDressings Dressing { get; set; }
[Display(Name="Technique")]
public HairTechnos Tech { get; set; }
[Display(Name="Shampoing")]
public bool Shampoo { get; set; }
public HairTaint[] Taints { get; set; }
[Display(Name="Couleurs")]
public virtual List<HairTaint> Taints { get; set; }
[Display(Name="Soins")]
public bool Cares { get; set; }
}

View File

@ -1,13 +1,22 @@
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Haircut
{
public enum HairTechnos
{
[Display(Name="Aucune technique spécifique")]
None,
[Display(Name="Couleur")]
Color,
[Display(Name="Permantante")]
Permanent,
[Display(Name="Défrisage")]
Defris,
[Display(Name="Mêches")]
Mech,
Balayage,
TyAndDie
Balayage
}
}
}

View File

@ -1,16 +1,10 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models.Market
{
public partial class BaseProduct
public class BaseProduct
{
/// <summary>
/// An unique product identifier.
/// </summary>
/// <returns></returns>
[Key(),DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
public string Name { get; set; }
/// <summary>
/// A contractual description for this product.

View File

@ -1,9 +1,15 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models.Market
{
public partial class Product : BaseProduct
public class Product : BaseProduct
{
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
/// <summary>
/// Weight in gram
/// </summary>

View File

@ -2,11 +2,19 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models.Market {
using System.ComponentModel.DataAnnotations;
using Billing;
using Workflow;
public partial class Service : BaseProduct
public class Service : BaseProduct
{
/// <summary>
/// An unique product identifier.
/// </summary>
/// <returns></returns>
[Key(),DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
public string ContextId { get; set; }
[ForeignKey("ContextId")]
public virtual Activity Context { get; set; }

View File

@ -26,8 +26,8 @@ namespace Yavsc.Models.Messaging
Avatar = perfer.Performer.Avatar,
UserId = perfer.PerformerId
};
((IEvent)this).Sender = perfer.Performer.UserName;
((IEvent)this).Message = string.Format(SR["EstimationMessageToClient"],perfer.Performer.UserName,
Sender = perfer.Performer.UserName;
Message = string.Format(SR["EstimationMessageToClient"],perfer.Performer.UserName,
estimate.Title,estimate.GetTotal());
}
ProviderClientInfo ProviderInfo { get; set; }

View File

@ -25,11 +25,11 @@ using Interfaces.Workflow;
public class BookQueryEvent: BookQueryProviderInfo, IEvent
public class RdvQueryEvent: RdvQueryProviderInfo, IEvent
{
public BookQueryEvent()
public RdvQueryEvent()
{
Topic = "BookQuery";
Topic = "RdvQuery";
}
public string Message

View File

@ -5,7 +5,7 @@ namespace Yavsc.Models
using Models.Messaging;
using Models.Relationship;
public class BookQueryProviderInfo
public class RdvQueryProviderInfo
{
public ClientProviderInfo Client { get; set; }
public Location Location { get; set; }

View File

@ -10,7 +10,7 @@ namespace Yavsc.Models.Workflow
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
public string Action { get; set; }
public string ActionName { get; set; }
public string Title { get; set; }

View File

@ -4,9 +4,10 @@ using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models.Workflow
{
using System;
using Models.Relationship;
using YavscLib.Workflow;
public class PerformerProfile : IPerformerProfile {
[Key]
@ -41,11 +42,13 @@ namespace Yavsc.Models.Workflow
[Display(Name="Active")]
public bool Active { get; set; }
[Display(Name="Maximal Daily Cost (euro/day)")]
[Obsolete("Implement and use a new specialization setting")]
[Display(Name="Maximal Daily Cost (euro/day)"),DisplayFormat(DataFormatString="{0:C}")]
public int? MaxDailyCost { get; set; }
[Display(Name="Minimal Daily Cost (euro/day)")]
[Obsolete("Implement and use a new specialization setting")]
[Display(Name="Minimal Daily Cost (euro/day)"),DisplayFormat(DataFormatString="{0:C}")]
public int? MinDailyCost { get; set; }
[Display(Name="Rate from clients")]

View File

@ -1,7 +1,6 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
namespace Yavsc.Models.Workflow
{
@ -11,7 +10,7 @@ namespace Yavsc.Models.Workflow
/// Query, for a date, with a given perfomer, at this given place.
/// </summary>
public class BookQuery : NominativeServiceCommand
public class RdvQuery : NominativeServiceCommand
{
/// <summary>
/// The command identifier
@ -38,22 +37,18 @@ namespace Yavsc.Models.Workflow
}
public string Reason { get; set; }
public BookQuery()
public RdvQuery()
{
}
public BookQuery(string activityCode, Location eventLocation, DateTime eventDate)
public RdvQuery(string activityCode, Location eventLocation, DateTime eventDate)
{
Location = eventLocation;
EventDate = eventDate;
ActivityCode = activityCode;
}
[Required]
public string ActivityCode { get; set; }
[ForeignKey("ActivityCode"),JsonIgnore]
public virtual Activity Context  { get; set ; }
}
}

View File

@ -338,5 +338,5 @@ contact a performer</value></data>
<data name="YourPosts"><value>You posts</value></data>
<data name="YourProfile"><value>Your profile</value></data>
<data name="YourMessageHasBeenSent"><value>Your message has been sent</value></data>
<data name="Longueur de cheveux"><value>Hair Length</value></data>
</root>

View File

@ -325,6 +325,7 @@
<data name="ProviderId"><value>Identifiant du fournisseur</value></data>
<data name="ProviderName"><value>Nom du fournisseur</value></data>
<data name="Rate"><value>Cote</value></data>
<data name="RdvToPerf"><value>{0} vous demande une intervention le {1} à {2} ({3})</value></data>
<data name="ReadMore"><value>Lire la suite ...</value></data>
<data name="reason"><value>raison</value></data>
<data name="Register"><value>S'inscrire</value></data>

View File

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Yavsc.Models.Google.Messaging;
using Yavsc.Models.Haircut;
using Yavsc.Models.Messaging;
namespace Yavsc.Services
@ -11,12 +12,18 @@ namespace Yavsc.Services
Task<MessageWithPayloadResponse> NotifyBookQueryAsync(
GoogleAuthSettings googlesettings,
IEnumerable<string> registrationId,
BookQueryEvent ev);
RdvQueryEvent ev);
Task<MessageWithPayloadResponse> NotifyEstimateAsync(
Task<MessageWithPayloadResponse> NotifyEstimateAsync(
GoogleAuthSettings googlesettings,
IEnumerable<string> registrationId,
EstimationEvent ev);
Task<MessageWithPayloadResponse> NotifyHairCutQueryAsync(
GoogleAuthSettings googlesettings,
IEnumerable<string> registrationId,
HairCutQueryEvent ev);
}
}

View File

@ -10,6 +10,7 @@ using Microsoft.AspNet.Identity;
using Yavsc.Models;
using Yavsc.Models.Google.Messaging;
using System.Collections.Generic;
using Yavsc.Models.Haircut;
namespace Yavsc.Services
{
@ -27,11 +28,11 @@ namespace Yavsc.Services
/// <returns>a MessageWithPayloadResponse,
/// <c>bool somethingsent = (response.failure == 0 &amp;&amp; response.success > 0)</c>
/// </returns>
public async Task<MessageWithPayloadResponse> NotifyBookQueryAsync(GoogleAuthSettings googleSettings, IEnumerable<string> registrationIds, BookQueryEvent ev)
public async Task<MessageWithPayloadResponse> NotifyBookQueryAsync(GoogleAuthSettings googleSettings, IEnumerable<string> registrationIds, RdvQueryEvent ev)
{
MessageWithPayloadResponse response = null;
await Task.Run(()=>{
response = googleSettings.NotifyEvent<BookQueryEvent>(registrationIds, ev);
response = googleSettings.NotifyEvent<RdvQueryEvent>(registrationIds, ev);
});
return response;
}
@ -45,6 +46,16 @@ namespace Yavsc.Services
return response;
}
public async Task<MessageWithPayloadResponse> NotifyHairCutQueryAsync(GoogleAuthSettings googleSettings,
IEnumerable<string> registrationIds, HairCutQueryEvent ev)
{
MessageWithPayloadResponse response = null;
await Task.Run(()=>{
response = googleSettings.NotifyEvent<HairCutQueryEvent>(registrationIds, ev);
});
return response;
}
public Task<bool> SendEmailAsync(SiteSettings siteSettings, SmtpSettings smtpSettings, string email, string subject, string message)
{
try

View File

@ -9,7 +9,6 @@ namespace Yavsc
SiteSettings siteSettings, IHostingEnvironment env)
{
app.UseWebSockets();
app.UseSignalR("/api/signalr");
/*
var _sockets = new ConcurrentBag<WebSocket>();

View File

@ -7,10 +7,16 @@ namespace Yavsc
public partial class Startup
{
/// <summary>
/// Lists Available user profile classes.
/// Lists Available user profile classes,
/// populated at startup, using reflexion.
/// </summary>
public static Dictionary<string,Type> ProfileTypes = new Dictionary<string,Type>() ;
public static readonly string [] Forms = new string [] { "Profiles" };
/// <summary>
/// Lists available command forms.
/// This is hard coded.
/// </summary>
public static readonly string [] Forms = new string [] { "Profiles" , "HairCut" };
private void ConfigureWorkflow(IApplicationBuilder app, SiteSettings settings)
{
@ -30,6 +36,5 @@ namespace Yavsc
return AppDomain.CurrentDomain.GetAssemblies()[0];
}
}
}

View File

@ -231,7 +231,6 @@ namespace Yavsc
IOptions<RequestLocalizationOptions> localizationOptions,
IOptions<OAuth2AppSettings> oauth2SettingsContainer,
RoleManager<IdentityRole> roleManager,
UserManager<ApplicationUser> userManager,
IAuthorizationService authorizationService,
ILoggerFactory loggerFactory)
{
@ -320,7 +319,7 @@ namespace Yavsc
{
foreach (var c in db.Connections)
db.Connections.Remove(c);
db.SaveChanges("Startup");
db.SaveChanges();
}
});
@ -339,6 +338,7 @@ namespace Yavsc
ConfigureWorkflow(app, SiteSetup);
app.UseRequestLocalization(localizationOptions.Value, (RequestCulture) new RequestCulture((string)"fr"));
app.UseSession();
app.UseMvc(routes =>
{
routes.MapRoute(

View File

@ -4,9 +4,9 @@ using Microsoft.AspNet.Authorization;
namespace Yavsc.ViewModels.Auth.Handlers
{
using Models.Workflow;
public class CommandEditHandler : AuthorizationHandler<EditRequirement, BookQuery>
public class CommandEditHandler : AuthorizationHandler<EditRequirement, RdvQuery>
{
protected override void Handle(AuthorizationContext context, EditRequirement requirement, BookQuery resource)
protected override void Handle(AuthorizationContext context, EditRequirement requirement, RdvQuery resource)
{
if (context.User.IsInRole("FrontOffice"))
context.Succeed(requirement);

View File

@ -4,9 +4,9 @@ using Microsoft.AspNet.Authorization;
namespace Yavsc.ViewModels.Auth.Handlers
{
using Models.Workflow;
public class CommandViewHandler : AuthorizationHandler<ViewRequirement, BookQuery>
public class CommandViewHandler : AuthorizationHandler<ViewRequirement, RdvQuery>
{
protected override void Handle(AuthorizationContext context, ViewRequirement requirement, BookQuery resource)
protected override void Handle(AuthorizationContext context, ViewRequirement requirement, RdvQuery resource)
{
if (context.User.IsInRole("FrontOffice"))
context.Succeed(requirement);

View File

@ -0,0 +1,202 @@
@model Yavsc.Models.Haircut.BrusherProfile
@{
ViewData["Title"] = "Delete";
}
<h2>Delete</h2>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>BrusherProfile</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.CarePrice)
</dt>
<dd>
@Html.DisplayFor(model => model.CarePrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.EndOfTheDay)
</dt>
<dd>
@Html.DisplayFor(model => model.EndOfTheDay)
</dd>
<dt>
@Html.DisplayNameFor(model => model.HalfBalayagePrice)
</dt>
<dd>
@Html.DisplayFor(model => model.HalfBalayagePrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.HalfBrushingPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.HalfBrushingPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.HalfColorPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.HalfColorPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.HalfDefrisPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.HalfDefrisPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.HalfMechPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.HalfMechPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.HalfMultiColorPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.HalfMultiColorPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.HalfPermanentPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.HalfPermanentPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.KidCutPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.KidCutPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.LongBalayagePrice)
</dt>
<dd>
@Html.DisplayFor(model => model.LongBalayagePrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.LongBrushingPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.LongBrushingPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.LongColorPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.LongColorPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.LongDefrisPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.LongDefrisPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.LongMechPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.LongMechPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.LongMultiColorPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.LongMultiColorPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.LongPermanentPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.LongPermanentPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ManCutPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.ManCutPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ShampooPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.ShampooPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ShortBalayagePrice)
</dt>
<dd>
@Html.DisplayFor(model => model.ShortBalayagePrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ShortBrushingPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.ShortBrushingPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ShortColorPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.ShortColorPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ShortDefrisPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.ShortDefrisPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ShortMechPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.ShortMechPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ShortMultiColorPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.ShortMultiColorPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ShortPermanentPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.ShortPermanentPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.StartOfTheDay)
</dt>
<dd>
@Html.DisplayFor(model => model.StartOfTheDay)
</dd>
<dt>
@Html.DisplayNameFor(model => model.WomenHalfCutPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.WomenHalfCutPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.WomenLongCutPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.WomenLongCutPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.WomenShortCutPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.WomenShortCutPrice)
</dd>
</dl>
<form asp-action="Delete">
<div class="form-actions no-color">
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">@SR["Annuler"]</a>
</div>
</form>
</div>

View File

@ -0,0 +1,286 @@
@model Yavsc.Models.Haircut.BrusherProfile
@{
ViewData["Title"] = "Edit";
}
<h2>Edit</h2>
<form asp-action="Edit">
<div class="form-horizontal">
<h4>BrusherProfile</h4>
<hr />
<fieldset><legend>Disponibilité</legend>
<div class="form-group">
<label asp-for="StartOfTheDay" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="StartOfTheDay" class="form-control" />
<span asp-validation-for="StartOfTheDay" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="EndOfTheDay" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="EndOfTheDay" class="form-control" />
<span asp-validation-for="EndOfTheDay" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="ActionDistance" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="ActionDistance" class="form-control" />
<span asp-validation-for="ActionDistance" class="text-danger" />
</div>
</div>
</fieldset>
<fieldset><legend>Grille tarifaire</legend>
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="UserId" />
<div class="form-group">
<label asp-for="CarePrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="CarePrice" class="form-control" />
<span asp-validation-for="CarePrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="HalfBalayagePrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="HalfBalayagePrice" class="form-control" />
<span asp-validation-for="HalfBalayagePrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="HalfBrushingPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="HalfBrushingPrice" class="form-control" />
<span asp-validation-for="HalfBrushingPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="HalfColorPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="HalfColorPrice" class="form-control" />
<span asp-validation-for="HalfColorPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="HalfDefrisPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="HalfDefrisPrice" class="form-control" />
<span asp-validation-for="HalfDefrisPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="HalfMechPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="HalfMechPrice" class="form-control" />
<span asp-validation-for="HalfMechPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="HalfMultiColorPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="HalfMultiColorPrice" class="form-control" />
<span asp-validation-for="HalfMultiColorPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="HalfPermanentPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="HalfPermanentPrice" class="form-control" />
<span asp-validation-for="HalfPermanentPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="KidCutPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="KidCutPrice" class="form-control" />
<span asp-validation-for="KidCutPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="LongBalayagePrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="LongBalayagePrice" class="form-control" />
<span asp-validation-for="LongBalayagePrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="LongBrushingPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="LongBrushingPrice" class="form-control" />
<span asp-validation-for="LongBrushingPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="LongColorPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="LongColorPrice" class="form-control" />
<span asp-validation-for="LongColorPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="LongDefrisPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="LongDefrisPrice" class="form-control" />
<span asp-validation-for="LongDefrisPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="LongMechPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="LongMechPrice" class="form-control" />
<span asp-validation-for="LongMechPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="LongMultiColorPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="LongMultiColorPrice" class="form-control" />
<span asp-validation-for="LongMultiColorPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="LongPermanentPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="LongPermanentPrice" class="form-control" />
<span asp-validation-for="LongPermanentPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="ManCutPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="ManCutPrice" class="form-control" />
<span asp-validation-for="ManCutPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="ShampooPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="ShampooPrice" class="form-control" />
<span asp-validation-for="ShampooPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="ShortBalayagePrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="ShortBalayagePrice" class="form-control" />
<span asp-validation-for="ShortBalayagePrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="ShortBrushingPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="ShortBrushingPrice" class="form-control" />
<span asp-validation-for="ShortBrushingPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="ShortColorPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="ShortColorPrice" class="form-control" />
<span asp-validation-for="ShortColorPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="ShortDefrisPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="ShortDefrisPrice" class="form-control" />
<span asp-validation-for="ShortDefrisPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="ShortMechPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="ShortMechPrice" class="form-control" />
<span asp-validation-for="ShortMechPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="ShortMultiColorPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="ShortMultiColorPrice" class="form-control" />
<span asp-validation-for="ShortMultiColorPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="ShortPermanentPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="ShortPermanentPrice" class="form-control" />
<span asp-validation-for="ShortPermanentPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="WomenHalfCutPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="WomenHalfCutPrice" class="form-control" />
<span asp-validation-for="WomenHalfCutPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="WomenLongCutPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="WomenLongCutPrice" class="form-control" />
<span asp-validation-for="WomenLongCutPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="WomenShortCutPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="WomenShortCutPrice" class="form-control" />
<span asp-validation-for="WomenShortCutPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="ManBrushPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="ManBrushPrice" class="form-control" />
<span asp-validation-for="ManBrushPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="LongFoldingPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="LongFoldingPrice" class="form-control" />
<span asp-validation-for="LongFoldingPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="HalfFoldingPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="HalfFoldingPrice" class="form-control" />
<span asp-validation-for="HalfFoldingPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="ShortFoldingPrice" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="ShortFoldingPrice" class="form-control" />
<span asp-validation-for="ShortFoldingPrice" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="FlatFeeDiscount" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="FlatFeeDiscount" class="form-control" />
<span asp-validation-for="FlatFeeDiscount" class="text-danger" />
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Save" class="btn btn-default" />
</div>
</div>
</fieldset>
</div>
</form>
<div>
<a asp-action="Index">Annuler</a>
</div>

View File

@ -0,0 +1,356 @@
@model Yavsc.Models.Haircut.BrusherProfile
@{
ViewData["Title"] = "Profile coiffeur";
}
<h2>@ViewData["Title"]</h2>
<div>
<hr />
@if (Model!=null) {
<fieldset>
<legend>Disponibilités</legend>
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.EndOfTheDay)
</dt>
<dd>
@Html.Partial("HourFromMinutes", Model.EndOfTheDay)
</dd>
<dt>
@Html.DisplayNameFor(model => model.StartOfTheDay)
</dt>
<dd>
@Html.Partial("HourFromMinutes", Model.StartOfTheDay)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ActionDistance)
</dt>
<dd>
@Html.DisplayFor(model => model.ActionDistance)
</dd>
</dl>
</fieldset>
<fieldset>
<legend>Tarifs divers</legend>
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.ShampooPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.ShampooPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.CarePrice)
</dt>
<dd>
@Html.DisplayFor(model => model.CarePrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.FlatFeeDiscount)
</dt>
<dd>
@Html.DisplayFor(model => model.FlatFeeDiscount)
</dd>
</dl>
</fieldset>
<fieldset>
<legend>Tarifs balayages</legend>
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.LongBalayagePrice)
</dt>
<dd>
@Html.DisplayFor(model => model.LongBalayagePrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.HalfBalayagePrice)
</dt>
<dd>
@Html.DisplayFor(model => model.HalfBalayagePrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ShortBalayagePrice)
</dt>
<dd>
@Html.DisplayFor(model => model.ShortBalayagePrice)
</dd>
</dl>
</fieldset>
<fieldset>
<legend>Tarifs défrisage</legend>
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.HalfDefrisPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.HalfDefrisPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.LongDefrisPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.LongDefrisPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ShortDefrisPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.ShortDefrisPrice)
</dd>
</dl>
</fieldset>
<fieldset>
<legend>Tarifs mèches</legend>
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.HalfMechPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.HalfMechPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.LongMechPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.LongMechPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ShortMechPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.ShortMechPrice)
</dd>
</dl>
</fieldset>
<fieldset>
<legend>Tarifs coupes</legend>
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.WomenHalfCutPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.WomenHalfCutPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.WomenLongCutPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.WomenLongCutPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.WomenShortCutPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.WomenShortCutPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ManCutPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.ManCutPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.KidCutPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.KidCutPrice)
</dd>
</dl>
</fieldset>
<fieldset>
<legend>Tarifs couleurs</legend>
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.LongColorPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.LongColorPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.HalfColorPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.HalfColorPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ShortColorPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.ShortColorPrice)
</dd>
</dl>
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.ShortMultiColorPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.ShortMultiColorPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.HalfMultiColorPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.HalfMultiColorPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.LongMultiColorPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.LongMultiColorPrice)
</dd>
</dl>
</fieldset>
<fieldset>
<legend>Tarifs burshing</legend>
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.LongBrushingPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.LongBrushingPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.HalfBrushingPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.HalfBrushingPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ShortBrushingPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.ShortBrushingPrice)
</dd>
</dl>
</fieldset>
<fieldset>
<legend>Tarifs permanentes</legend>
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.LongPermanentPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.LongPermanentPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.HalfPermanentPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.HalfPermanentPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ShortPermanentPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.ShortPermanentPrice)
</dd>
</dl>
</fieldset>
<fieldset>
<legend>Tarifs mise en plis</legend>
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.LongFoldingPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.LongFoldingPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.HalfFoldingPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.HalfFoldingPrice)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ShortFoldingPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.ShortFoldingPrice)
</dd>
</dl>
</fieldset>
<fieldset>
<legend>Spécialités homme</legend>
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.ManBrushPrice)
</dt>
<dd>
@Html.DisplayFor(model => model.ManBrushPrice)
</dd>
</dl>
</fieldset>
}
else {
@SR["Aucun profile renseigné"]
}
</div>
<p>
<a asp-action="Edit" >@SR["Edit"]</a>
@if (Model!=null) {
<a asp-action="Delete" asp-route-id="@Model.UserId">@SR["Delete"]</a>
}
</p>

View File

@ -1,4 +1,4 @@
@model BookQuery
@model RdvQuery
@using Yavsc.Models.Google.Messaging
@{
ViewData["Title"] = SR["Command confirmation"]+" "+ViewBag.Activity.Name;

View File

@ -1,4 +1,4 @@
@model BookQuery
@model RdvQuery
@{ ViewData["Title"] = "Proposition de rendez-vous "+
@SR["to"]+" "+ Model.PerformerProfile.Performer.UserName
+" ["+SR[ViewBag.Activity.Code]+"]"; }
@ -21,10 +21,16 @@
}
</style>
}
@section scripts{
@section scripts {
<script>
$(document).ready(function () {
$('#datetimepicker2').datetimepicker({
locale: 'fr',
format: "YYYY/MM/DD HH:mm"
});
var config = {
mapId: 'map',
addrId: 'Location_Address',
@ -75,7 +81,6 @@
return true;
}
$('#EventDate').datepicker({ language: 'fr' });
$('#' + config.addrId).rules("add",
{
@ -112,6 +117,7 @@
}
});
});
</script>
}
<h2>@ViewData["Title"]</h2>
@ -137,14 +143,7 @@
</span>
</div>
</div>
<script type="text/javascript">
$(function () {
$('#datetimepicker2').datetimepicker({
locale: 'fr',
format: "YYYY/MM/DD hh:mm"
});
});
</script>
<span asp-validation-for="EventDate" class="text-danger">
</span>
</div>

View File

@ -1,4 +1,4 @@
@model BookQuery
@model RdvQuery
@{
ViewData["Title"] = "Delete";

View File

@ -1,4 +1,4 @@
@model BookQuery
@model RdvQuery
@{
ViewData["Title"] = @SR["Details"];

View File

@ -1,4 +1,4 @@
@model BookQuery
@model RdvQuery
@{
ViewData["Title"] = "Edit";

View File

@ -1,4 +1,4 @@
@model IEnumerable<BookQuery>
@model IEnumerable<RdvQuery>
@{
ViewData["Title"] = "Index";

View File

@ -18,9 +18,9 @@
</div>
</div>
<div class="form-group">
<label asp-for="Action" class="col-md-2 control-label"></label>
<label asp-for="ActionName" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="Action" asp-items="@ViewBag.Action" class ="form-control"></select>
<select asp-for="ActionName" asp-items="@ViewBag.ActionName" class ="form-control"></select>
</div>
</div>
<div class="form-group">

View File

@ -16,6 +16,12 @@
<dd>
@Html.DisplayFor(model => model.Title)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ActionName)
</dt>
<dd>
@Html.DisplayFor(model => model.ActionName)
</dd>
</dl>
</div>
<p>

View File

@ -17,20 +17,20 @@
<div class="col-md-10">
<select asp-for="ActivityCode" asp-items="@ViewBag.ActivityCode" class="form-control" >
</select>
<span asp-validation-for="ActivityCode" class="text-danger" />
<span asp-validation-for="ActivityCode" class="text-danger" ></span>
</div>
</div>
<div class="form-group">
<label asp-for="Action" class="col-md-2 control-label"></label>
<label asp-for="ActionName" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="Action" asp-items="@ViewBag.Action" class ="form-control"></select>
<select asp-for="ActionName" asp-items="@ViewBag.ActionName" class ="form-control"></select>
</div>
</div>
<div class="form-group">
<label asp-for="Title" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="Title" class="form-control" />
<span asp-validation-for="Title" class="text-danger" />
<span asp-validation-for="Title" class="text-danger" ></span>
</div>
</div>
<div class="form-group">

View File

@ -14,6 +14,9 @@
<th>
@Html.DisplayNameFor(model => model.Title)
</th>
<th>
@Html.DisplayNameFor(model => model.ActionName)
</th>
<th></th>
</tr>
@ -22,6 +25,9 @@
<td>
@Html.DisplayFor(modelItem => item.Title)
</td>
<td>
@Html.DisplayFor(modelItem => item.ActionName)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |

View File

@ -13,7 +13,7 @@
<dt>@SR["Activity"]</dt>
<dd> @Html.DisplayFor(m=>m.Does)
@if (ViewBag.HasConfigurableSettings) {
<a asp-controller="@ViewBag.SettingsClassControllerName" asp-action="Index" >
<a asp-controller="@ViewBag.SettingsControllerName" asp-action="Index" >
[@SR["Manage"] @SR[Model.Does.SettingsClassName]]
</a>
}

View File

@ -0,0 +1,18 @@
@model IEnumerable<PerformerProfile>
@{
ViewData["Title"] = "Les profiles - " + (ViewBag.Activity?.Name ?? SR["Any"]);
}
<h1>@ViewData["Title"]</h1>
<em>@ViewBag.Activity.Description</em>
@foreach (var profile in Model) {
<hr/>
@Html.DisplayFor(m=>profile)
<form asp-controller="HairCutCommand" asp-action="HairCut">
<input type="hidden" name="performerId" value="@profile.PerformerId" />
<input type="hidden" name="activityCode" value="@ViewBag.Activity.Code" />
<input type="submit" value="@SR["Proposer un rendez-vous à"] @profile.Performer.UserName"/>
</form>
}

View File

@ -1,13 +1,14 @@
@model IEnumerable<PerformerProfile>
@{
ViewData["Title"] = "Book - " + (ViewBag.Activity?.Name ?? SR["Any"]);
ViewData["Title"] = "Les profiles - " + (ViewBag.Activity?.Name ?? SR["Any"]);
}
<h1>@ViewData["Title"]</h1>
<em>@ViewBag.Activity.Description</em>
@foreach (var profile in Model) {
<hr/>
@Html.DisplayFor(m=>m)
@Html.DisplayFor(m=>profile)
<form action="~/Command/Create" >
<input type="hidden" name="id" value="@profile.PerformerId" />
<input type="hidden" name="activityCode" value="@ViewBag.Activity.Code" />

View File

@ -0,0 +1,27 @@
@model BrusherProfile
<script>
var tarifs =
[
{ 
cut: [ @Model.WomenLongCutPrice, @Model.WomenHalfCutPrice, @Model.WomenShortCutPrice ],
tech: [
[@Model.LongColorPrice, @Model.HalfColorPrice, @Model.ShortColorPrice],
[@Model.LongPermanentPrice, @Model.HalfPermanentPrice, @Model.ShortPermanentPrice],
[@Model.LongDefrisPrice, @Model.HalfDefrisPrice, @Model.ShortDefrisPrice],
[@Model.LongMechPrice, @Model.HalfMechPrice, @Model.ShortMechPrice],
[@Model.LongBalayagePrice, @Model.HalfBalayagePrice, @Model.ShortBalayagePrice],
],
brush: [@Model.LongBrushingPrice, @Model.HalfBrushingPrice, @Model.ShortBrushingPrice],
multicolor: [@Model.LongMultiColorPrice, @Model.HalfMultiColorPrice, @Model.ShortMultiColorPrice],
shampoo: @Model.ShampooPrice,
care: @Model.CarePrice
},
{ cut: [@Model.ManCutPrice], brush: [@Model.ManBrushPrice],
shampoo: @Model.ShampooPrice,
care: @Model.CarePrice },
{ cut: [@Model.KidCutPrice] ,
shampoo: @Model.ShampooPrice,
care: @Model.CarePrice }
];
</script>

View File

@ -0,0 +1,218 @@
@model HairCutQuery
@{ ViewData["Title"] = $"{ViewBag.Activity.Name}: Votre commande"; }
@await Html.PartialAsync("BrusherProfileScript",ViewData["PerfPrefs"])
@section scripts {
<script>
var gtarif=tarifs[0];
var cutprice;
var techprice;
var dressprice;
var total;
function displayTarif(dn,price)
{
$('#'+dn).html( price+"€" );
}
function updateTarif () {
var len = $('#Prestation_Length').prop('selectedIndex');
var gen = $("#Prestation_Gender").prop('selectedIndex');
var tech = $("#Prestation_Tech").prop('selectedIndex');
var dress = $("#Prestation_Dressing").prop('selectedIndex');
total = 0;
if ($('#Prestation_Cut').prop('checked')) {
var cutprice = (gen==0) ? gtarif.cut[len] : gtarif.cut[0];
total += cutprice;
displayTarif('CutPrice', cutprice);
} else displayTarif('CutPrice',0);
if (gen==0) {
if (tech>0) { 
var techprice = gtarif.tech[tech-1][len];
total += techprice;
displayTarif('TechPrice', techprice);
} else displayTarif('TechPrice',0);
if (dress>0) { 
var dressprice = gtarif.brush[dress-1];
total += dressprice;
displayTarif('DressPrice', dressprice);
} else displayTarif('DressPrice',0);
} else if (gen==1) {
if (dress>0) { total += gtarif.brush[0]; displayTarif('DressPrice', gtarif.brush[0]) }
else displayTarif('DressPrice',0);
}
if ($('#Prestation_Shampoo').prop('checked')) {
 total += gtarif.shampoo;
displayTarif('ShampooPrice', gtarif.shampoo);
} else displayTarif('ShampooPrice', 0);
if ($('#Prestation_Cares').prop('checked')) {
 total += gtarif.care;
displayTarif('CaresPrice', gtarif.care);
} else displayTarif('CaresPrice', 0);
$('.btn-submit').prop('disabled', (total==0));
$('#Total').html( total+"€" );
}
function onTarif(tarif)
{
gtarif = tarif;
updateTarif();
}
// pas de coupe => technique
$(document).ready(function () {
$("#Prestation_Tech").on("change", function (ev) {
var nv = $(this).val();
if (nv == 'Color' || nv == 'Mech') { $("#taintsfs").removeClass('hidden') }
else { $("#taintsfs").addClass('hidden') }
});
$("#Prestation_Gender").on("change", function(ev) {
var nv = $(this).val();
if(nv=='Women') {
onTarif(tarifs[0]);
$("#techfs").removeClass('hidden');
$("#lenfs").removeClass('hidden');
$('#Prestation_Cut').prop('disabled', false);
$('#optbrush').prop('disabled', false);
$('#optfold').prop('disabled', false);
}
else {
var cv = $('#Prestation_Dressing').val();
if (nv=='Man') {
$('#optfold').prop('disabled', true);
$('#optbrush').prop('disabled', false);
onTarif(tarifs[1]);
if (cv=='Folding') { $('#Prestation_Dressing').val('Coiffage'); }
}
if (nv=='Kid') { 
onTarif(tarifs[2]);
$('#optbrush').prop('disabled', true);
$('#optfold').prop('disabled', true);
if (cv=='Folding' || cv == 'Brushing') { $('#Prestation_Dressing').val('Coiffage'); }
}
$("#techfs").addClass('hidden');
$("#lenfs").addClass('hidden');
$('#Prestation_Cut').val(true);
$('#Prestation_Cut').prop('checked', true);
$('#Prestation_Cut').prop('disabled', true);
}
});
$(".imptarif").on("change", function(ev) {
updateTarif();
});
var curgen = $("#Prestation_Gender").val();
if (curgen=='Women') { 
gtarif=tarifs[0];
} else {
$("#techfs").addClass('hidden');
$("#lenfs").addClass('hidden');
if (curgen=='Man') { 
gtarif=tarifs[1];
} else gtarif=tarifs[2];
}
updateTarif();
});
</script>
}
<em>@ViewBag.Activity.Description</em>
<h2>@ViewData["Title"]</h2>
@Html.DisplayFor(m=>m.PerformerProfile)
<form asp-controller="HairCutCommand" asp-action="HairCut">
<div class="form-horizontal">
<hr />
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="Prestation.Gender" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="Prestation.Gender" asp-items="@ViewBag.Gender" class="form-control imptarif"></select>
<span asp-validation-for="Prestation.Gender" class="text-danger"></span>
</div>
</div>
<div class="form-group @ViewBag.TechClass" id="lenfs">
<label asp-for="Prestation.Length" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="Prestation.Length" asp-items="@ViewBag.HairLength" class="form-control imptarif"></select>
<span asp-validation-for="Prestation.Length" class="text-danger"></span>
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<div class="checkbox">
<input asp-for="Prestation.Cut" class="imptarif"/>
<label asp-for="Prestation.Cut"></label>
<span id="CutPrice" class="price"></span>
</div>
</div>
</div>
<div class="form-group @ViewBag.TechClass" id="techfs">
<label asp-for="Prestation.Tech" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="Prestation.Tech" asp-items="@ViewBag.HairTechnos" class="form-control imptarif"></select>
<span asp-validation-for="Prestation.Tech" class="text-danger"></span>
<div class="form-group @ViewBag.ColorsClass" id="taintsfs">
<label asp-for="Prestation.Taints" class="col-md-2 control-label"></label>
<div class="col-md-10">
@foreach (HairTaint color in ViewBag.HairTaints) {
<label>
<input type="checkbox" value="@color.Id" name="Prestation.Taints[]" class="imptarif"/>
@await Html.PartialAsync("HairTaint",color)
</label> }
<input type="hidden" asp-for="Prestation.Taints" />
<span asp-validation-for="Prestation.Taints" class="text-danger"></span>
</div>
</div>
<span id="TechPrice" class="price"></span>
</div>
</div>
<div class="form-group">
<label asp-for="Prestation.Dressing" asp-items="@ViewBag.Dressing" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select class="form-control imptarif" data-val="true" data-val-required="The Coiffage field is required." id="Prestation_Dressing" name="Prestation.Dressing">
<option selected="selected" value="Coiffage">Coiffage</option>
<option value="Brushing" id="optbrush">Brushing</option>
<option value="Folding" id="optfold">Mise en plis</option>
</select>
<span asp-validation-for="Prestation.Dressing" class="text-danger"></span>
<span id="DressPrice" class="price"></span>
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<div class="checkbox">
<input asp-for="Prestation.Shampoo" class="imptarif"/>
<label asp-for="Prestation.Shampoo"></label>
<span id="ShampooPrice" class="price"></span>
</div>
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<div class="checkbox">
<input asp-for="Prestation.Cares" class="imptarif"/>
<label asp-for="Prestation.Cares"></label>
<span id="CaresPrice" class="price"></span>
</div>
</div>
</div>
<span>Total: <span id="Total" class="total"></span>
</span>
<input type="submit" class="btn btn-success btn-submit" value="@SR["Validez ce choix, et prendre rendez-vous"] avec @Model.PerformerProfile.Performer.UserName, sans préciser ni lieu ni date (pour prendre rendez-vous la prise de contact)"/>
<input type="submit" class="btn btn-success btn-submit" value="@SR["Validez ce choix, et prendre rendez-vous"] avec @Model.PerformerProfile.Performer.UserName"/>
</div>
<input type="hidden" name="performerId" value="@Model.PerformerProfile.PerformerId" />
<input type="hidden" name="activityCode" value="@ViewBag.Activity.Code" />
</form>

View File

@ -0,0 +1,77 @@
@model Yavsc.Models.Haircut.HairPrestation
@{
ViewData["Title"] = "Create";
}
<h2>Create</h2>
<form asp-action="Create">
<div class="form-horizontal">
<h4>HairPrestation</h4>
<hr />
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<div class="checkbox">
<input asp-for="Cares" />
<label asp-for="Cares"></label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<div class="checkbox">
<input asp-for="Cut" />
<label asp-for="Cut"></label>
</div>
</div>
</div>
<div class="form-group">
<label asp-for="Dressing" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="Dressing" class="form-control"></select>
<span asp-validation-for="Dressing" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="Gender" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="Gender" class="form-control"></select>
<span asp-validation-for="Gender" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="Length" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="Length" class="form-control"></select>
<span asp-validation-for="Length" class="text-danger" />
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<div class="checkbox">
<input asp-for="Shampoo" />
<label asp-for="Shampoo"></label>
</div>
</div>
</div>
<div class="form-group">
<label asp-for="Tech" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="Tech" class="form-control"></select>
<span asp-validation-for="Tech" class="text-danger" />
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</div>
</div>
</form>
<div>
<a asp-action="Index">Back to List</a>
</div>

View File

@ -0,0 +1,64 @@
@model Yavsc.Models.Haircut.HairPrestation
@{
ViewData["Title"] = "Delete";
}
<h2>Delete</h2>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>HairPrestation</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Cares)
</dt>
<dd>
@Html.DisplayFor(model => model.Cares)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Cut)
</dt>
<dd>
@Html.DisplayFor(model => model.Cut)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Dressing)
</dt>
<dd>
@Html.DisplayFor(model => model.Dressing)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Gender)
</dt>
<dd>
@Html.DisplayFor(model => model.Gender)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Length)
</dt>
<dd>
@Html.DisplayFor(model => model.Length)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Shampoo)
</dt>
<dd>
@Html.DisplayFor(model => model.Shampoo)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Tech)
</dt>
<dd>
@Html.DisplayFor(model => model.Tech)
</dd>
</dl>
<form asp-action="Delete">
<div class="form-actions no-color">
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>
</div>
</form>
</div>

View File

@ -0,0 +1,60 @@
@model Yavsc.Models.Haircut.HairPrestation
@{
ViewData["Title"] = "Details";
}
<h2>Details</h2>
<div>
<h4>HairPrestation</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Cares)
</dt>
<dd>
@Html.DisplayFor(model => model.Cares)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Cut)
</dt>
<dd>
@Html.DisplayFor(model => model.Cut)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Dressing)
</dt>
<dd>
@Html.DisplayFor(model => model.Dressing)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Gender)
</dt>
<dd>
@Html.DisplayFor(model => model.Gender)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Length)
</dt>
<dd>
@Html.DisplayFor(model => model.Length)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Shampoo)
</dt>
<dd>
@Html.DisplayFor(model => model.Shampoo)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Tech)
</dt>
<dd>
@Html.DisplayFor(model => model.Tech)
</dd>
</dl>
</div>
<p>
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
<a asp-action="Index">Back to List</a>
</p>

View File

@ -0,0 +1,78 @@
@model Yavsc.Models.Haircut.HairPrestation
@{
ViewData["Title"] = "Edit";
}
<h2>Edit</h2>
<form asp-action="Edit">
<div class="form-horizontal">
<h4>HairPrestation</h4>
<hr />
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="Id" />
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<div class="checkbox">
<input asp-for="Cares" />
<label asp-for="Cares"></label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<div class="checkbox">
<input asp-for="Cut" />
<label asp-for="Cut"></label>
</div>
</div>
</div>
<div class="form-group">
<label asp-for="Dressing" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="Dressing" class="form-control"></select>
<span asp-validation-for="Dressing" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="Gender" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="Gender" class="form-control"></select>
<span asp-validation-for="Gender" class="text-danger" />
</div>
</div>
<div class="form-group">
<label asp-for="Length" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="Length" class="form-control"></select>
<span asp-validation-for="Length" class="text-danger" />
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<div class="checkbox">
<input asp-for="Shampoo" />
<label asp-for="Shampoo"></label>
</div>
</div>
</div>
<div class="form-group">
<label asp-for="Tech" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="Tech" class="form-control"></select>
<span asp-validation-for="Tech" class="text-danger" />
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<input type="submit" value="Save" class="btn btn-default" />
</div>
</div>
</div>
</form>
<div>
<a asp-action="Index">Back to List</a>
</div>

View File

@ -0,0 +1,68 @@
@model IEnumerable<Yavsc.Models.Haircut.HairPrestation>
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.Cares)
</th>
<th>
@Html.DisplayNameFor(model => model.Cut)
</th>
<th>
@Html.DisplayNameFor(model => model.Dressing)
</th>
<th>
@Html.DisplayNameFor(model => model.Gender)
</th>
<th>
@Html.DisplayNameFor(model => model.Length)
</th>
<th>
@Html.DisplayNameFor(model => model.Shampoo)
</th>
<th>
@Html.DisplayNameFor(model => model.Tech)
</th>
<th></th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Cares)
</td>
<td>
@Html.DisplayFor(modelItem => item.Cut)
</td>
<td>
@Html.DisplayFor(modelItem => item.Dressing)
</td>
<td>
@Html.DisplayFor(modelItem => item.Gender)
</td>
<td>
@Html.DisplayFor(modelItem => item.Length)
</td>
<td>
@Html.DisplayFor(modelItem => item.Shampoo)
</td>
<td>
@Html.DisplayFor(modelItem => item.Tech)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
</td>
</tr>
}
</table>

View File

@ -2,8 +2,7 @@
ViewData["Title"] = @SR["About"]+" "+@SiteSettings.Value.Title;
}
<h1>@ViewData["Title"]</h1>
<em>@SiteSettings.Value.Slogan</em>
<environment names="ZicMoove">
<markdown>
@ -90,3 +89,33 @@ et programme la suppression complète de ces dites informations dans les quinze
L'opération est annulable, jusqu'à deux semaines après sa programmation.
</markdown>
</environment>
<environment names="Lua">
<markdown>
C'est mon site pérso.
--
Paul,
publiant lua.p schneider.fr
</markdown>
</environment>
<environment names="Yavsc">
<markdown>
Yet Another Very Small Company ...
</markdown>
</environment>
<environment names="YavscPre">
<markdown>
Yet Another Very Small Company : La pré-production
</markdown>
</environment>
<environment names="Dev">
<markdown>
Site du développeur
</markdown>
</environment>

View File

@ -1,3 +1,5 @@
@model IEnumerable<Activity>
@{
ViewData["Title"] = "Home Page";
}
@ -29,7 +31,7 @@
@if (act.Children.Count>0) {
<p><em>@act.Name</em><br/>
@act.Description </p>
<a asp-route-id="@act.Code">
<a asp-route-id="@act.Code" class="btn btn-default">
@foreach (Activity c in act.Children) {
@if (!c.Hidden) { @Html.DisplayFor(subact=>c) }
}
@ -41,9 +43,9 @@
}
@foreach (var form in act.Forms) {
<a class="btn btn-default" asp-controller="FrontOffice" asp-action="@form.Action" asp-route-id="@act.Code">
@form.Title
@foreach (var frm in act.Forms) {
<a class="btn btn-success" asp-controller="FrontOffice" asp-action="@frm.ActionName" asp-route-id="@act.Code">
@frm.Title
</a>
}
</div>

View File

@ -41,8 +41,8 @@
var pos = loc.geometry.location;
var lat = new Number(pos.lat);
var lng = new Number(pos.lng);
$('#'+config.latId).val(lat.toLocaleString('en'));
$('#'+config.longId).val(lng.toLocaleString('en'));
$('#'+config.latId).val(lat.toLocaleString('fr'));
$('#'+config.longId).val(lng.toLocaleString('fr'));
gmap.setCenter(pos);
if (marker) { 
marker.setMap(null);

View File

@ -1,4 +1,4 @@
@model BookQuery
@model RdvQuery
<dl class="dl-horizontal">

View File

@ -5,14 +5,8 @@
<ul>
<li> @SR["Rating"]: @Model.Rate % </li>
@if (Model.MinDailyCost != null) {
<li>@SR["MinDailyCost"]: @Model.MinDailyCost&euro;</li>
}
@if (Model.MinDailyCost != null) {
<li>@SR["MaxDailyCost"]: @Model.MaxDailyCost&euro;</li>
}
@if (Model.WebSite!=null) {
<li>@SR["WebSite"]: @Model.WebSite</li>
<li>@SR["WebSite"]: <a target="yaext" href="@Model.WebSite">@Model.WebSite</a></li>
}
</ul>

View File

@ -0,0 +1,2 @@
@model HairTaint
@Html.DisplayFor(m=>m.Color) (@Model.Brand)

View File

@ -0,0 +1,2 @@
@model int
@((Model/60).ToString("00")):@((Model%60).ToString("00"))

View File

@ -1,16 +1,18 @@
@model IEnumerable<PerformerProfile>
@{
ViewData["Title"] = "Book - " + (ViewBag.Activity?.Name ?? SR["Any"]);
ViewData["Title"] = "Les profiles - " + (ViewBag.Activity?.Name ?? SR["Any"]);
}
<h1>@ViewData["Title"]</h1>
<em>@ViewBag.Activity.Description</em>
@foreach (var profile in Model) {
<hr/>
@Html.DisplayFor(m=>m)
<form action="~/Command/HArts" >
<form action="~/Command/Create" >
<input type="hidden" name="id" value="@profile.PerformerId" />
<input type="hidden" name="activityCode" value="@ViewBag.Activity.Code" />
<input type="submit" value="@SR["Prennez un rendez-vous avec"] @profile.Performer.UserName"/>
<input type="submit" value="@SR["Proposer un rendez-vous à"] @profile.Performer.UserName"/>
</form>
}

View File

@ -100,11 +100,13 @@ nav {
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div
<div style="float:right;"
data-ref="ZicMoove"
class="fb-like"
data-share="true"
data-width="450"
data-show-faces="true">
data-width="200"
data-show-faces="true"
data-colorscheme="dark">
</div>
<p>Yavsc - Copyright &copy; 2016 - 2017 Paul Schneider</p>
</footer>

View File

@ -21,6 +21,7 @@
@using Yavsc.Models.Workflow;
@using Yavsc.Models.Relationship
@using Yavsc.Models.Drawing;
@using Yavsc.Models.Haircut;
@using Yavsc.ViewModels.Account;
@using Yavsc.ViewModels.Manage;
@ -28,7 +29,7 @@
@using Yavsc.ViewModels.Auth;
@using Yavsc.ViewModels.Administration;
@using Yavsc.ViewModels.Relationship;
@inject IViewLocalizer LocString
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"
@addTagHelper "*, Yavsc"

View File

@ -81,6 +81,7 @@
"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",

File diff suppressed because it is too large Load Diff

View File

@ -3011,7 +3011,8 @@ select[multiple].input-lg {
font-weight: normal;
line-height: 1.42857143;
text-align: center;
white-space: nowrap;
white-space: normal;
max-width: 100%;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
@ -3194,25 +3195,25 @@ fieldset[disabled] .btn-primary.active {
}
.btn-success {
color: #fff;
background-color: #5cb85c;
background-color: #255625;
border-color: #4cae4c;
}
.btn-success:focus,
.btn-success.focus {
color: #fff;
background-color: #449d44;
background-color: #2b8a2b;
border-color: #255625;
}
.btn-success:hover {
color: #fff;
background-color: #449d44;
background-color: #2b8a2b;
border-color: #398439;
}
.btn-success:active,
.btn-success.active,
.open > .dropdown-toggle.btn-success {
color: #fff;
background-color: #449d44;
background-color: #2b8a2b;
border-color: #398439;
}
.btn-success:active:hover,
@ -5118,9 +5119,9 @@ a.thumbnail.active {
color: #2b542c;
}
.alert-info {
color: #31708f;
background-color: #d9edf7;
border-color: #bce8f1;
color: #f4ebc9;
background-color: #1d698f;
border-color: #0a4563;
}
.alert-info hr {
border-top-color: #a6e1ec;
@ -6059,8 +6060,7 @@ button.close {
white-space: normal;
filter: alpha(opacity=0);
opacity: 0;
line-break: auto;
line-break: auto; /* experimental */
}
.tooltip.in {
filter: alpha(opacity=90);
@ -6184,8 +6184,7 @@ button.close {
border-radius: 6px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
line-break: auto;
line-break: auto; /* experimental */
}
.popover.top {
margin-top: -10px;

View File

@ -7,6 +7,27 @@ body {
color:#999;
}
h1,h2,h3{color:#fff;}
.price {
font-weight: bold;
font-size: x-large;
color: #fff;
border: solid white 1px;
border-radius: 1em;
padding: .2em;
margin: .2em;
}
.total {
font-weight: bold;
font-size: xx-large;
color: #fff;
background-color: #1f1c58;
border: solid white 1px;
border-radius: 1em;
padding: .2em;
margin: .2em;
}
.blog {
padding: 1em;
}
@ -109,11 +130,11 @@ a:hover {
.carousel-indicators {
position: absolute;
z-index: 15;
padding-left: 0;
padding: 0;
text-align: center;
list-style: none;
bottom: 1em;
top: initial;
top: .1em;
height: 1em;
}
@-webkit-keyframes mymove {

Some files were not shown because too many files have changed in this diff Show More