Merge branch 'vnext' of https://github.com/pazof/yavsc into vnext

* 'vnext' of https://github.com/pazof/yavsc: (77 commits)
  displays localized
  make it cross platform
  cleans the code
  hair taints command in db
  EF7 Notimplemented [WA]
  [MEF]
  discount
  a basket
  carousel plus lisible
  ajoute deux info
  initial import: a gtk app
  show hidden with grey background
  hide indicators
  hair cut queries by API
  refactoring
  refabrique
  ya workspace
  code made simpler
  ...
  trying to use msbuild
  ...
main
Paul Schneider 9 years ago
commit 3d1a770add
217 changed files with 17835 additions and 1513 deletions

@ -0,0 +1,23 @@
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module"
},
"rules": {
"no-const-assign": "warn",
"no-this-before-super": "warn",
"no-undef": "warn",
"no-unreachable": "warn",
"no-unused-vars": "warn",
"constructor-super": "warn",
"valid-typeof": "warn"
}
}

@ -0,0 +1,131 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
y="0px"
x="0px"
viewBox="0 0 947 765"
id="svg2"
inkscape:version="0.48.5 r10040"
width="100%"
height="100%"
sodipodi:docname="shoppingcart.svg">
<defs
id="defs21" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1331"
inkscape:window-height="946"
id="namedview19"
showgrid="false"
inkscape:zoom="0.921875"
inkscape:cx="419.6344"
inkscape:cy="324.12273"
inkscape:window-x="0"
inkscape:window-y="44"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<g
id="g3011">
<path
sodipodi:nodetypes="ccccc"
d="m 0,0 0,765 947,0 0,-765 z"
id="path5"
inkscape:connector-curvature="0"
style="fill:#343434" />
</g>
<g
id="g3004">
<g
id="g3014"
transform="matrix(1.5062492,0,0,1.2737607,-317.8928,-111.80805)">
<path
style="fill:#e0e0e0"
inkscape:connector-curvature="0"
id="path7"
d="m 307,539 0,25 394,0 0,-25 z"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#e0e0e0"
inkscape:connector-curvature="0"
id="path9"
d="m 307,651 c -30.93,0 -56,-25.07 -56,-56 0,-30.93 25.07,-56 56,-56 30.93,0 56,25.07 56,56 0,30.93 -25.07,56 -56,56 z m -1,-28 c 16.02,0 29,-12.98 29,-29 0,-16.02 -12.98,-29 -29,-29 -16.02,0 -29,12.98 -29,29 0,16.02 12.98,29 29,29 z"
sodipodi:nodetypes="ssssssssss" />
<path
style="fill:#e0e0e0"
inkscape:connector-curvature="0"
id="path11"
d="m 697,651 c -30.93,0 -56,-25.07 -56,-56 0,-30.93 25.07,-56 56,-56 30.93,0 56,25.07 56,56 0,30.93 -25.07,56 -56,56 z m -1,-28 c 16.02,0 29,-12.98 29,-29 0,-16.02 -12.98,-29 -29,-29 -16.02,0 -29,12.98 -29,29 0,16.02 12.98,29 29,29 z"
sodipodi:nodetypes="ssssssssss" />
<path
style="fill:#ffffff"
inkscape:connector-curvature="0"
id="path13"
d="m 699.46051,292.57627 c 19.11602,3.06393 42.26112,40.55101 42.37,46.4 L 744,455.52 c 0.40742,21.88621 -11.84,39.01 -11.84,39.01 0,0 -9.29,15.47 -30.43,15.47 L 334,510 334,234 z M 362,267 l 0,211 28,0 2.16949,-200.15254 z M 420.57627,283.27119 417.32203,478 l 45.35594,0 -1.08475,-188.22034 z M 486.20339,294.66102 482.94915,478 l 42.64407,0.54237 2.16949,-177.37288 z m 64,8.67796 1.62712,175.20339 37.76271,0 -3.25424,-172.49152 z m 58.11865,5.42374 3.7966,169.23728 43.18644,1.08475 10e-6,-162.18644 z M 681,322.32204 681,478 l 28,0 -2.16949,-152.42373 z"
sodipodi:nodetypes="ssscsccscccccccccccccccccccccccccccccc" />
<path
style="fill:#e0e0e0"
inkscape:connector-curvature="0"
id="path15"
d="M 229.49153,196.47458 301,234 l 0,316 33,0 0,-338.44 -79.55932,-45.72949 z"
sodipodi:nodetypes="ccccccc" />
</g>
</g>
<metadata
id="metadata17">
<rdf:RDF>
<cc:Work>
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<cc:license
rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
<dc:publisher>
<cc:Agent
rdf:about="http://openclipart.org/">
<dc:title>Openclipart</dc:title>
</cc:Agent>
</dc:publisher>
<dc:title></dc:title>
<dc:date>2013-07-02T06:51:00</dc:date>
<dc:description>A shopping cart graphic</dc:description>
<dc:source>https://openclipart.org/detail/179939/shopping-cart-by-petersirka-179939</dc:source>
<dc:creator>
<cc:Agent>
<dc:title>petersirka</dc:title>
</cc:Agent>
</dc:creator>
<dc:subject>
<rdf:Bag>
<rdf:li>basket</rdf:li>
<rdf:li>cart</rdf:li>
<rdf:li>eshop</rdf:li>
<rdf:li>shopping</rdf:li>
</rdf:Bag>
</dc:subject>
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/publicdomain/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
</cc:License>
</rdf:RDF>
</metadata>
</svg>

After

Width:  |  Height:  |  Size: 4.9 KiB

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{07B9A14B-2D22-4B97-A63C-12B77A7DBB4F}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>CrossZicMoove.Desktop</RootNamespace>
<AssemblyName>CrossZicMoove.Desktop</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Eto">
<HintPath>..\..\..\.config\NuGet\packages\Eto.Forms.2.2.0\lib\net45\Eto.dll</HintPath>
</Reference>
<Reference Include="Eto.Gtk2">
<HintPath>..\..\..\.config\NuGet\packages\Eto.Platform.Gtk.2.2.0\lib\net45\Eto.Gtk2.dll</HintPath>
</Reference>
<Reference Include="Eto.Gtk3">
<HintPath>..\..\..\.config\NuGet\packages\Eto.Platform.Gtk3.2.2.0\lib\net45\Eto.Gtk3.dll</HintPath>
</Reference>
<Reference Include="Eto.WinForms">
<HintPath>..\..\..\.config\NuGet\packages\Eto.Platform.Windows.2.2.0\lib\net45\Eto.WinForms.dll</HintPath>
</Reference>
<Reference Include="Eto.Wpf">
<HintPath>..\..\..\.config\NuGet\packages\Eto.Platform.Wpf.2.2.0\lib\net45\Eto.Wpf.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\CrossZicMoove\CrossZicMoove.csproj">
<Project>{3E5584DB-F061-4E7F-B78B-E1830D16E529}</Project>
<Name>CrossZicMoove</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
</Project>

@ -0,0 +1,15 @@
using System;
using Eto;
using Eto.Forms;
namespace CrossZicMoove.Desktop
{
public class Program
{
[STAThread]
public static void Main (string[] args)
{
new Application (Platform.Detect).Run (new MainForm ());
}
}
}

@ -0,0 +1,27 @@
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle ("CrossZicMoove.Desktop")]
[assembly: AssemblyDescription ("")]
[assembly: AssemblyConfiguration ("")]
[assembly: AssemblyCompany ("")]
[assembly: AssemblyProduct ("")]
[assembly: AssemblyCopyright ("Paul Schneider")]
[assembly: AssemblyTrademark ("")]
[assembly: AssemblyCulture ("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion ("1.0.*")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Eto.Forms" version="2.2.0" targetFramework="net45" />
<package id="Eto.Platform.Gtk" version="2.2.0" targetFramework="net45" />
<package id="Eto.Platform.Gtk3" version="2.2.0" targetFramework="net45" />
<package id="Eto.Platform.Windows" version="2.2.0" targetFramework="net45" />
<package id="Eto.Platform.Wpf" version="2.2.0" targetFramework="net45" />
</packages>

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{3E5584DB-F061-4E7F-B78B-E1830D16E529}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>CrossZicMoove</RootNamespace>
<AssemblyName>CrossZicMoove</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="MainForm.xeto.cs">
<DependentUpon>MainForm.xeto</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="MainForm.xeto" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
<Reference Include="Eto">
<HintPath>..\..\..\.config\NuGet\packages\Eto.Forms.2.2.0\lib\net45\Eto.dll</HintPath>
</Reference>
<Reference Include="Portable.Xaml">
<HintPath>..\..\..\.config\NuGet\packages\Portable.Xaml.0.6.1\lib\portable-net45+win+wpa81+wp80+MonoAndroid10+xamarinios10+MonoTouch10\Portable.Xaml.dll</HintPath>
</Reference>
<Reference Include="Eto.Serialization.Xaml">
<HintPath>..\..\..\.config\NuGet\packages\Eto.Serialization.Xaml.2.2.0\lib\net45\Eto.Serialization.Xaml.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\YavscLib\YavscLib.csproj">
<Project>{67F9D3A8-F71E-4428-913F-C37AE82CDB24}</Project>
<Name>YavscLib</Name>
</ProjectReference>
</ItemGroup>
</Project>

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<Form xmlns="http://schema.picoe.ca/eto.forms" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="My Eto Form" ClientSize="400, 350">
<StackLayout>
<Label>Some Content</Label>
</StackLayout>
<Form.Menu>
<MenuBar>
<ButtonMenuItem Text="F&amp;ile">
<ButtonMenuItem Text="Click Me!" Click="HandleClickMe" />
</ButtonMenuItem>
<MenuBar.ApplicationItems>
<ButtonMenuItem Text="Preferences.." Shortcut="{On Control+O, Mac=Application+Comma}" />
</MenuBar.ApplicationItems>
<MenuBar.QuitItem>
<ButtonMenuItem Text="Quit!" Shortcut="CommonModifier+Q" Click="HandleQuit" />
</MenuBar.QuitItem>
</MenuBar>
</Form.Menu>
<Form.ToolBar>
<ToolBar>
<ButtonToolItem Text="Click Me!" Click="HandleClickMe" />
</ToolBar>
</Form.ToolBar>
</Form>

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using Eto.Forms;
using Eto.Drawing;
using Eto.Serialization.Xaml;
namespace CrossZicMoove
{
public class MainForm : Form
{
public MainForm ()
{
XamlReader.Load (this);
}
protected void HandleClickMe (object sender, EventArgs e)
{
MessageBox.Show ("I was clicked!");
}
protected void HandleQuit (object sender, EventArgs e)
{
Application.Instance.Quit ();
}
}
}

@ -0,0 +1,27 @@
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle ("CrossZicMoove")]
[assembly: AssemblyDescription ("")]
[assembly: AssemblyConfiguration ("")]
[assembly: AssemblyCompany ("")]
[assembly: AssemblyProduct ("")]
[assembly: AssemblyCopyright ("Paul Schneider")]
[assembly: AssemblyTrademark ("")]
[assembly: AssemblyCulture ("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion ("1.0.*")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Eto.Forms" version="2.2.0" targetFramework="net45" />
<package id="Eto.Serialization.Xaml" version="2.2.0" targetFramework="net45" />
<package id="Portable.Xaml" version="0.6.1" targetFramework="net45" />
</packages>

@ -2,7 +2,7 @@
C'est une application mettant en oeuvre une prise de contact entre un demandeur de services et son éventuel préstataire associé. C'est une application mettant en oeuvre une prise de contact entre un demandeur de services et son éventuel préstataire associé.
## Fonctionalités ## Fonctionalités
Elle est censée aboutir à une prise commande, Elle est censée aboutir à une prise commande,
un payement du client, à une collecte du retour du client, et à un paiement du prestataire de services. un payement du client, à une collecte du retour du client, et à un paiement du prestataire de services.
@ -17,12 +17,12 @@ du client comme du prestataire.
Ni le client ni le prestataire ne sont anonymes pour l'applications, Ni le client ni le prestataire ne sont anonymes pour l'applications,
il sont même formellement authentifies par l'acquitement d'une première il sont même formellement authentifies par l'acquitement d'une première
facturation en ligne, à l'occasion facturation en ligne, à l'occasion
* pour le client, de son acquisition de points contact. * pour le client, de son acquisition de points contact.
* pour le prestataire, de la validation de son profile proféssionnel, qui implique l'acquitement * pour le prestataire, de la validation de son profile proféssionnel, qui implique l'acquitement
de son adhésion forfaitaire. de son adhésion forfaitaire.
## Limitations ## Limitations
Elle ne prendra pas en charge, du moins pas encore, ni la saisie de structures de projets complexes, ni ticketing associé à la prestation. Elle ne prendra pas en charge, du moins pas encore, ni la saisie de structures de projets complexes, ni ticketing associé à la prestation.

@ -0,0 +1,9 @@
using System;
class YaDaemon
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}

@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.1</TargetFramework>
</PropertyGroup>
</Project>

@ -0,0 +1,5 @@
{
"sdk": {
"version": "1.0.0-rc4-004771"
}
}

@ -61,7 +61,7 @@ public class GCMController : Controller
var latestActivityUpdate = _context.Activities.Max(a=>a.DateModified); var latestActivityUpdate = _context.Activities.Max(a=>a.DateModified);
return Json(new { return Json(new {
IsAnUpdate = deviceAlreadyRegistered, IsAnUpdate = deviceAlreadyRegistered,
UpdateActivities = latestActivityUpdate > declaration.LatestActivityUpdate UpdateActivities = (latestActivityUpdate != declaration.LatestActivityUpdate)
}); });
} }
return new BadRequestObjectResult(ModelState); return new BadRequestObjectResult(ModelState);

@ -0,0 +1,76 @@
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Mvc;
using Microsoft.Extensions.OptionsModel;
using Microsoft.Extensions.Localization;
namespace Yavsc.ApiControllers
{
using YavscLib;
using System;
using System.Linq;
using System.Security.Claims;
using Microsoft.Extensions.Logging;
using Models;
using Services;
using Yavsc.Models.Haircut;
using Yavsc.Resources;
[Route("api/haircut")]
public class HairCutController : Controller
{
private ApplicationDbContext _context;
private IEmailSender _emailSender;
private IGoogleCloudMessageSender _GCMSender;
private GoogleAuthSettings _googleSettings;
private IStringLocalizer<YavscLocalisation> _localizer;
private ILogger _logger;
private SiteSettings _siteSettings;
private SmtpSettings _smtpSettings;
private UserManager<ApplicationUser> _userManager;
public HairCutController(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)
{
_context = context;
_GCMSender = GCMSender;
_emailSender = emailSender;
_googleSettings = googleSettings.Value;
_userManager = userManager;
_smtpSettings = smtpSettings.Value;
_siteSettings = siteSettings.Value;
_localizer = localizer;
_logger = loggerFactory.CreateLogger<HairCutController>();
}
public IActionResult Index()
{
var uid = User.GetUserId();
var now = DateTime.Now;
var result = _context.HairCutQueries.Where(
q=>q.ClientId == uid
&& q.EventDate > now
&& q.Status == QueryStatus.Inserted
);
return Ok(result);
}
[HttpPost]
public IActionResult PostQuery (HairCutQuery query )
{
var uid = User.GetUserId();
if (!ModelState.IsValid) {
return new BadRequestObjectResult(ModelState);
}
_context.HairCutQueries.Add(query);
_context.Update(uid);
return Ok();
}
}
}

@ -0,0 +1,174 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc;
using Microsoft.Data.Entity;
using Yavsc.Models;
using Yavsc.Models.Haircut;
using Yavsc.Models.Haircut.Views;
namespace Yavsc.Controllers
{
[Produces("application/json")]
[Route("api/haircutquery")]
public class HairCutQueriesApiController : Controller
{
private ApplicationDbContext _context;
public HairCutQueriesApiController(ApplicationDbContext context)
{
_context = context;
}
// GET: api/HairCutQueriesApi
// Get the queries for current
// user as a client
// To get active queries
[HttpGet]
public async Task<IActionResult> GetHairCutQueries()
{
IEnumerable<HaircutQueryClientInfo> info = null;
await Task.Run(
() =>
{
var bi = DateTime.Now.AddDays(-15);
var uid = User.GetUserId();
var dat = _context.HairCutQueries
.Include(q => q.Prestation)
.Include(q => q.Client)
.Include(q => q.PerformerProfile)
.Include(q => q.Location)
.Where(q => q.ClientId == uid
&& (q.EventDate == null || q.EventDate > bi))
;
info = dat.ToArray().Select(q => new HaircutQueryClientInfo(q));
});
return Ok(info);
}
// GET: api/HairCutQueriesApi/5
[HttpGet("{id}", Name = "GetHairCutQuery")]
public async Task<IActionResult> GetHairCutQuery([FromRoute] long id)
{
if (!ModelState.IsValid)
{
return HttpBadRequest(ModelState);
}
HairCutQuery hairCutQuery = await _context.HairCutQueries.SingleAsync(m => m.Id == id);
if (hairCutQuery == null)
{
return HttpNotFound();
}
return Ok(hairCutQuery);
}
// PUT: api/HairCutQueriesApi/5
[HttpPut("{id}")]
public async Task<IActionResult> PutHairCutQuery([FromRoute] long id, [FromBody] HairCutQuery hairCutQuery)
{
if (!ModelState.IsValid)
{
return HttpBadRequest(ModelState);
}
if (id != hairCutQuery.Id)
{
return HttpBadRequest();
}
_context.Entry(hairCutQuery).State = EntityState.Modified;
try
{
await _context.SaveChangesAsync();
}
catch (DbUpdateConcurrencyException)
{
if (!HairCutQueryExists(id))
{
return HttpNotFound();
}
else
{
throw;
}
}
return new HttpStatusCodeResult(StatusCodes.Status204NoContent);
}
// POST: api/HairCutQueriesApi
[HttpPost]
public async Task<IActionResult> PostHairCutQuery([FromBody] HairCutQuery hairCutQuery)
{
if (!ModelState.IsValid)
{
return HttpBadRequest(ModelState);
}
_context.HairCutQueries.Add(hairCutQuery);
try
{
await _context.SaveChangesAsync();
}
catch (DbUpdateException)
{
if (HairCutQueryExists(hairCutQuery.Id))
{
return new HttpStatusCodeResult(StatusCodes.Status409Conflict);
}
else
{
throw;
}
}
return CreatedAtRoute("GetHairCutQuery", new { id = hairCutQuery.Id }, hairCutQuery);
}
// DELETE: api/HairCutQueriesApi/5
[HttpDelete("{id}")]
public async Task<IActionResult> DeleteHairCutQuery([FromRoute] long id)
{
if (!ModelState.IsValid)
{
return HttpBadRequest(ModelState);
}
HairCutQuery hairCutQuery = await _context.HairCutQueries.SingleAsync(m => m.Id == id);
if (hairCutQuery == null)
{
return HttpNotFound();
}
_context.HairCutQueries.Remove(hairCutQuery);
await _context.SaveChangesAsync();
return Ok(hairCutQuery);
}
protected override void Dispose(bool disposing)
{
if (disposing)
{
_context.Dispose();
}
base.Dispose(disposing);
}
private bool HairCutQueryExists(long id)
{
return _context.HairCutQueries.Count(e => e.Id == id) > 0;
}
}
}

@ -2,23 +2,23 @@ using System.IO;
using Microsoft.AspNet.Authorization; using Microsoft.AspNet.Authorization;
using Microsoft.AspNet.Mvc; using Microsoft.AspNet.Mvc;
using System.Web.Routing; using System.Web.Routing;
namespace Yavsc.ApiControllers
{
using Models;
using Helpers;
using System.Linq; using System.Linq;
using Microsoft.Data.Entity; using Microsoft.Data.Entity;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using System;
using System.Security.Claims;
using Microsoft.Extensions.Localization; using Microsoft.Extensions.Localization;
using Yavsc.Services;
using Yavsc.Models.Messaging;
using Yavsc.ViewModels;
using Microsoft.Extensions.OptionsModel; using Microsoft.Extensions.OptionsModel;
using System;
using System.Security.Claims;
namespace Yavsc.ApiControllers
{
using Models;
using Helpers;
using Services;
using Models.Messaging;
using ViewModels.Auth;
[Route("api/pdfestimate"), Authorize] [Route("api/pdfestimate"), Authorize]
public class PdfEstimateController : Controller public class PdfEstimateController : Controller
{ {

@ -8,7 +8,8 @@ namespace Yavsc
CompanyClaimType = "https://schemas.pschneider.fr/identity/claims/Company", CompanyClaimType = "https://schemas.pschneider.fr/identity/claims/Company",
UserNameRegExp = @"^[a-zA-Z][a-zA-Z0-9 ]*$", UserNameRegExp = @"^[a-zA-Z][a-zA-Z0-9 ]*$",
AuthorizePath = "~/authorize", AuthorizePath = "~/authorize",
TokenPath = "~/token", LoginPath = "~/signin", TokenPath = "~/token",
LoginPath = "~/signin",
LogoutPath = "~/signout", UserInfoPath = "~/api/me", LogoutPath = "~/signout", UserInfoPath = "~/api/me",
ApplicationAuthenticationSheme = "ServerCookie", ApplicationAuthenticationSheme = "ServerCookie",
ExternalAuthenticationSheme= "ExternalCookie", ExternalAuthenticationSheme= "ExternalCookie",
@ -42,6 +43,7 @@ namespace Yavsc
new Scope { Id = "frontoffice" , Description ="Your front office interface" } new Scope { Id = "frontoffice" , Description ="Your front office interface" }
}; };
public const string SshHeaderKey = "SSH";
private static readonly string[] GoogleScopes = { "openid", "profile", "email" }; private static readonly string[] GoogleScopes = { "openid", "profile", "email" };
public static readonly string[] GoogleCalendarScopes = public static readonly string[] GoogleCalendarScopes =

@ -20,7 +20,7 @@ using Microsoft.Data.Entity;
namespace Yavsc.Controllers namespace Yavsc.Controllers
{ {
[ServiceFilter(typeof(LanguageActionFilter)), AllowAnonymous] [AllowAnonymous]
public class AccountController : Controller public class AccountController : Controller
{ {
private readonly UserManager<ApplicationUser> _userManager; private readonly UserManager<ApplicationUser> _userManager;

@ -13,7 +13,7 @@ using Yavsc.ViewModels.Administration;
namespace Yavsc.Controllers namespace Yavsc.Controllers
{ {
[ServiceFilter(typeof(LanguageActionFilter)), Authorize()] [Authorize()]
public class AdministrationController : Controller public class AdministrationController : Controller
{ {
private readonly UserManager<ApplicationUser> _userManager; private readonly UserManager<ApplicationUser> _userManager;
@ -43,6 +43,24 @@ namespace Yavsc.Controllers
// If some amdin already exists, make this method disapear // If some amdin already exists, make this method disapear
var admins = await _userManager.GetUsersInRoleAsync(Constants.AdminGroupName); var admins = await _userManager.GetUsersInRoleAsync(Constants.AdminGroupName);
if (admins != null && admins.Count > 0) return HttpNotFound(); if (admins != null && admins.Count > 0) return HttpNotFound();
// ensure all roles existence
foreach (string roleName in new string[] {Constants.AdminGroupName,
Constants.StarGroupName, Constants.PerformerGroupName,
Constants.FrontOfficeGroupName,
Constants.StarHunterGroupName
})
if (!await _roleManager.RoleExistsAsync(roleName))
{
var role = new IdentityRole { Name = roleName };
var resultCreate = await _roleManager.CreateAsync(role);
if (!resultCreate.Succeeded)
{
AddErrors(resultCreate);
return new BadRequestObjectResult(ModelState);
}
}
var user = await _userManager.FindByIdAsync(User.GetUserId()); var user = await _userManager.FindByIdAsync(User.GetUserId());
IdentityRole adminRole; IdentityRole adminRole;
@ -53,6 +71,7 @@ namespace Yavsc.Controllers
AddErrors(addToRoleResult); AddErrors(addToRoleResult);
return new BadRequestObjectResult(ModelState); return new BadRequestObjectResult(ModelState);
} }
return Ok(new { message = "you owned it." }); return Ok(new { message = "you owned it." });
} }
@ -72,6 +91,8 @@ namespace Yavsc.Controllers
Name = x.Name, Name = x.Name,
Users = x.Users.Select(u=>u.UserId).ToArray() Users = x.Users.Select(u=>u.UserId).ToArray()
}); });
ViewBag.ThisAssembly = GetType().Assembly.FullName;
ViewBag.RunTimeVersion = GetType().Assembly.ImageRuntimeVersion;
return View(new AdminViewModel return View(new AdminViewModel
{ {

@ -11,13 +11,11 @@ using Microsoft.Extensions.OptionsModel;
using Yavsc.Models; using Yavsc.Models;
using Yavsc.ViewModels.Auth; using Yavsc.ViewModels.Auth;
using Microsoft.AspNet.Mvc.Rendering; using Microsoft.AspNet.Mvc.Rendering;
using Yavsc.ViewModels;
// For more information on enabling Web API for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860 // For more information on enabling Web API for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
namespace Yavsc.Controllers namespace Yavsc.Controllers
{ {
[ServiceFilter(typeof(LanguageActionFilter))]
public class BlogspotController : Controller public class BlogspotController : Controller
{ {
ILogger _logger; ILogger _logger;
@ -65,7 +63,7 @@ namespace Yavsc.Controllers
return View(posts return View(posts
.OrderByDescending(p => p.DateCreated) .OrderByDescending(p => p.DateCreated)
.Skip(skip).Take(maxLen)); .Skip(skip).Take(maxLen).GroupBy(p=>p.Title));
} }
[Route("/Title/{id?}")] [Route("/Title/{id?}")]
@ -73,7 +71,8 @@ namespace Yavsc.Controllers
public IActionResult Title(string id) public IActionResult Title(string id)
{ {
var uid = User.GetUserId(); var uid = User.GetUserId();
return View("Index", _context.Blogspot.Include( ViewData["Title"] = id;
return View("Title", _context.Blogspot.Include(
b => b.Author b => b.Author
).Where(x => x.Title == id && (x.Visible || x.AuthorId == uid )).ToList()); ).Where(x => x.Title == id && (x.Visible || x.AuthorId == uid )).ToList());
} }
@ -82,17 +81,19 @@ namespace Yavsc.Controllers
[AllowAnonymous] [AllowAnonymous]
public IActionResult UserPosts(string id) public IActionResult UserPosts(string id)
{ {
if (string.IsNullOrEmpty(id))
return View("Index",_context.Blogspot.Include( if (string.IsNullOrEmpty(id)) return Index(null);
b => b.Author var uid = User.GetUserId();
).Where(p => p.Visible)); long[] usercircles = _context.Circle.Include(c=>c.Members).Where(c=>c.Members.Any(m=>m.MemberId == uid))
if (User.IsSignedIn()) .Select(c=>c.Id).ToArray();
return View("Index", _context.Blogspot.Include( var result = (User.IsSignedIn())?
_context.Blogspot.Include(
b => b.Author b => b.Author
).Where(x => x.Author.UserName == id).ToList()); ).Include(p=>p.ACL).Where(x => x.Author.UserName == id && (x.Visible && (x.ACL.Count==0 || x.ACL.Any(a=> usercircles.Contains(a.CircleId))))):
return View("Index", _context.Blogspot.Include( _context.Blogspot.Include(
b => b.Author b => b.Author
).Where(x => x.Author.UserName == id && x.Visible).ToList()); ).Where(x => x.Author.UserName == id && x.Visible);
return View("Index", result.OrderByDescending(p => p.DateCreated).ToList().GroupBy(p=>p.Title));
} }
// GET: Blog/Details/5 // GET: Blog/Details/5
[AllowAnonymous] [AllowAnonymous]
@ -119,9 +120,10 @@ namespace Yavsc.Controllers
// GET: Blog/Create // GET: Blog/Create
[Authorize()] [Authorize()]
public IActionResult Create() public IActionResult Create(string title)
{ {
return View(); var result = new Blog{Title=title};
return View(result);
} }
// POST: Blog/Create // POST: Blog/Create
@ -131,6 +133,7 @@ namespace Yavsc.Controllers
blog.Rate = 0; blog.Rate = 0;
blog.AuthorId = User.GetUserId(); blog.AuthorId = User.GetUserId();
ModelState.ClearValidationState("AuthorId"); ModelState.ClearValidationState("AuthorId");
blog.Id=0;
if (ModelState.IsValid) if (ModelState.IsValid)
{ {
_context.Blogspot.Add(blog); _context.Blogspot.Add(blog);

@ -19,7 +19,6 @@ namespace Yavsc.Controllers
using Models.Workflow; using Models.Workflow;
using Services; using Services;
[ServiceFilter(typeof(LanguageActionFilter))]
public class CommandController : Controller public class CommandController : Controller
{ {
protected UserManager<ApplicationUser> _userManager; protected UserManager<ApplicationUser> _userManager;
@ -54,30 +53,30 @@ namespace Yavsc.Controllers
// GET: Command // GET: Command
[Authorize] [Authorize]
public IActionResult Index() public virtual async Task<IActionResult> Index()
{ {
var uid = User.GetUserId(); var uid = User.GetUserId();
return View(_context.RdvQueries return View(await _context.RdvQueries
.Include(x => x.Client) .Include(x => x.Client)
.Include(x => x.PerformerProfile) .Include(x => x.PerformerProfile)
.Include(x => x.PerformerProfile.Performer) .Include(x => x.PerformerProfile.Performer)
.Include(x => x.Location) .Include(x => x.Location)
.Where(x=> x.ClientId == uid || x.PerformerId == uid) .Where(x=> x.ClientId == uid || x.PerformerId == uid)
.ToList()); .ToListAsync());
} }
// GET: Command/Details/5 // GET: Command/Details/5
public IActionResult Details(long? id) public virtual async Task<IActionResult> Details(long? id)
{ {
if (id == null) if (id == null)
{ {
return HttpNotFound(); return HttpNotFound();
} }
RdvQuery command = _context.RdvQueries RdvQuery command = await _context.RdvQueries
.Include(x => x.Location) .Include(x => x.Location)
.Include(x => x.PerformerProfile) .Include(x => x.PerformerProfile)
.Single(m => m.Id == id); .SingleAsync(m => m.Id == id);
if (command == null) if (command == null)
{ {
return HttpNotFound(); return HttpNotFound();

@ -1,7 +1,5 @@
using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.Mvc; using Microsoft.AspNet.Mvc;
using Microsoft.AspNet.Mvc.Rendering;
using Microsoft.Data.Entity; using Microsoft.Data.Entity;
using Yavsc.Models; using Yavsc.Models;
using Yavsc.Models.Musical.Profiles; using Yavsc.Models.Musical.Profiles;

@ -16,7 +16,7 @@ namespace Yavsc.Controllers
using Models; using Models;
using Models.Billing; using Models.Billing;
using Models.Workflow; using Models.Workflow;
using ViewModels; using ViewModels.Auth;
[Authorize] [Authorize]
public class EstimateController : Controller public class EstimateController : Controller
{ {

@ -1,7 +1,5 @@
using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.Mvc; using Microsoft.AspNet.Mvc;
using Microsoft.AspNet.Mvc.Rendering;
using Microsoft.Data.Entity; using Microsoft.Data.Entity;
using Yavsc.Models; using Yavsc.Models;
using Yavsc.Models.Musical.Profiles; using Yavsc.Models.Musical.Profiles;

@ -21,6 +21,9 @@ namespace Yavsc.Controllers
using Microsoft.AspNet.Http; using Microsoft.AspNet.Http;
using Yavsc.Extensions; using Yavsc.Extensions;
using Yavsc.Models.Haircut; using Yavsc.Models.Haircut;
using System.Globalization;
using Microsoft.AspNet.Mvc.Rendering;
using System.Collections.Generic;
public class HairCutCommandController : CommandController public class HairCutCommandController : CommandController
{ {
@ -37,15 +40,87 @@ namespace Yavsc.Controllers
{ {
} }
private async Task<HairCutQuery> GetQuery(long id)
{
return await _context.HairCutQueries
.Include(x => x.Location)
.Include(x => x.PerformerProfile)
.Include(x => x.Prestation)
.Include(x => x.PerformerProfile.Performer)
.SingleAsync(m => m.Id == id);
}
public async Task<IActionResult> ClientCancel(long id)
{
HairCutQuery command = await GetQuery(id);
if (command == null)
{
return HttpNotFound();
}
return View (command);
}
public async Task<IActionResult> ClientCancelConfirm(long id)
{
var query = await GetQuery(id);if (query == null)
{
return HttpNotFound();
}
var uid = User.GetUserId();
if (query.ClientId!=uid)
return new ChallengeResult();
_context.HairCutQueries.Remove(query);
await _context.SaveChangesAsync();
return await Index();
}
public override async Task<IActionResult> Index()
{
var uid = User.GetUserId();
return View("Index", await _context.HairCutQueries
.Include(x => x.Client)
.Include(x => x.PerformerProfile)
.Include(x => x.PerformerProfile.Performer)
.Include(x => x.Location)
.Where(x=> x.ClientId == uid || x.PerformerId == uid)
.ToListAsync());
}
[HttpPost, Authorize] public override async Task<IActionResult> Details(long? id)
[ValidateAntiForgeryToken]
public async Task<IActionResult> CreateHairCutQuery(HairCutQuery command)
{ {
if (id == null)
{
return HttpNotFound();
}
HairCutQuery command = await _context.HairCutQueries
.Include(x => x.Location)
.Include(x => x.PerformerProfile)
.Include(x => x.Prestation)
.Include(x => x.PerformerProfile.Performer)
.SingleAsync(m => m.Id == id);
if (command == null)
{
return HttpNotFound();
}
return View(command);
}
[HttpPost, Authorize]
[ValidateAntiForgeryToken]
public async Task<IActionResult> CreateHairCutQuery(HairCutQuery model, string taintIds)
{
var uid = User.GetUserId(); var uid = User.GetUserId();
var prid = command.PerformerId; var prid = model.PerformerId;
long[] longtaintIds = null;
List<HairTaint> colors = null;
if (taintIds!=null) {
longtaintIds = taintIds.Split(',').Select(s=>long.Parse(s)).ToArray();
colors = _context.HairTaint.Where(t=> longtaintIds.Contains(t.Id)).ToList();
// a Prestation is required
model.Prestation.Taints = colors.Select(c =>
new HairTaintInstance { Taint = c }).ToList();
}
if (string.IsNullOrWhiteSpace(uid) if (string.IsNullOrWhiteSpace(uid)
|| string.IsNullOrWhiteSpace(prid)) || string.IsNullOrWhiteSpace(prid))
throw new InvalidOperationException( throw new InvalidOperationException(
@ -55,77 +130,117 @@ namespace Yavsc.Controllers
u => u.Performer u => u.Performer
).Include(u => u.Performer.Devices) ).Include(u => u.Performer.Devices)
.FirstOrDefault( .FirstOrDefault(
x => x.PerformerId == command.PerformerId x => x.PerformerId == model.PerformerId
); );
var user = await _userManager.FindByIdAsync(uid); model.PerformerProfile = pro;
command.Client = user;
command.ClientId = uid;
command.PerformerProfile = pro;
// FIXME Why!! // FIXME Why!!
// ModelState.ClearValidationState("PerformerProfile.Avatar"); // ModelState.ClearValidationState("PerformerProfile.Avatar");
// ModelState.ClearValidationState("Client.Avatar"); // ModelState.ClearValidationState("Client.Avatar");
// ModelState.ClearValidationState("ClientId"); // ModelState.ClearValidationState("ClientId");
ModelState.MarkFieldSkipped("ClientId");
if (ModelState.IsValid) if (ModelState.IsValid)
{ {
var existingLocation = _context.Locations.FirstOrDefault( x=>x.Address == command.Location.Address if (model.Location!=null) {
&& x.Longitude == command.Location.Longitude && x.Latitude == command.Location.Latitude ); var existingLocation = await _context.Locations.FirstOrDefaultAsync( x=>x.Address == model.Location.Address
&& x.Longitude == model.Location.Longitude && x.Latitude == model.Location.Latitude );
if (existingLocation!=null) { if (existingLocation!=null) {
command.Location=existingLocation; model.Location=existingLocation;
} }
else _context.Attach<Location>(command.Location); else _context.Attach<Location>(model.Location);
}
var existingPrestation = await _context.HairPrestation.FirstOrDefaultAsync( x=> model.PrestationId == x.Id );
_context.HairCutQueries.Add(command, GraphBehavior.IncludeDependents); if (existingPrestation!=null) {
_context.SaveChanges(User.GetUserId()); model.Prestation = existingPrestation;
}
else _context.Attach<HairPrestation>(model.Prestation);
_context.HairCutQueries.Add(model);
await _context.SaveChangesAsync(uid);
var brusherProfile = await _context.BrusherProfile.SingleAsync(p=>p.UserId == pro.PerformerId);
model.Client = await _context.Users.SingleAsync(u=>u.Id == model.ClientId);
var yaev = command.CreateEvent(_localizer); var yaev = model.CreateEvent(_localizer, brusherProfile);
MessageWithPayloadResponse grep = null; MessageWithPayloadResponse grep = null;
if (pro.AcceptNotifications if (pro.AcceptPublicContact)
&& pro.AcceptPublicContact)
{ {
if (pro.Performer.Devices.Count > 0) { if (pro.AcceptNotifications) {
var regids = command.PerformerProfile.Performer if (pro.Performer.Devices.Count > 0) {
.Devices.Select(d => d.GCMRegistrationId); var regids = model.PerformerProfile.Performer
grep = await _GCMSender.NotifyHairCutQueryAsync(_googleSettings,regids,yaev); .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: {model.PerformerProfile.Performer.UserName} success: {grep.success} failure: {grep.failure}");
} }
// 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( await _emailSender.SendEmailAsync(
_siteSettings, _smtpSettings, _siteSettings, _smtpSettings,
command.PerformerProfile.Performer.Email, model.PerformerProfile.Performer.Email,
yaev.Topic+" "+yaev.Sender, yaev.Topic+" "+yaev.Sender,
$"{yaev.Message}\r\n-- \r\n{yaev.Previsional}\r\n{yaev.EventDate}\r\n" $"{yaev.Message}\r\n-- \r\n{yaev.Previsional}\r\n{yaev.EventDate}\r\n"
); );
} }
ViewBag.Activity = _context.Activities.FirstOrDefault(a=>a.Code == command.ActivityCode); else {
// TODO if (AcceptProContact) try & find a bookmaker to send him this query
}
ViewBag.Activity = _context.Activities.FirstOrDefault(a=>a.Code == model.ActivityCode);
ViewBag.GoogleSettings = _googleSettings; ViewBag.GoogleSettings = _googleSettings;
return View("CommandConfirmation",command); var addition = model.Prestation.Addition(brusherProfile);
ViewBag.Addition = addition.ToString("C",CultureInfo.CurrentUICulture);
return View("CommandConfirmation",model);
} }
ViewBag.Activity = _context.Activities.FirstOrDefault(a=>a.Code == command.ActivityCode); ViewBag.Activity = _context.Activities.FirstOrDefault(a=>a.Code == model.ActivityCode);
ViewBag.GoogleSettings = _googleSettings; ViewBag.GoogleSettings = _googleSettings;
return View(command); SetViewData(model.ActivityCode,model.PerformerId,model.Prestation);
return View("HairCut",model);
} }
[ValidateAntiForgeryToken] public async Task<ActionResult> HairCut(string performerId, string activityCode)
public ActionResult HairCut(string performerId, string activityCode)
{ {
HairPrestation pPrestation=null; HairPrestation pPrestation=null;
var prestaJson = HttpContext.Session.GetString("HairCutPresta") ; var prestaJson = HttpContext.Session.GetString("HairCutPresta") ;
if (prestaJson!=null) { if (prestaJson!=null) {
pPrestation = JsonConvert.DeserializeObject<HairPrestation>(prestaJson); pPrestation = JsonConvert.DeserializeObject<HairPrestation>(prestaJson);
} }
else pPrestation = new HairPrestation {}; else {
pPrestation = new HairPrestation {};
}
var uid = User.GetUserId();
var user = await _userManager.FindByIdAsync(uid);
SetViewData(activityCode,performerId,pPrestation);
var perfer = _context.Performers.Include(
p=>p.Performer
).Single(p=>p.PerformerId == performerId);
var result = new HairCutQuery {
PerformerProfile = perfer,
PerformerId = perfer.PerformerId,
ClientId = uid,
Prestation = pPrestation,
Client = user
};
return View(result);
}
private void SetViewData (string activityCode, string performerId, HairPrestation pPrestation )
{
ViewBag.HairTaints = _context.HairTaint.Include(t=>t.Color); ViewBag.HairTaints = _context.HairTaint.Include(t=>t.Color);
ViewBag.HairTaintsItems = _context.HairTaint.Include(t=>t.Color).Select(
c=>
new SelectListItem {
Text = c.Color.Name+" "+c.Brand,
Value = c.Id.ToString()
}
);
ViewBag.HairTechnos = EnumExtensions.GetSelectList(typeof(HairTechnos),_localizer); ViewBag.HairTechnos = EnumExtensions.GetSelectList(typeof(HairTechnos),_localizer);
ViewBag.HairLength = EnumExtensions.GetSelectList(typeof(HairLength),_localizer); ViewBag.HairLength = EnumExtensions.GetSelectList(typeof(HairLength),_localizer);
ViewBag.Activity = _context.Activities.First(a => a.Code == activityCode); ViewBag.Activity = _context.Activities.First(a => a.Code == activityCode);
@ -135,16 +250,6 @@ namespace Yavsc.Controllers
|| pPrestation.Tech == HairTechnos.Mech ) ? "":"hidden"; || pPrestation.Tech == HairTechnos.Mech ) ? "":"hidden";
ViewBag.TechClass = ( pPrestation.Gender == HairCutGenders.Women ) ? "":"hidden"; ViewBag.TechClass = ( pPrestation.Gender == HairCutGenders.Women ) ? "":"hidden";
ViewData["PerfPrefs"] = _context.BrusherProfile.Single(p=>p.UserId == performerId); 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] [HttpPost, Authorize]
@ -187,8 +292,10 @@ namespace Yavsc.Controllers
_context.HairMultiCutQueries.Add(command, GraphBehavior.IncludeDependents); _context.HairMultiCutQueries.Add(command, GraphBehavior.IncludeDependents);
_context.SaveChanges(User.GetUserId()); _context.SaveChanges(User.GetUserId());
var brSettings = await _context.BrusherProfile.SingleAsync(
var yaev = command.CreateEvent(_localizer); bp=>bp.UserId == command.PerformerId
);
var yaev = command.CreateEvent(_localizer,brSettings);
MessageWithPayloadResponse grep = null; MessageWithPayloadResponse grep = null;
if (pro.AcceptNotifications if (pro.AcceptNotifications
@ -219,7 +326,7 @@ namespace Yavsc.Controllers
} }
ViewBag.Activity = _context.Activities.FirstOrDefault(a=>a.Code == command.ActivityCode); ViewBag.Activity = _context.Activities.FirstOrDefault(a=>a.Code == command.ActivityCode);
ViewBag.GoogleSettings = _googleSettings; ViewBag.GoogleSettings = _googleSettings;
return View(command); return View("HairCut",command);
} }
} }
} }

@ -14,8 +14,9 @@ using System.Threading.Tasks;
namespace Yavsc.Controllers namespace Yavsc.Controllers
{ {
using Models; using Models;
using YavscLib;
[ServiceFilter(typeof(LanguageActionFilter)),AllowAnonymous] [AllowAnonymous]
public class HomeController : Controller public class HomeController : Controller
{ {
public IHostingEnvironment Hosting { get; set; } public IHostingEnvironment Hosting { get; set; }
@ -34,7 +35,9 @@ namespace Yavsc.Controllers
public async Task<IActionResult> Index(string id) public async Task<IActionResult> Index(string id)
{ {
ViewBag.IsFromSecureProx = (Request.Headers.ContainsKey(Constants.SshHeaderKey))? Request.Headers[Constants.SshHeaderKey]=="on" : false ;
ViewBag.SecureHomeUrl = "https://"+Request.Headers["X-Forwarded-Host"];
ViewBag.SshHeaderKey = Request.Headers[Constants.SshHeaderKey];
var uid = User.GetUserId(); var uid = User.GetUserId();
long [] clicked=null; long [] clicked=null;
if (uid==null) { if (uid==null) {
@ -48,8 +51,36 @@ namespace Yavsc.Controllers
n=> !clicked.Any(c=>n.Id==c) n=> !clicked.Any(c=>n.Id==c)
); );
ViewData["Notify"] = notes; ViewData["Notify"] = notes;
return View(DbContext.Activities.Where(a=>a.ParentCode==id && !a.Hidden).Include(a=>a.Forms).Include(a=>a.Children) ViewData["HasHaircutCommand"] = DbContext.HairCutQueries.Any
.OrderByDescending(a=>a.Rate)); (q=>q.ClientId == uid && q.Status < QueryStatus.Failed);
if (id==null) {
// Workaround
// NotImplementedException: Remotion.Linq.Clauses.ResultOperators.ConcatResultOperator
//
// Use Concat()| whatever to do left outer join on ToArray() or ToList(), not on IQueryable
var legacy = DbContext.Activities
.Include(a=>a.Forms).Include(a=>a.Children)
.Where(a=> !a.Hidden)
.Where(a=> a.ParentCode==null).ToArray();
// OMG
var hiddenchildren = DbContext.Activities
.Include(a=>a.Forms).Include(a=>a.Children)
.Where(a=> a.Parent.Hidden && !a.Hidden).ToArray();
return View(legacy.Concat(hiddenchildren).OrderByDescending(a=>a.Rate));
}
else {
return View(DbContext.Activities
.Include(a=>a.Forms).Include(a=>a.Children)
.Where(a=>!a.Hidden)
.Where(a=> a.ParentCode==id).OrderByDescending(a=>a.Rate));
}
} }
public IActionResult About() public IActionResult About()
{ {

@ -25,8 +25,9 @@ namespace Yavsc.Controllers
using Models.Relationship; using Models.Relationship;
using PayPal.PayPalAPIInterfaceService; using PayPal.PayPalAPIInterfaceService;
using PayPal.PayPalAPIInterfaceService.Model; using PayPal.PayPalAPIInterfaceService.Model;
using Yavsc.Models.Bank;
[Authorize, ServiceFilter(typeof(LanguageActionFilter))] [Authorize]
public class ManageController : Controller public class ManageController : Controller
{ {
private readonly UserManager<ApplicationUser> _userManager; private readonly UserManager<ApplicationUser> _userManager;
@ -88,6 +89,8 @@ namespace Yavsc.Controllers
: message == ManageMessageId.SetActivitySuccess ? _SR["Your activity was set."] : message == ManageMessageId.SetActivitySuccess ? _SR["Your activity was set."]
: message == ManageMessageId.AvatarUpdateSuccess ? _SR["Your avatar was updated."] : message == ManageMessageId.AvatarUpdateSuccess ? _SR["Your avatar was updated."]
: message == ManageMessageId.IdentityUpdateSuccess ? _SR["Your identity was updated."] : message == ManageMessageId.IdentityUpdateSuccess ? _SR["Your identity was updated."]
: message == ManageMessageId.SetBankInfoSuccess ? _SR["Vos informations bancaires ont bien été enregistrées."]
: message == ManageMessageId.SetAddressSuccess ? _SR["Votre adresse a bien été enregistrée."]
: ""; : "";
var user = await GetCurrentUserAsync(); var user = await GetCurrentUserAsync();
@ -265,7 +268,7 @@ namespace Yavsc.Controllers
return View(); return View();
} }
[HttpGet, Authorize] [HttpGet]
public async Task<IActionResult> SetGoogleCalendar(string returnUrl) public async Task<IActionResult> SetGoogleCalendar(string returnUrl)
{ {
var credential = await _userManager.GetCredentialForGoogleApiAsync( var credential = await _userManager.GetCredentialForGoogleApiAsync(
@ -290,8 +293,7 @@ namespace Yavsc.Controllers
return View(new SetGoogleCalendarViewModel { ReturnUrl = returnUrl }); return View(new SetGoogleCalendarViewModel { ReturnUrl = returnUrl });
} }
[HttpPost, ValidateAntiForgeryToken, [HttpPost, ValidateAntiForgeryToken]
Authorize]
public async Task<IActionResult> SetGoogleCalendar(SetGoogleCalendarViewModel model) public async Task<IActionResult> SetGoogleCalendar(SetGoogleCalendarViewModel model)
{ {
var user = _dbContext.Users.FirstOrDefault(u => u.Id == User.GetUserId()); var user = _dbContext.Users.FirstOrDefault(u => u.Id == User.GetUserId());
@ -302,16 +304,41 @@ namespace Yavsc.Controllers
else return Redirect(model.ReturnUrl); else return Redirect(model.ReturnUrl);
} }
[HttpGet,Authorize] [HttpGet]
public async Task<IActionResult> AddBankInfo() public async Task<IActionResult> AddBankInfo()
{ {
var user = await _userManager.FindByIdAsync(User.GetUserId()); var uid = User.GetUserId();
var user = await _dbContext.Users.Include(u=>u.BankInfo).SingleAsync(u=>u.Id==uid);
return View(new AddBankInfoViewModel( return View(user.BankInfo);
user.BankInfo));
} }
[HttpGet,Authorize] [HttpPost]
public async Task<IActionResult> AddBankInfo (BankIdentity model)
{
if (ModelState.IsValid)
{
// TODO PostBankInfoRequirement & auth
var uid = User.GetUserId();
var user = _dbContext.Users.Include(u=>u.BankInfo)
.Single(u=>u.Id == uid);
if (user.BankInfo != null)
{
model.Id = user.BankInfo.Id;
_dbContext.Entry(user.BankInfo).State = EntityState.Detached;
_dbContext.Update(model);
}
else {
user.BankInfo = model;
_dbContext.Update(user);
}
await _dbContext.SaveChangesAsync();
}
return RedirectToAction(nameof(Index), new { Message = ManageMessageId.SetBankInfoSuccess });
}
[HttpGet]
public async Task<IActionResult> SetFullName() public async Task<IActionResult> SetFullName()
{ {
var user = await _userManager.FindByIdAsync(User.GetUserId()); var user = await _userManager.FindByIdAsync(User.GetUserId());
@ -483,13 +510,13 @@ namespace Yavsc.Controllers
return RedirectToAction(nameof(ManageLogins), new { Message = message }); return RedirectToAction(nameof(ManageLogins), new { Message = message });
} }
[HttpGet, Authorize] [HttpGet]
public IActionResult SetAvatar() public IActionResult SetAvatar()
{ {
return View(); return View();
} }
[HttpGet, Authorize] [HttpGet]
public IActionResult SetActivity() public IActionResult SetActivity()
{ {
var user = GetCurrentUserAsync().Result; var user = GetCurrentUserAsync().Result;
@ -520,7 +547,6 @@ namespace Yavsc.Controllers
[HttpPost] [HttpPost]
[Authorize]
public async Task<IActionResult> SetActivity(PerformerProfile model) public async Task<IActionResult> SetActivity(PerformerProfile model)
{ {
var user = GetCurrentUserAsync().Result; var user = GetCurrentUserAsync().Result;
@ -588,7 +614,7 @@ namespace Yavsc.Controllers
return View(model); return View(model);
} }
[HttpPost, Authorize] [HttpPost]
public async Task<IActionResult> UnsetActivity() public async Task<IActionResult> UnsetActivity()
{ {
var user = GetCurrentUserAsync().Result; var user = GetCurrentUserAsync().Result;
@ -784,6 +810,9 @@ namespace Yavsc.Controllers
UnsetActivitySuccess, UnsetActivitySuccess,
AvatarUpdateSuccess, AvatarUpdateSuccess,
IdentityUpdateSuccess, IdentityUpdateSuccess,
SetBankInfoSuccess,
SetAddressSuccess,
Error Error
} }
@ -794,5 +823,36 @@ namespace Yavsc.Controllers
} }
#endregion #endregion
[HttpGet]
public async Task <IActionResult> SetAddress()
{
var uid = User.GetUserId();
var user = await _dbContext.Users.Include(u=>u.PostalAddress).SingleAsync(u=>u.Id==uid);
ViewBag.GoogleSettings = _googleSettings;
return View(user.PostalAddress);
}
[HttpPost]
public async Task <IActionResult> SetAddress(Location model)
{
if (ModelState.IsValid) {
var uid = User.GetUserId();
var user = _dbContext.Users.Include(u=>u.PostalAddress).Single(u=>u.Id==uid);
var existingLocation = _dbContext.Locations.FirstOrDefault( x=>x.Address == model.Address
&& x.Longitude == model.Longitude && x.Latitude == model.Latitude );
if (existingLocation!=null) {
user.PostalAddressId = existingLocation.Id;
} else _dbContext.Attach<Location>(model);
user.PostalAddress = model;
await _dbContext.SaveChangesAsync();
return RedirectToAction(nameof(Index), new { Message = ManageMessageId.SetAddressSuccess });
}
ViewBag.GoogleSettings = _googleSettings;
return View(model);
}
} }
} }

@ -0,0 +1,26 @@
using System;
using System.Threading.Tasks;
using Microsoft.AspNet.Mvc.ModelBinding;
namespace Yavsc
{
public class MyDecimalModelBinder : IModelBinder
{
public async Task<ModelBindingResult> BindModelAsync(ModelBindingContext bindingContext)
{
ValueProviderResult valueResult = bindingContext.ValueProvider
.GetValue(bindingContext.ModelName);
decimal actualValue ;
ModelStateEntry modelState = new ModelStateEntry();
try {
actualValue = Decimal.Parse(valueResult.FirstValue, System.Globalization.NumberStyles.AllowDecimalPoint);
return await ModelBindingResult.SuccessAsync(bindingContext.ModelName,actualValue);
}
catch (Exception ) {
}
return await ModelBindingResult.FailedAsync(bindingContext.ModelName);
}
}
}

@ -1,61 +0,0 @@
using System.Globalization;
namespace Yavsc
{
using Microsoft.AspNet.Mvc.Filters;
using Microsoft.Extensions.Logging;
public class LanguageActionFilter : ActionFilterAttribute
{
private readonly ILogger _logger;
public LanguageActionFilter(ILoggerFactory loggerFactory)
{
_logger = loggerFactory.CreateLogger("LanguageActionFilter");
}
public override void OnActionExecuting(ActionExecutingContext context)
{
string culture = null;
var routedCulture = context.RouteData.Values["culture"];
if (routedCulture != null) {
culture = routedCulture.ToString();
_logger.LogInformation($"Setting the culture from the URL: {culture}");
}
else {
if (context.HttpContext.Request.Headers.ContainsKey("accept-language"))
{
// fr,en-US;q=0.7,en;q=0.3
string spec = context.HttpContext.Request.Headers["accept-language"];
_logger.LogInformation($"Setting the culture from language header spec: {spec}");
string firstpart = spec.Split(';')[0];
foreach (string lang in firstpart.Split(','))
{
// TODO do it from the given options ...
// just take the main part :-)
string mainlang = lang.Split('-')[0];
if (mainlang=="fr"||mainlang=="en") {
culture = mainlang;
_logger.LogInformation($"Setting the culture from header: {culture}");
break;
}
}
}
}
if (culture != null) {
#if DNX451
System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo(culture);
System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo(culture);
#else
CultureInfo.CurrentCulture = new CultureInfo(culture);
CultureInfo.CurrentUICulture = new CultureInfo(culture);
#endif
}
base.OnActionExecuting(context);
}
}
}

@ -0,0 +1,18 @@
namespace Yavsc.Helpers
{
using Models.Bank;
public static class BankInfoHelpers
{
public static bool IsValid(this BankIdentity info) { 
return ByIbanBIC(info) || ByAccountNumber(info) ;
}
public static bool ByIbanBIC(this BankIdentity info) {
return (info.BIC != null && info.IBAN != null) ;
}
public static bool ByAccountNumber(this BankIdentity info){ 
return (info.BankCode != null && info.WicketCode != null && info.AccountNumber != null && info.BankedKey >0);
}
}
}

@ -34,32 +34,44 @@ namespace Yavsc.Helpers
return yaev; return yaev;
} }
public static HairCutQueryEvent CreateEvent(this HairCutQuery query, public static HairCutQueryEvent CreateEvent(this HairCutQuery query,
IStringLocalizer SR) IStringLocalizer SR, BrusherProfile bpr)
{ {
string head = SR["HaircutRdvQuery"];
string evdate = query.EventDate?.ToString("dddd dd/MM/yyyy à HH:mm")??"[pas de date spécifiée]";
string address = query.Location?.Address??"[pas de lieu spécifié]";
var p = query.Prestation;
decimal total = query.Prestation.Addition(bpr);
string strprestation = $@"Coupe: {p.Cut}, Total: {total}";
var yaev = new HairCutQueryEvent var yaev = new HairCutQueryEvent
{ {
Sender = query.ClientId, Sender = query.ClientId,
Message = string.Format(SR["RdvToPerf"], Message = $@"{head}: {query.Client.UserName},
query.Client.UserName, {evdate},
query.EventDate.ToString("dddd dd/MM/yyyy à HH:mm"), {address}
query.Location.Address, -----
query.ActivityCode), {strprestation}
Client = new ClientProviderInfo { 
UserName = query.Client.UserName , --
UserId = query.ClientId, {query.AdditionalInfo}
Avatar = query.Client.Avatar } , " ,
Previsional = query.Previsional, Client = new ClientProviderInfo { 
EventDate = query.EventDate, UserName = query.Client.UserName ,
Location = query.Location, UserId = query.ClientId,
Id = query.Id, Avatar = query.Client.Avatar } ,
Reason = "Coupe particulier", Previsional = query.Previsional,
ActivityCode = query.ActivityCode EventDate = query.EventDate,
Location = query.Location,
Id = query.Id,
Reason = query.AdditionalInfo,
ActivityCode = query.ActivityCode
}; };
return yaev; return yaev;
} }
public static HairCutQueryEvent CreateEvent(this HairMultiCutQuery query, public static HairCutQueryEvent CreateEvent(this HairMultiCutQuery query,
IStringLocalizer SR) IStringLocalizer SR, BrusherProfile bpr)
{ {
var yaev = new HairCutQueryEvent var yaev = new HairCutQueryEvent
{ {

@ -0,0 +1,130 @@
using Yavsc.Models.Haircut;
namespace Yavsc.Helpers
{
public static class HaircutHelpers
{
public static decimal Addition (this HairPrestation p, BrusherProfile profile)
{
decimal sub=0;
// Le shampoing
sub += p.Shampoo ? profile.ShampooPrice:0;
// la coupe
sub += p.Cut ? p.Gender == HairCutGenders.Women ?
p.Length == HairLength.Long ? profile.WomenLongCutPrice :
p.Length == HairLength.HalfLong ? profile.WomenHalfCutPrice :
profile.WomenShortCutPrice : p.Gender == HairCutGenders.Man ?
profile.ManCutPrice : profile.KidCutPrice : 0;
// Les techniques
switch (p.Tech) {
case HairTechnos.Color:
bool multicolor = p.Taints.Count>1;
switch (p.Length) {
case HairLength.Long:
sub += sub += multicolor? profile.LongMultiColorPrice : profile.LongColorPrice;
break;
case HairLength.HalfLong: sub += multicolor? profile.HalfMultiColorPrice : profile.HalfColorPrice;
break;
default:
sub += multicolor? profile.ShortMultiColorPrice : profile.ShortColorPrice;
break;
}
break;
case HairTechnos.Balayage:
switch (p.Length) {
case HairLength.Long:
sub += profile.LongBalayagePrice;
break;
case HairLength.HalfLong: sub += profile.HalfBalayagePrice;
break;
default:
sub += profile.ShortBalayagePrice;
break;
}
break;
case HairTechnos.Defris:
switch (p.Length) {
case HairLength.Long:
sub += profile.LongDefrisPrice;
break;
case HairLength.HalfLong: sub += profile.HalfDefrisPrice;
break;
default:
sub += profile.ShortDefrisPrice;
break;
}
break;
case HairTechnos.Mech:
switch (p.Length) {
case HairLength.Long:
sub += profile.LongMechPrice;
break;
case HairLength.HalfLong: sub += profile.HalfMechPrice;
break;
default:
sub += profile.ShortMechPrice;
break;
}
break;
case HairTechnos.Permanent:
switch (p.Length) {
case HairLength.Long:
sub += profile.LongPermanentPrice;
break;
case HairLength.HalfLong: sub += profile.HalfPermanentPrice;
break;
default:
sub += profile.ShortPermanentPrice;
break;
}
break;
}
// Les coiffages
switch (p.Dressing) {
case HairDressings.Brushing:
switch (p.Gender) {
case HairCutGenders.Women:
switch (p.Length) {
case HairLength.Long:
sub += profile.LongBrushingPrice;
break;
case HairLength.HalfLong: sub += profile.HalfBrushingPrice;
break;
default:
sub += profile.ShortBrushingPrice;
break;
}
break;
case HairCutGenders.Man:
sub += profile.ManBrushPrice;
break;
}
break;
case HairDressings.Coiffage:
// est offert
break;
case HairDressings.Folding:
switch (p.Length) {
case HairLength.Long:
sub += profile.LongFoldingPrice;
break;
case HairLength.HalfLong: sub += profile.HalfFoldingPrice;
break;
default:
sub += profile.ShortFoldingPrice;
break;
}
break;
}
// les soins
sub += p.Cares ? profile.CarePrice:0;
return sub;
}
}
}

@ -19,9 +19,9 @@ namespace Yavsc.Helpers
{ {
var user = dbContext.Users.FirstOrDefault(u => u.Id == userId); var user = dbContext.Users.FirstOrDefault(u => u.Id == userId);
if (user==null) return Constants.AnonAvatar; if (user==null) return Constants.AnonAvatar;
if (user.Avatar==null) return Constants.DefaultAvatar;
if (user.Avatar.StartsWith("/")) if (user.Avatar.StartsWith("/"))
{ {
// use fmt
FileInfo fi = new FileInfo(user.Avatar); FileInfo fi = new FileInfo(user.Avatar);
var ext = fi.Extension; var ext = fi.Extension;
var avatar = user.Avatar.Substring(0, user.Avatar.Length - ext.Length ); var avatar = user.Avatar.Substring(0, user.Avatar.Length - ext.Length );

@ -1,15 +0,0 @@
using System.Collections.Generic;
namespace Yavsc.Interfaces
{
public interface IApplicationUser
{
IAccountBalance AccountBalance { get; set; }
IList<IContact> Book { get; set; }
IList<ICircle> Circles { get; set; }
string DedicatedGoogleCalendar { get; set; }
IList<IGoogleCloudMobileDeclaration> Devices { get; set; }
ILocation PostalAddress { get; set; }
IList<IBlog> Posts { get; set; }
}
}

@ -1,4 +1,6 @@
namespace Yavsc.Interfaces using YavscLib;
namespace Yavsc.Interfaces
{ {
public interface ICircleMember: IIdentified<long> public interface ICircleMember: IIdentified<long>
{ {

@ -1,11 +0,0 @@
namespace Yavsc.Interfaces
{
public interface IFormNode
{
T GetControl<T>();
bool IsUIControl { get; }
bool IsInputControl { get; }
}
}

@ -1,4 +1,6 @@
namespace Yavsc.Interfaces using YavscLib;
namespace Yavsc.Interfaces
{ {
public interface IGCMDeclaration public interface IGCMDeclaration
{ {

@ -1,9 +0,0 @@
namespace Yavsc.Interfaces
{
public interface IAccountBalance
{
long ContactCredits { get; set; }
decimal Credits { get; set; }
string UserId { get; set; }
}
}

@ -1,13 +0,0 @@
using System.Collections.Generic;
namespace Yavsc.Interfaces
{
public interface ICircle
{
long Id { get; set; }
IList<ICircleMember> Members { get; set; }
string Name { get; set; }
IApplicationUser Owner { get; set; }
string OwnerId { get; set; }
}
}

@ -2,7 +2,6 @@
{ {
public interface IContact public interface IContact
{ {
IApplicationUser Owner { get; set; }
string OwnerId { get; set; } string OwnerId { get; set; }
string UserId { get; set; } string UserId { get; set; }
} }

@ -1,28 +0,0 @@
//
// INominative.cs
//
// Author:
// Paul Schneider <paul@pschneider.fr>
//
// Copyright (c) 2015 GNU GPL
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
namespace Yavsc.Interfaces
{
public interface IPerformerSpecified {
string PerformerName { get; set; }
}
}

@ -1,8 +1,8 @@
using Microsoft.Data.Entity.Migrations; using Microsoft.Data.Entity.Migrations;
using Yavsc.Interfaces.Workflow;
namespace Yavsc.Migrations namespace Yavsc.Migrations
{ {
using YavscLib;
public partial class bookQueryStatus : Migration public partial class bookQueryStatus : Migration
{ {
protected override void Up(MigrationBuilder migrationBuilder) protected override void Up(MigrationBuilder migrationBuilder)

File diff suppressed because it is too large Load Diff

@ -0,0 +1,625 @@
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations
{
public partial class cxRequiresUserName : 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_Connection_ApplicationUser_ApplicationUserId", table: "Connection");
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: "ActorDenomination", table: "Activity");
// Suppression des connections sans nom d'utilisateur,
// elles deviennent invalides.
migrationBuilder.Sql("delete from \"Connection\" where \"ApplicationUserId\" is NULL");
migrationBuilder.AlterColumn<string>(
name: "ApplicationUserId",
table: "Connection",
nullable: false);
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_Connection_ApplicationUser_ApplicationUserId",
table: "Connection",
column: "ApplicationUserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
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_Connection_ApplicationUser_ApplicationUserId", table: "Connection");
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.AddColumn<string>(
name: "ActorDenomination",
table: "Activity",
nullable: true);
migrationBuilder.AlterColumn<string>(
name: "ApplicationUserId",
table: "Connection",
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_Connection_ApplicationUser_ApplicationUserId",
table: "Connection",
column: "ApplicationUserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
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);
}
}
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,617 @@
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations
{
public partial class avatarMayBeNull : 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_Connection_ApplicationUser_ApplicationUserId", table: "Connection");
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<string>(
name: "Avatar",
table: "AspNetUsers",
nullable: true,
defaultValue: "/images/Users/icon_user.png");
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_Connection_ApplicationUser_ApplicationUserId",
table: "Connection",
column: "ApplicationUserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
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_Connection_ApplicationUser_ApplicationUserId", table: "Connection");
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<string>(
name: "Avatar",
table: "AspNetUsers",
nullable: false,
defaultValue: "/images/Users/icon_user.png");
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_Connection_ApplicationUser_ApplicationUserId",
table: "Connection",
column: "ApplicationUserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
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);
}
}
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,608 @@
using System;
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations
{
public partial class rdvqueryAndNoLocationNorDate : 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_Connection_ApplicationUser_ApplicationUserId", table: "Connection");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_Activity_ActivityCode", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_ApplicationUser_ClientId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_PerformerProfile_PerformerId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_HairPrestation_PrestationId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_Activity_ActivityCode", table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_ApplicationUser_ClientId", table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey(name: "FK_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: "LocationId",
table: "HairCutQuery",
nullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "EventDate",
table: "HairCutQuery",
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_Connection_ApplicationUser_ApplicationUserId",
table: "Connection",
column: "ApplicationUserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_Activity_ActivityCode",
table: "HairCutQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_ApplicationUser_ClientId",
table: "HairCutQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_PerformerProfile_PerformerId",
table: "HairCutQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_HairPrestation_PrestationId",
table: "HairCutQuery",
column: "PrestationId",
principalTable: "HairPrestation",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairMultiCutQuery_Activity_ActivityCode",
table: "HairMultiCutQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairMultiCutQuery_ApplicationUser_ClientId",
table: "HairMultiCutQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId",
table: "HairMultiCutQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_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_Connection_ApplicationUser_ApplicationUserId", table: "Connection");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_Activity_ActivityCode", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_ApplicationUser_ClientId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_PerformerProfile_PerformerId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_HairPrestation_PrestationId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_Activity_ActivityCode", table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_ApplicationUser_ClientId", table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey(name: "FK_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: "LocationId",
table: "HairCutQuery",
nullable: false);
migrationBuilder.AlterColumn<DateTime>(
name: "EventDate",
table: "HairCutQuery",
nullable: false);
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_Connection_ApplicationUser_ApplicationUserId",
table: "Connection",
column: "ApplicationUserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_Activity_ActivityCode",
table: "HairCutQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_ApplicationUser_ClientId",
table: "HairCutQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_PerformerProfile_PerformerId",
table: "HairCutQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_HairPrestation_PrestationId",
table: "HairCutQuery",
column: "PrestationId",
principalTable: "HairPrestation",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairMultiCutQuery_Activity_ActivityCode",
table: "HairMultiCutQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairMultiCutQuery_ApplicationUser_ClientId",
table: "HairMultiCutQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId",
table: "HairMultiCutQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_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

@ -0,0 +1,636 @@
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations
{
public partial class haircutqueryAdditionalInfo : 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_Connection_ApplicationUser_ApplicationUserId", table: "Connection");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_Activity_ActivityCode", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_ApplicationUser_ClientId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_PerformerProfile_PerformerId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_HairPrestation_PrestationId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_Activity_ActivityCode", table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_ApplicationUser_ClientId", table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairPrestation_HairMultiCutQuery_HairMultiCutQueryId", table: "HairPrestation");
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: "HairMultiCutQueryId", table: "HairPrestation");
migrationBuilder.CreateTable(
name: "HairPrestationCollectionItem",
columns: table => new
{
Id = table.Column<long>(nullable: false)
.Annotation("Npgsql:Serial", true),
PrestationId = table.Column<long>(nullable: false),
QueryId = table.Column<long>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_HairPrestationCollectionItem", x => x.Id);
table.ForeignKey(
name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId",
column: x => x.PrestationId,
principalTable: "HairPrestation",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId",
column: x => x.QueryId,
principalTable: "HairMultiCutQuery",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.AddColumn<string>(
name: "AdditionalInfo",
table: "HairCutQuery",
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_Connection_ApplicationUser_ApplicationUserId",
table: "Connection",
column: "ApplicationUserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_Activity_ActivityCode",
table: "HairCutQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_ApplicationUser_ClientId",
table: "HairCutQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_PerformerProfile_PerformerId",
table: "HairCutQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_HairPrestation_PrestationId",
table: "HairCutQuery",
column: "PrestationId",
principalTable: "HairPrestation",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairMultiCutQuery_Activity_ActivityCode",
table: "HairMultiCutQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairMultiCutQuery_ApplicationUser_ClientId",
table: "HairMultiCutQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId",
table: "HairMultiCutQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_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_Connection_ApplicationUser_ApplicationUserId", table: "Connection");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_Activity_ActivityCode", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_ApplicationUser_ClientId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_PerformerProfile_PerformerId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_HairPrestation_PrestationId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_Activity_ActivityCode", table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_ApplicationUser_ClientId", table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey(name: "FK_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: "AdditionalInfo", table: "HairCutQuery");
migrationBuilder.DropTable("HairPrestationCollectionItem");
migrationBuilder.AddColumn<long>(
name: "HairMultiCutQueryId",
table: "HairPrestation",
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_Connection_ApplicationUser_ApplicationUserId",
table: "Connection",
column: "ApplicationUserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_Activity_ActivityCode",
table: "HairCutQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_ApplicationUser_ClientId",
table: "HairCutQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_PerformerProfile_PerformerId",
table: "HairCutQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_HairPrestation_PrestationId",
table: "HairCutQuery",
column: "PrestationId",
principalTable: "HairPrestation",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairMultiCutQuery_Activity_ActivityCode",
table: "HairMultiCutQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairMultiCutQuery_ApplicationUser_ClientId",
table: "HairMultiCutQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId",
table: "HairMultiCutQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairPrestation_HairMultiCutQuery_HairMultiCutQueryId",
table: "HairPrestation",
column: "HairMultiCutQueryId",
principalTable: "HairMultiCutQuery",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairTaint_Color_ColorId",
table: "HairTaint",
column: "ColorId",
principalTable: "Color",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_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

@ -0,0 +1,662 @@
using System;
using System.Collections.Generic;
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations
{
public partial class haircutCommandTaints : 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_Connection_ApplicationUser_ApplicationUserId", table: "Connection");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_Activity_ActivityCode", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_ApplicationUser_ClientId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_PerformerProfile_PerformerId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_HairPrestation_PrestationId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_Activity_ActivityCode", table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_ApplicationUser_ClientId", table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId", table: "HairPrestationCollectionItem");
migrationBuilder.DropForeignKey(name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId", table: "HairPrestationCollectionItem");
migrationBuilder.DropForeignKey(name: "FK_HairTaint_Color_ColorId", table: "HairTaint");
migrationBuilder.DropForeignKey(name: "FK_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_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: "HairPrestationId", table: "HairTaint");
migrationBuilder.CreateTable(
name: "HairTaintInstance",
columns: table => new
{
TaintId = table.Column<long>(nullable: false),
PrestationId = table.Column<long>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_HairTaintInstance", x => new { x.TaintId, x.PrestationId });
table.ForeignKey(
name: "FK_HairTaintInstance_HairPrestation_PrestationId",
column: x => x.PrestationId,
principalTable: "HairPrestation",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_HairTaintInstance_HairTaint_TaintId",
column: x => x.TaintId,
principalTable: "HairTaint",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
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_Connection_ApplicationUser_ApplicationUserId",
table: "Connection",
column: "ApplicationUserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_Activity_ActivityCode",
table: "HairCutQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_ApplicationUser_ClientId",
table: "HairCutQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_PerformerProfile_PerformerId",
table: "HairCutQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_HairPrestation_PrestationId",
table: "HairCutQuery",
column: "PrestationId",
principalTable: "HairPrestation",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairMultiCutQuery_Activity_ActivityCode",
table: "HairMultiCutQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairMultiCutQuery_ApplicationUser_ClientId",
table: "HairMultiCutQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId",
table: "HairMultiCutQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId",
table: "HairPrestationCollectionItem",
column: "PrestationId",
principalTable: "HairPrestation",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId",
table: "HairPrestationCollectionItem",
column: "QueryId",
principalTable: "HairMultiCutQuery",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairTaint_Color_ColorId",
table: "HairTaint",
column: "ColorId",
principalTable: "Color",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_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_Connection_ApplicationUser_ApplicationUserId", table: "Connection");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_Activity_ActivityCode", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_ApplicationUser_ClientId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_PerformerProfile_PerformerId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_HairPrestation_PrestationId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_Activity_ActivityCode", table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_ApplicationUser_ClientId", table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId", table: "HairPrestationCollectionItem");
migrationBuilder.DropForeignKey(name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId", table: "HairPrestationCollectionItem");
migrationBuilder.DropForeignKey(name: "FK_HairTaint_Color_ColorId", table: "HairTaint");
migrationBuilder.DropForeignKey(name: "FK_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("HairTaintInstance");
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.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_Connection_ApplicationUser_ApplicationUserId",
table: "Connection",
column: "ApplicationUserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_Activity_ActivityCode",
table: "HairCutQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_ApplicationUser_ClientId",
table: "HairCutQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_PerformerProfile_PerformerId",
table: "HairCutQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_HairPrestation_PrestationId",
table: "HairCutQuery",
column: "PrestationId",
principalTable: "HairPrestation",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairMultiCutQuery_Activity_ActivityCode",
table: "HairMultiCutQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairMultiCutQuery_ApplicationUser_ClientId",
table: "HairMultiCutQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId",
table: "HairMultiCutQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId",
table: "HairPrestationCollectionItem",
column: "PrestationId",
principalTable: "HairPrestation",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId",
table: "HairPrestationCollectionItem",
column: "QueryId",
principalTable: "HairMultiCutQuery",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairTaint_Color_ColorId",
table: "HairTaint",
column: "ColorId",
principalTable: "Color",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_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.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);
}
}
}

@ -1,6 +1,8 @@
using System; using System;
using Microsoft.Data.Entity; using Microsoft.Data.Entity;
using Microsoft.Data.Entity.Infrastructure; using Microsoft.Data.Entity.Infrastructure;
using Microsoft.Data.Entity.Metadata;
using Microsoft.Data.Entity.Migrations;
using Yavsc.Models; using Yavsc.Models;
namespace Yavsc.Migrations namespace Yavsc.Migrations
@ -152,7 +154,6 @@ namespace Yavsc.Migrations
b.Property<int>("AccessFailedCount"); b.Property<int>("AccessFailedCount");
b.Property<string>("Avatar") b.Property<string>("Avatar")
.IsRequired()
.HasAnnotation("MaxLength", 512) .HasAnnotation("MaxLength", 512)
.HasAnnotation("Relational:DefaultValue", "/images/Users/icon_user.png") .HasAnnotation("Relational:DefaultValue", "/images/Users/icon_user.png")
.HasAnnotation("Relational:DefaultValueType", "System.String"); .HasAnnotation("Relational:DefaultValueType", "System.String");
@ -406,7 +407,8 @@ namespace Yavsc.Migrations
{ {
b.Property<string>("ConnectionId"); b.Property<string>("ConnectionId");
b.Property<string>("ApplicationUserId"); b.Property<string>("ApplicationUserId")
.IsRequired();
b.Property<bool>("Connected"); b.Property<bool>("Connected");
@ -527,6 +529,9 @@ namespace Yavsc.Migrations
b.Property<string>("ActivityCode") b.Property<string>("ActivityCode")
.IsRequired(); .IsRequired();
b.Property<string>("AdditionalInfo")
.HasAnnotation("MaxLength", 512);
b.Property<string>("ClientId") b.Property<string>("ClientId")
.IsRequired(); .IsRequired();
@ -534,10 +539,9 @@ namespace Yavsc.Migrations
b.Property<DateTime>("DateModified"); b.Property<DateTime>("DateModified");
b.Property<DateTime>("EventDate"); b.Property<DateTime?>("EventDate");
b.Property<long?>("LocationId") b.Property<long?>("LocationId");
.IsRequired();
b.Property<string>("PerformerId") b.Property<string>("PerformerId")
.IsRequired(); .IsRequired();
@ -605,8 +609,6 @@ namespace Yavsc.Migrations
b.Property<int>("Gender"); b.Property<int>("Gender");
b.Property<long?>("HairMultiCutQueryId");
b.Property<int>("Length"); b.Property<int>("Length");
b.Property<bool>("Shampoo"); b.Property<bool>("Shampoo");
@ -616,6 +618,18 @@ namespace Yavsc.Migrations
b.HasKey("Id"); b.HasKey("Id");
}); });
modelBuilder.Entity("Yavsc.Models.Haircut.HairPrestationCollectionItem", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd();
b.Property<long>("PrestationId");
b.Property<long>("QueryId");
b.HasKey("Id");
});
modelBuilder.Entity("Yavsc.Models.Haircut.HairTaint", b => modelBuilder.Entity("Yavsc.Models.Haircut.HairTaint", b =>
{ {
b.Property<long>("Id") b.Property<long>("Id")
@ -625,11 +639,18 @@ namespace Yavsc.Migrations
b.Property<long>("ColorId"); b.Property<long>("ColorId");
b.Property<long?>("HairPrestationId");
b.HasKey("Id"); b.HasKey("Id");
}); });
modelBuilder.Entity("Yavsc.Models.Haircut.HairTaintInstance", b =>
{
b.Property<long>("TaintId");
b.Property<long>("PrestationId");
b.HasKey("TaintId", "PrestationId");
});
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b => modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
{ {
b.Property<string>("DeviceId"); b.Property<string>("DeviceId");
@ -921,8 +942,6 @@ namespace Yavsc.Migrations
b.Property<string>("Code") b.Property<string>("Code")
.HasAnnotation("MaxLength", 512); .HasAnnotation("MaxLength", 512);
b.Property<string>("ActorDenomination");
b.Property<DateTime>("DateCreated"); b.Property<DateTime>("DateCreated");
b.Property<DateTime>("DateModified"); b.Property<DateTime>("DateModified");
@ -1225,11 +1244,15 @@ namespace Yavsc.Migrations
.HasForeignKey("PerformerId"); .HasForeignKey("PerformerId");
}); });
modelBuilder.Entity("Yavsc.Models.Haircut.HairPrestation", b => modelBuilder.Entity("Yavsc.Models.Haircut.HairPrestationCollectionItem", b =>
{ {
b.HasOne("Yavsc.Models.Haircut.HairPrestation")
.WithMany()
.HasForeignKey("PrestationId");
b.HasOne("Yavsc.Models.Haircut.HairMultiCutQuery") b.HasOne("Yavsc.Models.Haircut.HairMultiCutQuery")
.WithMany() .WithMany()
.HasForeignKey("HairMultiCutQueryId"); .HasForeignKey("QueryId");
}); });
modelBuilder.Entity("Yavsc.Models.Haircut.HairTaint", b => modelBuilder.Entity("Yavsc.Models.Haircut.HairTaint", b =>
@ -1237,10 +1260,17 @@ namespace Yavsc.Migrations
b.HasOne("Yavsc.Models.Drawing.Color") b.HasOne("Yavsc.Models.Drawing.Color")
.WithMany() .WithMany()
.HasForeignKey("ColorId"); .HasForeignKey("ColorId");
});
modelBuilder.Entity("Yavsc.Models.Haircut.HairTaintInstance", b =>
{
b.HasOne("Yavsc.Models.Haircut.HairPrestation") b.HasOne("Yavsc.Models.Haircut.HairPrestation")
.WithMany() .WithMany()
.HasForeignKey("HairPrestationId"); .HasForeignKey("PrestationId");
b.HasOne("Yavsc.Models.Haircut.HairTaint")
.WithMany()
.HasForeignKey("TaintId");
}); });
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b => modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>

@ -27,6 +27,7 @@ namespace Yavsc.Models
using Workflow.Profiles; using Workflow.Profiles;
using Drawing; using Drawing;
using Yavsc.Attributes; using Yavsc.Attributes;
using Yavsc.Models.Bank;
public class ApplicationDbContext : IdentityDbContext<ApplicationUser> public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{ {
@ -47,6 +48,7 @@ namespace Yavsc.Models
builder.Entity<CircleAuthorizationToBlogPost>().HasKey(a=> new { a.CircleId, a.BlogPostId}); builder.Entity<CircleAuthorizationToBlogPost>().HasKey(a=> new { a.CircleId, a.BlogPostId});
builder.Entity<CircleMember>().HasKey(c=> new { MemberId = c.MemberId, CircleId = c.CircleId }); builder.Entity<CircleMember>().HasKey(c=> new { MemberId = c.MemberId, CircleId = c.CircleId });
builder.Entity<DimissClicked>().HasKey(c=>new { uid = c.UserId, notid = c.NotificationId}); builder.Entity<DimissClicked>().HasKey(c=>new { uid = c.UserId, notid = c.NotificationId});
builder.Entity<HairTaintInstance>().HasKey(ti=>new { ti.TaintId, ti.PrestationId } );
foreach (var et in builder.Model.GetEntityTypes()) { foreach (var et in builder.Model.GetEntityTypes()) {
if (et.ClrType.GetInterface("IBaseTrackedEntity")!=null) if (et.ClrType.GetInterface("IBaseTrackedEntity")!=null)
@ -115,6 +117,7 @@ namespace Yavsc.Models
/// <returns></returns> /// <returns></returns>
public DbSet<RdvQuery> RdvQueries { get; set; } public DbSet<RdvQuery> RdvQueries { get; set; }
public DbSet<HairCutQuery> HairCutQueries { get; set; } public DbSet<HairCutQuery> HairCutQueries { get; set; }
public DbSet<HairPrestation> HairPrestation { get; set; }
public DbSet<HairMultiCutQuery> HairMultiCutQueries { get; set; } public DbSet<HairMultiCutQuery> HairMultiCutQueries { get; set; }
public DbSet<PerformerProfile> Performers { get; set; } public DbSet<PerformerProfile> Performers { get; set; }
public DbSet<Estimate> Estimates { get; set; } public DbSet<Estimate> Estimates { get; set; }
@ -298,11 +301,10 @@ namespace Yavsc.Models
public DbSet<DimissClicked> DimissClicked { get; set; } public DbSet<DimissClicked> DimissClicked { get; set; }
public DbSet<HairPrestation> HairPrestation { get; set; }
[ActivitySettings] [ActivitySettings]
public DbSet<BrusherProfile> BrusherProfile { get; set; } public DbSet<BrusherProfile> BrusherProfile { get; set; }
public DbSet<BankIdentity> BankIdentity { get; set; }
} }
} }

@ -5,7 +5,6 @@ using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models.Billing namespace Yavsc.Models.Billing
{ {
using Interfaces.Workflow;
using Newtonsoft.Json; using Newtonsoft.Json;
using Workflow; using Workflow;
using YavscLib; using YavscLib;
@ -32,6 +31,7 @@ namespace Yavsc.Models.Billing
get; set; get; set;
} }
[DisplayAttribute(Name="Status de la requête")]
public QueryStatus Status { get; set; } public QueryStatus Status { get; set; }
[Required] [Required]
@ -40,7 +40,7 @@ namespace Yavsc.Models.Billing
/// <summary> /// <summary>
/// The client /// The client
/// </summary> /// </summary>
[ForeignKey("ClientId")] [ForeignKey("ClientId"),Display(Name="Client")]
public ApplicationUser Client { get; set; } public ApplicationUser Client { get; set; }
[Required] [Required]
@ -48,13 +48,13 @@ namespace Yavsc.Models.Billing
/// <summary> /// <summary>
/// The performer identifier /// The performer identifier
/// </summary> /// </summary>
[ForeignKey("PerformerId")] [ForeignKey("PerformerId"),Display(Name="Préstataire")]
public PerformerProfile PerformerProfile { get; set; } public PerformerProfile PerformerProfile { get; set; }
public DateTime? ValidationDate {get; set;} public DateTime? ValidationDate {get; set;}
[Display(Name="Montant prévisionel de la préstation")]
public decimal? Previsional { get; set; } public decimal? Previsional { get; set; }
/// <summary> /// <summary>
/// The bill /// The bill
@ -64,7 +64,7 @@ namespace Yavsc.Models.Billing
[Required] [Required]
public string ActivityCode { get; set; } public string ActivityCode { get; set; }
[ForeignKey("ActivityCode"),JsonIgnore] [ForeignKey("ActivityCode"),JsonIgnore,Display(Name="Domaine d'activité")]
public virtual Activity Context  { get; set ; } public virtual Activity Context  { get; set ; }
} }
} }

@ -12,39 +12,53 @@ namespace Yavsc.Models
public partial class Blog : IBlog, ICircleAuthorized public partial class Blog : IBlog, ICircleAuthorized
{ {
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)] [Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Display(Name="Identifiant du post")]
public long Id { get; set; } public long Id { get; set; }
[Display(Name="Contenu")]
public string Content { get; set; } public string Content { get; set; }
[Display(Name="Photo")]
public string Photo { get; set; } public string Photo { get; set; }
[Display(Name="Indice de qualité")]
public int Rate { get; set; } public int Rate { get; set; }
[Display(Name="Titre")]
public string Title { get; set; } public string Title { get; set; }
[Display(Name="Identifiant de l'auteur")]
public string AuthorId { get; set; } public string AuthorId { get; set; }
[Display(Name="Auteur")]
[ForeignKey("AuthorId"),JsonIgnore] [ForeignKey("AuthorId"),JsonIgnore]
public ApplicationUser Author { set; get; } public ApplicationUser Author { set; get; }
[Display(Name="Visible")]
public bool Visible { get; set; } public bool Visible { get; set; }
[Display(Name="Date de création")]
public DateTime DateCreated public DateTime DateCreated
{ {
get; set; get; set;
} }
[Display(Name="Créateur")]
public string UserCreated public string UserCreated
{ {
get; set; get; set;
} }
[Display(Name="Dernière modification")]
public DateTime DateModified public DateTime DateModified
{ {
get; set; get; set;
} }
[Display(Name="Utilisateur ayant modifé le dernier")]
public string UserModified public string UserModified
{ {
get; set; get; set;
} }
[InverseProperty("Target")] [InverseProperty("Target")]
[Display(Name="Liste de contrôle d'accès")]
public virtual List<CircleAuthorizationToBlogPost> ACL { get; set; } public virtual List<CircleAuthorizationToBlogPost> ACL { get; set; }
public bool AuthorizeCircle(long circleId) public bool AuthorizeCircle(long circleId)

@ -8,7 +8,7 @@ namespace Yavsc.Models.Chat
public class Connection : IConnection public class Connection : IConnection
{ {
[JsonIgnore] [JsonIgnore,Required]
public string ApplicationUserId { get; set; } public string ApplicationUserId { get; set; }
[ForeignKey("ApplicationUserId"),JsonIgnore] [ForeignKey("ApplicationUserId"),JsonIgnore]
public virtual ApplicationUser Owner { get; set; } public virtual ApplicationUser Owner { get; set; }

@ -15,17 +15,32 @@ namespace Yavsc.Models.Haircut
[Required] [Required]
public long PrestationId { get; set; } public long PrestationId { get; set; }
[ForeignKey("PrestationId")] [ForeignKey("PrestationId"),Required,Display(Name="Préstation")]
public virtual HairPrestation Prestation { get; set; } public virtual HairPrestation Prestation { get; set; }
[Required] [ForeignKey("LocationId")]
[Display(Name="Lieu du rendez-vous")]
[DisplayFormat(ConvertEmptyStringToNull = true, NullDisplayText = "[Pas de lieu spécifié]")]
public virtual Location Location { get; set; }
public Location Location { get; set; } [Display(Name="Date et heure")]
[DisplayFormat(NullDisplayText = "[Pas de date ni heure]",ApplyFormatInEditMode=true, DataFormatString = "{0:d}")]
public DateTime? EventDate
{
get;
set;
}
public DateTime EventDate public long? LocationId
{ {
get; get;
set; set;
} }
[Display(Name="Informations complémentaires"),
StringLengthAttribute(512)]
[DisplayFormat(ConvertEmptyStringToNull = true, NullDisplayText = "[pas d'informations complémentaires]")]
public string AdditionalInfo { get; set; }
} }
} }

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

@ -1,4 +1,5 @@
using System; using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Billing; using Yavsc.Models.Billing;
@ -6,11 +7,27 @@ using Yavsc.Models.Relationship;
namespace Yavsc.Models.Haircut namespace Yavsc.Models.Haircut
{ {
public class HairPrestationCollectionItem {
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
public long PrestationId { get; set; }
[ForeignKeyAttribute("PrestationId")]
public virtual HairPrestation Prestation { get; set; }
public long QueryId { get; set; }
[ForeignKeyAttribute("QueryId")]
public virtual HairMultiCutQuery Query { get; set; }
}
public class HairMultiCutQuery : NominativeServiceCommand public class HairMultiCutQuery : NominativeServiceCommand
{ {
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)] [Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; } public long Id { get; set; }
HairPrestation [] Prestations { get; set; }
[InversePropertyAttribute("Query")]
public virtual List<HairPrestationCollectionItem> Prestations { get; set; }
public Location Location { get; set; } public Location Location { get; set; }

@ -1,7 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
namespace Yavsc.Models.Haircut namespace Yavsc.Models.Haircut
{ {
@ -34,12 +34,24 @@ namespace Yavsc.Models.Haircut
[Display(Name="Shampoing")] [Display(Name="Shampoing")]
public bool Shampoo { get; set; } public bool Shampoo { get; set; }
[Display(Name="Couleurs")] [Display(Name="Couleurs"),JsonIgnore,InverseProperty("Prestation")]
public virtual List<HairTaint> Taints { get; set; } public virtual List<HairTaintInstance> Taints { get; set; }
[Display(Name="Soins")] [Display(Name="Soins")]
public bool Cares { get; set; } public bool Cares { get; set; }
}
public class HairTaintInstance {
public long TaintId { get; set; }
[ForeignKey("TaintId")]
public virtual HairTaint Taint { get; set; }
public long PrestationId { get; set; }
[ForeignKey("PrestationId")]
public virtual HairPrestation Prestation { get; set; }
} }
} }

@ -6,7 +6,7 @@ namespace Yavsc.Models.Haircut
public enum HairTechnos public enum HairTechnos
{ {
[Display(Name="Aucune technique spécifique")] [Display(Name="Aucune technique spécifique")]
None, NoTech,
[Display(Name="Couleur")] [Display(Name="Couleur")]
Color, Color,

@ -0,0 +1,51 @@
using System;
using System.ComponentModel.DataAnnotations;
using Yavsc.Models.Auth;
using Yavsc.Models.Relationship;
using YavscLib;
namespace Yavsc.Models.Haircut.Views
{
public class HaircutQueryProviderInfo : HaircutQueryComonInfo {
public HaircutQueryProviderInfo(HairCutQuery query) : base (query)
{
ClientInfo = new UserInfo(query.Client);
}
public UserInfo ClientInfo { get; set; }
}
public class HaircutQueryClientInfo : HaircutQueryComonInfo {
public HaircutQueryClientInfo(HairCutQuery query) : base (query)
{
ProviderInfo = new UserInfo(query.PerformerProfile.Performer);
}
public UserInfo ProviderInfo { get; set; }
}
public class HaircutQueryComonInfo
{
public HaircutQueryComonInfo(HairCutQuery query)
{
Id = query.Id;
Prestation = query.Prestation;
Status = query.Status;
Location = query.Location;
EventDate = query.EventDate;
AdditionalInfo = query.AdditionalInfo;
}
public long Id { get; set; }
public HairPrestation Prestation { get; set; }
public QueryStatus Status { get; set; }
public virtual Location Location { get; set; }
public DateTime? EventDate
{
get;
set;
}
[Display(Name="Informations complémentaires")]
public string AdditionalInfo { get; set; }
}
}

@ -1,4 +1,4 @@
namespace Yavsc.Models.Market { namespace Yavsc.Models {
public interface IUnit<VType> { public interface IUnit<VType> {
string Name { get; } string Name { get; }
bool CanConvertFrom(IUnit<VType> other); bool CanConvertFrom(IUnit<VType> other);

@ -18,13 +18,13 @@ namespace Yavsc.Models
/// <summary> /// <summary>
/// Another me, as a byte array. /// Another me, as a byte array.
/// This value points a picture that may be used /// This value points a picture that may be used
/// to sign documents. /// to present the user
/// </summary> /// </summary>
/// <returns>the path to an user's image, relative to it's dir<summary> /// <returns>the path to an user's image, relative to it's user dir<summary>
/// <see>Startup.UserFilesOptions</see> /// <see>Startup.UserFilesOptions</see>
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[MaxLength(512),Required] [MaxLength(512)]
public string Avatar { get; set; } public string Avatar { get; set; }
[MaxLength(512)] [MaxLength(512)]
@ -75,7 +75,9 @@ namespace Yavsc.Models
/// Billing postal address /// Billing postal address
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[ForeignKeyAttribute("PostalAddressId")]
public virtual Location PostalAddress { get; set; } public virtual Location PostalAddress { get; set; }
public long? PostalAddressId { get; set; }
/// <summary> /// <summary>
/// User's Google calendar /// User's Google calendar
@ -92,7 +94,7 @@ namespace Yavsc.Models
public long DiskQuota { get; set; } = 512*1024*1024; public long DiskQuota { get; set; } = 512*1024*1024;
public long DiskUsage { get; set; } = 0; public long DiskUsage { get; set; } = 0;
[JsonIgnore] [JsonIgnore][InverseProperty("Owner")]
public virtual List<BlackListed> BlackList { get; set; } public virtual List<BlackListed> BlackList { get; set; }
} }
} }

@ -12,7 +12,7 @@ namespace Yavsc.Models
public long Id { get; set; } public long Id { get; set; }
public DateTime EventDate { get; set; } public DateTime? EventDate { get; set; }
public decimal? Previsional { get; set; } public decimal? Previsional { get; set; }
public string Reason { get; set; } public string Reason { get; set; }

@ -14,39 +14,43 @@ namespace Yavsc.Models.Workflow
{ {
[StringLength(512), Required, Key] [StringLength(512), Required, Key]
[Display(Name = "Code")]
public string Code { get; set; } public string Code { get; set; }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[StringLength(512), Required()] [StringLength(512), Required()]
[Display(Name = "Nom")]
public string Name { get; set; } public string Name { get; set; }
[StringLength(512)] [StringLength(512)]
[Display(Name = "Code du parent")]
public string ParentCode { get; set; } public string ParentCode { get; set; }
[ForeignKey("ParentCode"), JsonIgnore] [ForeignKey("ParentCode"), JsonIgnore]
[Display(Name = "Activité parent")]
public virtual Activity Parent { get; set; } public virtual Activity Parent { get; set; }
[InverseProperty("Parent"), JsonIgnore] [InverseProperty("Parent"), JsonIgnore]
[Display(Name = "Activités filles")]
public virtual List<Activity> Children { get; set; } public virtual List<Activity> Children { get; set; }
[Display(Name = "Description")]
public string Description { get; set; } public string Description { get; set; }
/// <summary>
/// Name to associate to a performer in this activity domain
/// </summary>
[Obsolete]
public string ActorDenomination { get; set; }
[Display(Name = "Photo")]
public string Photo { get; set; } public string Photo { get; set; }
[InverseProperty("Context")] [InverseProperty("Context")]
[DisplayAttribute(Name = "Services liés")]
public List<Service> Services { get; set; } public List<Service> Services { get; set; }
/// <summary> /// <summary>
/// Moderation settings /// Moderation settings
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[DisplayAttribute(Name = "Groupe de modération")]
public string ModeratorGroupName { get; set; } public string ModeratorGroupName { get; set; }
/// <summary> /// <summary>
@ -55,34 +59,42 @@ namespace Yavsc.Models.Workflow
/// Valide entre 0 et 100, /// Valide entre 0 et 100,
/// Il démarre à 0. /// Il démarre à 0.
/// </summary> /// </summary>
[Range(0, 100)] [Range(0, 100)][DisplayAttribute(Name = "Indice d'exposition")]
[DisplayFormatAttribute(DataFormatString="{0}%")]
public int Rate { get; set; } public int Rate { get; set; }
[DisplayAttribute(Name = "SettingsClass")] [DisplayAttribute(Name = "Classe de paramétrage")]
public string SettingsClassName { get; set; } public string SettingsClassName { get; set; }
[InverseProperty("Context")] [InverseProperty("Context")]
[Display(Name="Formulaires de commande")]
public virtual List<CommandForm> Forms { get; set; } public virtual List<CommandForm> Forms { get; set; }
[Display(Name="Date de création")]
public DateTime DateCreated public DateTime DateCreated
{ {
get; set; get; set;
} }
[Display(Name="Createur")]
public string UserCreated public string UserCreated
{ {
get; set; get; set;
} }
[Display(Name="Date de dernière modification")]
public DateTime DateModified public DateTime DateModified
{ {
get; set; get; set;
} }
[Display(Name="Utilisateur ayant modifié le dernier")]
public string UserModified public string UserModified
{ {
get; set; get; set;
} }
[Display(Name="Caché")]
public bool Hidden { get; set; } public bool Hidden { get; set; }
} }

@ -1,6 +1,5 @@
namespace Yavsc.Models.Workflow namespace Yavsc.Models.Workflow
{ {
using Interfaces.Workflow;
using YavscLib; using YavscLib;
public interface IQuery: IBaseTrackedEntity public interface IQuery: IBaseTrackedEntity

@ -35,6 +35,8 @@ namespace Yavsc.Models.Workflow
set; set;
get; get;
} }
[Display(Name="GiveAnExplicitReason")]
public string Reason { get; set; } public string Reason { get; set; }
public RdvQuery() public RdvQuery()

@ -167,6 +167,7 @@
<data name="Circles"><value>Cercles</value></data> <data name="Circles"><value>Cercles</value></data>
<data name="Click action"><value>Action sur click</value></data> <data name="Click action"><value>Action sur click</value></data>
<data name="Click here to log in"><value>Cliquez ici pour vous identifier</value></data> <data name="Click here to log in"><value>Cliquez ici pour vous identifier</value></data>
<data name="Color"><value>Couleur</value></data>
<data name="Command"><value>Commande</value></data> <data name="Command"><value>Commande</value></data>
<data name="Command confirmation"><value>Confirmation de commande</value></data> <data name="Command confirmation"><value>Confirmation de commande</value></data>
<data name="Comment"><value>Commentaire</value></data> <data name="Comment"><value>Commentaire</value></data>
@ -183,6 +184,7 @@
<data name="DateCreated"><value>Date de création</value></data> <data name="DateCreated"><value>Date de création</value></data>
<data name="DateModified"><value>Date de dernière modification</value></data> <data name="DateModified"><value>Date de dernière modification</value></data>
<data name="DB"><value>Base de données</value></data> <data name="DB"><value>Base de données</value></data>
<data name="Defris"><value>Défrisage</value></data>
<data name="Details"><value>Détails</value></data> <data name="Details"><value>Détails</value></data>
<data name="Delete"><value>Supprimer</value></data> <data name="Delete"><value>Supprimer</value></data>
<data name="Deposit"><value>Arrhes</value></data> <data name="Deposit"><value>Arrhes</value></data>
@ -239,6 +241,8 @@
<data name="Google calendar"><value>Agenda Google</value></data> <data name="Google calendar"><value>Agenda Google</value></data>
<data name="Google error"><value>Erreur Google : {0}</value></data> <data name="Google error"><value>Erreur Google : {0}</value></data>
<data name="Google registration id"><value>Identifiant d'enregistrement Google</value></data> <data name="Google registration id"><value>Identifiant d'enregistrement Google</value></data>
<data name="HalfLong"><value>mi-long</value></data>
<data name="HaircutRdvQuery"><value>Demande de préstation en coiffure à domicile</value></data>
<data name="Hide source"><value>Cacher le texte source de l'article</value></data> <data name="Hide source"><value>Cacher le texte source de l'article</value></data>
<data name="Home"><value>Accueil</value></data> <data name="Home"><value>Accueil</value></data>
<data name="Hide"><value>Cacher</value></data> <data name="Hide"><value>Cacher</value></data>
@ -247,7 +251,6 @@
<data name="Icon"><value>Icône</value></data> <data name="Icon"><value>Icône</value></data>
<data name="Icons made by"><value>Les icônes fabriqués par</value></data> <data name="Icons made by"><value>Les icônes fabriqués par</value></data>
<data name="Identity"><value>Identité</value></data> <data name="Identity"><value>Identité</value></data>
<data name="ImgLocator"><value>URI de l'image</value></data> <data name="ImgLocator"><value>URI de l'image</value></data>
<data name="ImportException"><value>Exception à l'import</value></data> <data name="ImportException"><value>Exception à l'import</value></data>
<data name="InternalServerError"><value>Erreur serveur interne</value></data> <data name="InternalServerError"><value>Erreur serveur interne</value></data>
@ -255,17 +258,21 @@
<data name="is asking you for a date"><value>vous demande un rendez-vous</value></data> <data name="is asking you for a date"><value>vous demande un rendez-vous</value></data>
<data name="is licensed_by"><value>sont sous licence</value></data> <data name="is licensed_by"><value>sont sous licence</value></data>
<data name="Item added to basket"><value>Article ajouté au panier.</value></data> <data name="Item added to basket"><value>Article ajouté au panier.</value></data>
<data name="Kid"><value>Enfant</value></data>
<data name="Location"><value>Lieu</value></data> <data name="Location"><value>Lieu</value></data>
<data name="Login"><value>Connection</value></data> <data name="Login"><value>Connection</value></data>
<data name="Log in"><value>Se connecter</value></data> <data name="Log in"><value>Se connecter</value></data>
<data name="Logout"><value>Déconnection</value></data> <data name="Logout"><value>Déconnection</value></data>
<data name="Long"><value>long</value></data>
<data name="MainActivity"><value>Activité principale</value></data> <data name="MainActivity"><value>Activité principale</value></data>
<data name="Man"><value>Homme</value><comment></comment></data>
<data name="Manage"><value>Gérer</value></data> <data name="Manage"><value>Gérer</value></data>
<data name="Manage your account"><value>Gérez votre inscription</value></data> <data name="Manage your account"><value>Gérez votre inscription</value></data>
<data name="ManagedSiteSkills"><value>Compétences gérée sur ce site</value></data> <data name="ManagedSiteSkills"><value>Compétences gérée sur ce site</value></data>
<data name="MaxDate"><value>Date maximale du rendez-vous</value></data> <data name="MaxDate"><value>Date maximale du rendez-vous</value></data>
<data name="MaxDailyCost"><value>Coût maximal journalier</value></data> <data name="MaxDailyCost"><value>Coût maximal journalier</value></data>
<data name="MEACode"><value>Code d'Activité Principalement Exercée</value></data> <data name="MEACode"><value>Code d'Activité Principalement Exercée</value></data>
<data name="Mech"><value>Mêches</value></data>
<data name="Members"><value>Membres</value></data> <data name="Members"><value>Membres</value></data>
<data name="Message sent"><value>Votre message a été envoyé</value></data> <data name="Message sent"><value>Votre message a été envoyé</value></data>
<data name="MinDate"><value>Date minimale du rendez-vous</value></data> <data name="MinDate"><value>Date minimale du rendez-vous</value></data>
@ -274,7 +281,6 @@
<data name="Modified"><value>Modifié</value></data> <data name="Modified"><value>Modifié</value></data>
<data name="Modify"><value>Modifier</value></data> <data name="Modify"><value>Modifier</value></data>
<data name="Modify settings"><value>Modifier les paramètres</value></data> <data name="Modify settings"><value>Modifier les paramètres</value></data>
<data name="My Estimates"><value>Mes estimations</value></data> <data name="My Estimates"><value>Mes estimations</value></data>
<data name="Name"><value>Nom</value></data> <data name="Name"><value>Nom</value></data>
<data name="Needs"><value>Besoins</value></data> <data name="Needs"><value>Besoins</value></data>
@ -284,16 +290,19 @@
<data name="NewPasswordMessageSent"><value>Un e-mail vient de vous être envoyé, il contient le lien à suivre <data name="NewPasswordMessageSent"><value>Un e-mail vient de vous être envoyé, il contient le lien à suivre
pour pouvoir mettre à jour votre mot de passe.</value></data> pour pouvoir mettre à jour votre mot de passe.</value></data>
<data name="No"><value>Non</value></data> <data name="No"><value>Non</value></data>
<data name="NoTech"><value>Pas de technique spécifiée</value></data>
<data name="No calendar for this user"><value>Le préstataire n'a pas de calendrier associé.</value></data> <data name="No calendar for this user"><value>Le préstataire n'a pas de calendrier associé.</value></data>
<data name="no content"><value>pas de contenu</value></data> <data name="no content"><value>pas de contenu</value></data>
<data name="No deposit"><value>Aucune arrhes n'a été prévue</value></data> <data name="No deposit"><value>Aucune arrhes n'a été prévue</value></data>
<data name="none"><value>aucun</value></data> <data name="none"><value>aucun(e)</value></data>
<data name="Non existent user"><value>Non existent user</value></data> <data name="Non existent user"><value>Non existent user</value></data>
<data name="NoSkillforthisactivity"><value>Aucune compétence n'a été enregistrée par aucun préstataire pour cette activité.</value></data> <data name="NoSkillforthisactivity"><value>Aucune compétence n'a été enregistrée par aucun préstataire pour cette activité.</value></data>
<data name="Not Approuved"><value>Non approuvé</value></data> <data name="Not Approuved"><value>Non approuvé</value></data>
<data name="NonValidee"><value>Non validée</value></data> <data name="NonValidee"><value>Non validée</value></data>
<data name="NonValide"><value>Non validé</value></data> <data name="NonValide"><value>Non validé</value></data>
<data name="off"><value>inactif</value></data>
<data name="Offline"><value>Hors ligne</value></data> <data name="Offline"><value>Hors ligne</value></data>
<data name="on"><value>actif</value></data>
<data name="Online"><value>En ligne</value></data> <data name="Online"><value>En ligne</value></data>
<data name="OnlyAuthorizedMayContact"><value>Seuls les utilisateurs authorisés peuvent contacter un préstataire par courrier.</value></data> <data name="OnlyAuthorizedMayContact"><value>Seuls les utilisateurs authorisés peuvent contacter un préstataire par courrier.</value></data>
<data name="Password"><value>Mot de passe</value></data> <data name="Password"><value>Mot de passe</value></data>
@ -303,6 +312,7 @@
<data name="Performers"><value>Perstataires</value></data> <data name="Performers"><value>Perstataires</value></data>
<data name="Performer"><value>Préstataire</value></data> <data name="Performer"><value>Préstataire</value></data>
<data name="PerformerProfile"><value>Profile préstataire</value></data> <data name="PerformerProfile"><value>Profile préstataire</value></data>
<data name="Permanent"><value>Permanante</value></data>
<data name="Person"><value>Personne</value></data> <data name="Person"><value>Personne</value></data>
<data name="Photo"><value>Photo</value></data> <data name="Photo"><value>Photo</value></data>
<data name="PhotoUpdated"><value>Photo mise à jour</value></data> <data name="PhotoUpdated"><value>Photo mise à jour</value></data>
@ -320,7 +330,6 @@
<data name="Product reference"><value>Référence produit</value></data> <data name="Product reference"><value>Référence produit</value></data>
<data name="prestation"><value>prestation</value></data> <data name="prestation"><value>prestation</value></data>
<data name="Professional settings"><value>Paramètres professionels</value></data> <data name="Professional settings"><value>Paramètres professionels</value></data>
<data name="Provider"><value>Fournisseur</value></data> <data name="Provider"><value>Fournisseur</value></data>
<data name="ProviderId"><value>Identifiant du fournisseur</value></data> <data name="ProviderId"><value>Identifiant du fournisseur</value></data>
<data name="ProviderName"><value>Nom du fournisseur</value></data> <data name="ProviderName"><value>Nom du fournisseur</value></data>
@ -349,8 +358,9 @@
<data name="Send a public message"><value>Envoyer un message publique</value></data> <data name="Send a public message"><value>Envoyer un message publique</value></data>
<data name="Set"><value>Positioner</value></data> <data name="Set"><value>Positioner</value></data>
<data name="SettingsClass"><value>Classe du paramétrage</value></data> <data name="SettingsClass"><value>Classe du paramétrage</value></data>
<data name="Short"><value>court</value></data>
<data name="Son blog"><value>Son blog</value></data>
<data name="Your performer profile"><value>Votre profile professionel</value></data> <data name="Your performer profile"><value>Votre profile professionel</value></data>
<data name="Setup below your activity parameters"><value>Positionnez ci-après vos les paramêtre de votre activité</value></data> <data name="Setup below your activity parameters"><value>Positionnez ci-après vos les paramêtre de votre activité</value></data>
<data name="SiteSkills"><value>Talents/Compétences/Spécialités gérés sur ce site</value></data> <data name="SiteSkills"><value>Talents/Compétences/Spécialités gérés sur ce site</value></data>
<data name="Skill"><value>Compétence</value></data> <data name="Skill"><value>Compétence</value></data>
@ -387,12 +397,12 @@
<data name="UserSkills"><value>Talents/compétences/spécialités utilisateur</value></data> <data name="UserSkills"><value>Talents/compétences/spécialités utilisateur</value></data>
<data name="UserNotInThisRole"><value>Le rôle demandé n'est pas assumé par ce préstataire</value></data> <data name="UserNotInThisRole"><value>Le rôle demandé n'est pas assumé par ce préstataire</value></data>
<data name="ValidationDate"><value>Date de validation</value></data> <data name="ValidationDate"><value>Date de validation</value></data>
<data name="View_source"><value>Voir le texte source de l'article</value></data> <data name="View_source"><value>Voir le texte source de l'article</value></data>
<data name="was_added_to_the_role"><value>a été ajouté au rôle</value></data> <data name="was_added_to_the_role"><value>a été ajouté au rôle</value></data>
<data name="was_added_to_the_empty_role"><value>Il n'y avait pas d'utilisateur dans le rôle "{1}". Vous ({0}) avez été ajouté au rôle "{1}".</value></data> <data name="was_added_to_the_empty_role"><value>Il n'y avait pas d'utilisateur dans le rôle "{1}". Vous ({0}) avez été ajouté au rôle "{1}".</value></data>
<data name="WebSite"><value>Site Web</value><comment></comment></data> <data name="WebSite"><value>Site Web</value><comment></comment></data>
<data name="Welcome"><value>Bienvenue</value><comment></comment></data> <data name="Welcome"><value>Bienvenue</value><comment></comment></data>
<data name="Women"><value>Femme</value><comment></comment></data>
<data name="XHasBeenNotified"><value>{0} à été notifié de votre demande, vous devriez être contacté rapidement</value></data> <data name="XHasBeenNotified"><value>{0} à été notifié de votre demande, vous devriez être contacté rapidement</value></data>
<data name="Xshouldbeavailable"><value>Au vu de son calendrier, <data name="Xshouldbeavailable"><value>Au vu de son calendrier,
{0} devrait être disponible pour ce rendez-vous</value></data> {0} devrait être disponible pour ce rendez-vous</value></data>
@ -401,14 +411,12 @@
<data name="Yavsc.Models.Workflow.Profiles.FormationSettings"><value>Paramètres formation (les partenaires)</value></data> <data name="Yavsc.Models.Workflow.Profiles.FormationSettings"><value>Paramètres formation (les partenaires)</value></data>
<data name="Yavsc.Models.Musical.Profiles.GeneralSettings"><value>Paramètres généraux (visibilité et présentation)</value></data> <data name="Yavsc.Models.Musical.Profiles.GeneralSettings"><value>Paramètres généraux (visibilité et présentation)</value></data>
<data name="Yavsc.Models.Haircut.BrusherProfile"><value>Paramètres coiffeur: tarifs, disponibilité</value></data> <data name="Yavsc.Models.Haircut.BrusherProfile"><value>Paramètres coiffeur: tarifs, disponibilité</value></data>
<data name="Yes"><value>Oui</value></data> <data name="Yes"><value>Oui</value></data>
<data name="YouNeedToBeAuthenticatedIOToContact"><value>Vous devez vous authentifier pour pouvoir demander un devis <data name="YouNeedToBeAuthenticatedIOToContact"><value>Vous devez vous authentifier pour pouvoir demander un devis
à un préstataire.</value></data> à un préstataire.</value></data>
<data name="younotadmin"><value>Vous n'êtes pas administrateur</value></data> <data name="younotadmin"><value>Vous n'êtes pas administrateur</value></data>
<data name="Your book query"><value>Votre demande de rendez-vous</value></data> <data name="Your book query"><value>Votre demande de rendez-vous</value></data>
<data name="Your password has been reset."><value>Votre mote de passe a été mis à jour.</value></data> <data name="Your password has been reset."><value>Votre mote de passe a été mis à jour.</value></data>
<data name="YourEstimates"><value>Vos Devis</value></data> <data name="YourEstimates"><value>Vos Devis</value></data>
<data name="YourMEACode"><value>Votre activité</value></data> <data name="YourMEACode"><value>Votre activité</value></data>
<data name="YourNeed"><value>Votre besoin</value></data> <data name="YourNeed"><value>Votre besoin</value></data>

@ -6,7 +6,6 @@ using Microsoft.AspNet.FileProviders;
using Microsoft.AspNet.Hosting; using Microsoft.AspNet.Hosting;
using Microsoft.AspNet.Http; using Microsoft.AspNet.Http;
using Microsoft.AspNet.StaticFiles; using Microsoft.AspNet.StaticFiles;
using Yavsc.ViewModels;
using Yavsc.ViewModels.Auth; using Yavsc.ViewModels.Auth;
namespace Yavsc namespace Yavsc

@ -3,7 +3,6 @@ using System;
using System.Globalization; using System.Globalization;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
using System.Threading.Tasks;
using System.Web.Optimization; using System.Web.Optimization;
using Microsoft.AspNet.Authentication; using Microsoft.AspNet.Authentication;
using Microsoft.AspNet.Authorization; using Microsoft.AspNet.Authorization;
@ -91,7 +90,7 @@ namespace Yavsc
{ {
var supportedCultures = new[] var supportedCultures = new[]
{ {
new CultureInfo("fr") new CultureInfo("en")
}; };
var supportedUICultures = new[] var supportedUICultures = new[]
{ {
@ -113,11 +112,16 @@ namespace Yavsc
// - QueryStringRequestCultureProvider, sets culture via "culture" and "ui-culture" query string values, useful for testing // - QueryStringRequestCultureProvider, sets culture via "culture" and "ui-culture" query string values, useful for testing
// - CookieRequestCultureProvider, sets culture via "ASPNET_CULTURE" cookie // - CookieRequestCultureProvider, sets culture via "ASPNET_CULTURE" cookie
// - AcceptLanguageHeaderRequestCultureProvider, sets culture via the "Accept-Language" request header // - AcceptLanguageHeaderRequestCultureProvider, sets culture via the "Accept-Language" request header
//options.RequestCultureProviders.Insert(0, new CustomRequestCultureProvider(async context => //options.RequestCultureProviders.Insert(0, new CustomRequestCultureProvider(async context =>
//{ //{
// // My custom request culture logic // // My custom request culture logic
// return new ProviderCultureResult("en"); // return new ProviderCultureResult("fr");
//})); //}));
options.RequestCultureProviders.Insert(0, new AcceptLanguageHeaderRequestCultureProvider());
options.RequestCultureProviders.Insert(0, new CookieRequestCultureProvider());
}); });
@ -126,7 +130,7 @@ namespace Yavsc
services.Add(ServiceDescriptor.Singleton(typeof(IOptions<SmtpSettings>), typeof(OptionsManager<SmtpSettings>))); services.Add(ServiceDescriptor.Singleton(typeof(IOptions<SmtpSettings>), typeof(OptionsManager<SmtpSettings>)));
services.Add(ServiceDescriptor.Singleton(typeof(IOptions<GoogleAuthSettings>), typeof(OptionsManager<GoogleAuthSettings>))); services.Add(ServiceDescriptor.Singleton(typeof(IOptions<GoogleAuthSettings>), typeof(OptionsManager<GoogleAuthSettings>)));
services.Add(ServiceDescriptor.Singleton(typeof(IOptions<CompanyInfoSettings>), typeof(OptionsManager<CompanyInfoSettings>))); services.Add(ServiceDescriptor.Singleton(typeof(IOptions<CompanyInfoSettings>), typeof(OptionsManager<CompanyInfoSettings>)));
services.Add(ServiceDescriptor.Singleton(typeof(IOptions<RequestLocalizationOptions>), typeof(OptionsManager<RequestLocalizationOptions>)));
// DataProtection // DataProtection
ConfigureProtectionServices(services); ConfigureProtectionServices(services);
@ -207,7 +211,7 @@ namespace Yavsc
options.ResourcesPath = "Resources"; options.ResourcesPath = "Resources";
}).AddDataAnnotationsLocalization(); }).AddDataAnnotationsLocalization();
services.AddScoped<LanguageActionFilter>(); // services.AddScoped<LanguageActionFilter>();
// Inject ticket formatting // Inject ticket formatting
services.AddTransient(typeof(ISecureDataFormat<>), typeof(SecureDataFormat<>)); services.AddTransient(typeof(ISecureDataFormat<>), typeof(SecureDataFormat<>));
@ -223,6 +227,7 @@ namespace Yavsc
{ {
options.ResourcesPath = "Resources"; options.ResourcesPath = "Resources";
}); });
} }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
@ -296,33 +301,6 @@ namespace Yavsc
else throw ex; else throw ex;
} }
} }
Task.Run(async () =>
{
// Creates roles when they don't exist
foreach (string roleName in new string[] {Constants.AdminGroupName,
Constants.StarGroupName, Constants.PerformerGroupName,
Constants.FrontOfficeGroupName,
Constants.StarHunterGroupName
})
if (!await roleManager.RoleExistsAsync(roleName))
{
var role = new IdentityRole { Name = roleName };
var resultCreate = await roleManager.CreateAsync(role);
if (!resultCreate.Succeeded)
{
throw new Exception("The role '{roleName}' does not exist and could not be created.");
}
}
// FIXME In a perfect world, connection records should be dropped at shutdown, but:
using (var db = new ApplicationDbContext())
{
foreach (var c in db.Connections)
db.Connections.Remove(c);
db.SaveChanges();
}
});
app.UseIISPlatformHandler(options => app.UseIISPlatformHandler(options =>
{ {
@ -330,8 +308,6 @@ namespace Yavsc
options.AutomaticAuthentication = false; options.AutomaticAuthentication = false;
}); });
ConfigureOAuthApp(app, SiteSetup); ConfigureOAuthApp(app, SiteSetup);
ConfigureFileServerApp(app, SiteSetup, env, authorizationService); ConfigureFileServerApp(app, SiteSetup, env, authorizationService);
ConfigureWebSocketsApp(app, SiteSetup, env); ConfigureWebSocketsApp(app, SiteSetup, env);

@ -1,6 +1,18 @@
namespace Yavsc.Models.Auth namespace Yavsc.Models.Auth
{ {
public class UserInfo { public class UserInfo {
public UserInfo()
{
}
public UserInfo(ApplicationUser user)
{
UserId = user.Id;
UserName = user.UserName;
Avatar = user.Avatar;
}
public string UserId { get; set; } public string UserId { get; set; }
public string UserName { get; set; } public string UserName { get; set; }

@ -9,25 +9,26 @@ namespace Yavsc.ViewModels.Auth.Handlers
{ {
protected override void Handle(AuthorizationContext context, ViewRequirement requirement, Blog resource) protected override void Handle(AuthorizationContext context, ViewRequirement requirement, Blog resource)
{ {
if (context.User.IsInRole(Constants.BlogModeratorGroupName) bool ok=false;
|| context.User.IsInRole(Constants.AdminGroupName)) if (resource.Visible) {
context.Succeed(requirement);
else if (context.User.Identity.IsAuthenticated)
if (resource.AuthorId == context.User.GetUserId())
context.Succeed(requirement);
else if (resource.Visible) {
if (resource.ACL==null) if (resource.ACL==null)
context.Succeed(requirement); ok=true;
else if (resource.ACL.Count>0) else if (resource.ACL.Count==0) ok=true;
{ else {
var uid = context.User.GetUserId(); if (context.User.IsSignedIn()) {
if (resource.ACL.Any(a=>a.Allowed!=null && a.Allowed.Members.Any(m=>m.MemberId == uid ))) var uid = context.User.GetUserId();
context.Succeed(requirement); if (resource.ACL.Any(a=>a.Allowed!=null && a.Allowed.Members.Any(m=>m.MemberId == uid )))
else context.Fail(); ok=true;
}
} }
else context.Succeed(requirement);
} }
else context.Fail(); if (ok) context.Succeed(requirement);
else {
if (context.User.IsInRole(Constants.AdminGroupName) ||
context.User.IsInRole(Constants.BlogModeratorGroupName))
context.Succeed(requirement);
else context.Fail();
}
} }
} }
} }

@ -1,6 +1,6 @@
using Microsoft.AspNet.Authorization; using Microsoft.AspNet.Authorization;
namespace Yavsc.ViewModels namespace Yavsc.ViewModels.Auth
{ {
public class ViewRequirement : IAuthorizationRequirement public class ViewRequirement : IAuthorizationRequirement
{ {

@ -0,0 +1,8 @@
namespace Yavsc.ViewModels
{
public class BasketView
{
public long HairCutActiveQueryCount { get; set; }
}
}

@ -0,0 +1,7 @@
namespace Yavsc.ViewModels.Haircut
{
public class HaircutClientView
{
}
}

@ -0,0 +1,7 @@
namespace Yavsc.ViewModels.Haircut
{
public class HaircutProviderView
{
}
}

@ -1,24 +0,0 @@
namespace Yavsc.ViewModels.Manage
{
using Models.Bank;
public class AddBankInfoViewModel
{
public BankIdentity Data{get; private set; }
public AddBankInfoViewModel(BankIdentity data)
{
this.Data = data;
}
public bool IsValid { get {
return ByIbanBIC || ByAccountNumber ;
}}
public bool ByIbanBIC { get { 
return (Data.BIC != null && Data.IBAN != null) ;
}}
public bool ByAccountNumber { 
get { 
return (Data.BankCode != null && Data.WicketCode != null && Data.AccountNumber != null && Data.BankedKey >0);
}
}
}
}

@ -33,8 +33,8 @@
<form asp-action="Delete"> <form asp-action="Delete">
<div class="form-actions no-color"> <div class="form-actions no-color">
<input type="submit" value="Delete" class="btn btn-default" /> | <input type="submit" value="Delete" class="btn btn-danger" />
<a asp-action="Index">Back to List</a> <a asp-action="Index" class="btn btn-link">Back to List</a>
</div> </div>
</form> </form>
</div> </div>

@ -48,9 +48,7 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label asp-for="SettingsClassName" class="col-md-2 control-label"> <label asp-for="SettingsClassName" class="col-md-2 control-label"></label>
@SR["SettingsClass"]
</label>
<div class="col-md-10"> <div class="col-md-10">
<select asp-for="SettingsClassName" class="form-control" asp-items="@ViewBag.SettingsClassName"> <select asp-for="SettingsClassName" class="form-control" asp-items="@ViewBag.SettingsClassName">
</select> </select>
@ -58,14 +56,19 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label asp-for="Hidden" class="col-md-2 control-label"> <label asp-for="Hidden" class="col-md-2 control-label"></label>
@SR["Hidden"]
</label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="Hidden" class="form-control" /> <input asp-for="Hidden" class="form-control" />
<span asp-validation-for="Hidden" class="text-danger" /> <span asp-validation-for="Hidden" class="text-danger" />
</div> </div>
</div> </div>
<div class="form-group">
<label asp-for="Rate" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="Rate" class="form-control" />
<span asp-validation-for="Rate" class="text-danger" />
</div>
</div>
<div class="form-group"> <div class="form-group">
<div class="col-md-offset-2 col-md-10"> <div class="col-md-offset-2 col-md-10">
<input type="submit" value="Save" class="btn btn-default" /> <input type="submit" value="Save" class="btn btn-default" />

@ -3,7 +3,13 @@
@{ @{
ViewData["Title"] = "Index"; ViewData["Title"] = "Index";
} }
@section scripts {
<script>
$(document).ready(function(){
$("tr[data-hidden=True]").css('background-color','grey')
})
</script>
}
<h2>Index</h2> <h2>Index</h2>
<p> <p>
@ -12,10 +18,10 @@
<table class="table"> <table class="table">
<tr> <tr>
<th> <th>
@Html.DisplayNameFor(model => model.Code) @Html.DisplayNameFor(model => model.Name)
</th> </th>
<th> <th>
@SR["Name"] @Html.DisplayNameFor(model => model.Code)
</th> </th>
<th> <th>
@ -25,20 +31,26 @@
@Html.DisplayNameFor(model => model.Photo) @Html.DisplayNameFor(model => model.Photo)
</th> </th>
<th> <th>
@Html.DisplayNameFor(model => model.Parent) @Html.DisplayNameFor(model => model.Parent)
</th> </th>
<th> <th>
@SR["SettingsClass"] @Html.DisplayNameFor(model => model.SettingsClassName)
</th>
<th>
@Html.DisplayNameFor(model => model.Children)
</th>
<th>
@Html.DisplayNameFor(model => model.Rate)
</th> </th>
</tr> </tr>
@foreach (var item in Model) { @foreach (var item in Model) {
<tr> <tr data-hidden="@item.Hidden">
<td> <td>
@Html.DisplayFor(modelItem => item.Code) <a name="@item.Code" class="btn btn-link"></a> @Html.DisplayFor(modelItem => item.Name)
</td> </td>
<td> <td>
@Html.DisplayFor(modelItem => item.Name) @Html.DisplayFor(modelItem => item.Code)
</td> </td>
<td> <td>
@Html.DisplayFor(modelItem => item.Description) @Html.DisplayFor(modelItem => item.Description)
@ -50,7 +62,7 @@
<td> <td>
@if (item.Parent!=null) { @if (item.Parent!=null) {
<text> <text>
@Html.DisplayFor(modelItem => item.Parent) <a href="#@item.ParentCode">@Html.DisplayFor(modelItem => item.Parent)</a>
</text> </text>
} }
</td> </td>
@ -65,9 +77,12 @@
@Html.DisplayFor(modelItem => item.Children) @Html.DisplayFor(modelItem => item.Children)
</td> </td>
<td> <td>
<a asp-action="Edit" asp-route-id="@item.Code">Edit</a> | @Html.DisplayFor(modelItem => item.Rate)
<a asp-action="Details" asp-route-id="@item.Code">Details</a> | </td>
<a asp-action="Delete" asp-route-id="@item.Code">Delete</a> <td>
<a asp-action="Edit" asp-route-id="@item.Code" class="btn btn-default">Edit</a>
<a asp-action="Details" asp-route-id="@item.Code" class="btn btn-success">Details</a>
<a asp-action="Delete" asp-route-id="@item.Code" class="btn btn-danger">Delete</a>
</td> </td>
</tr> </tr>
} }

@ -5,18 +5,30 @@
} }
<h2>@ViewBag.Title</h2> <h2>@ViewBag.Title</h2>
<p> <h3>Rôles</h3>
Rôles :
<ul> <ul>
@foreach (var role in Model.Roles) { @foreach (var role in Model.Roles) {
<li>@Html.ActionLink(role.Name,"Role",new { id=role.Id }) (@role.Users.Length membres)</li> <li>@Html.ActionLink(role.Name,"Role",new { id=role.Id }) (@role.Users.Length membres)</li>
} }
</ul> </ul>
</p> <h3>Administrateurs</h3>
<p> <dl><dt>
Nombre d'administrateurs : Nombre </dt><dd> @Model.AdminCount</dd>
@Model.AdminCount <dt>Êtes-vous administrateur?</dt>
</p> <dd>@(Model.YouAreAdmin?"Oui":"Non")</dd>
</dl>
<p> <p>
Vous êtes administrateur: @(Model.YouAreAdmin?"Oui":"Non")
</p> </p>
<h3>Logiciel</h3>
<dl>
<dt>Cette librairie
</dt>
<dd>@ViewBag.ThisAssembly
</dd>
<dt>Version du runtime
</dt>
<dd>@ViewBag.RunTimeVersion
</dd>
</dl>

@ -6,7 +6,7 @@
<h2>Create</h2> <h2>Create</h2>
<form asp-action="Create" role="form"> <form asp-action="Create" role="form" method="POST">
<div class="form-horizontal"> <div class="form-horizontal">
<h4>Blog</h4> <h4>Blog</h4>
<hr /> <hr />

@ -12,25 +12,19 @@
<hr/> <hr/>
<div class="meta"> <div class="meta">
@SR["Author"] : @Model.Author.UserName - @Html.DisplayFor(model => model.Author)
@SR["Modified"] : @Html.DisplayNameFor(model => model.DateModified) :
@Html.DisplayFor(model => model.DateModified) - @Html.DisplayFor(model => model.DateModified)
@SR["Created"] : @Html.DisplayNameFor(model => model.DateCreated) :
@Html.DisplayFor(model => model.DateCreated) @Html.DisplayFor(model => model.DateCreated)
</div> </div>
</div> </div>
<ul>
@if (await AuthorizationService.AuthorizeAsync(User, Model, new EditRequirement())) { @if (await AuthorizationService.AuthorizeAsync(User, Model, new EditRequirement())) {
<li> <a asp-action="Edit" asp-route-id="@Model.Id" class="btn btn-link">@SR["Edit"]</a>
<a asp-action="Edit" asp-route-id="@Model.Id">@SR["Edit"]</a>
</li>
} }
<li> <a asp-action="Index" class="btn btn-link">@SR["Back to List"]</a>
<a asp-action="Index">@SR["Back to List"]</a>
</li>
</ul>

@ -6,8 +6,8 @@
@section header{ @section header{
<link href="~/css/quill.snow.css" rel="stylesheet"> <link href="~/css/main/quill.snow.css" rel="stylesheet">
<link href="~/css/dropzone.css" rel="stylesheet"> <link href="~/css/main/dropzone.css" rel="stylesheet">
<style> <style>
.box__dragndrop, .box__dragndrop,

@ -1,41 +1,41 @@
@model IEnumerable<Blog> @model IEnumerable<IGrouping<string,Blog>>
@{ @{
ViewData["Title"] = "Index"; ViewData["Title"] = "Blogs, l'index";
} }
<h2>Index</h2> <h2>@ViewData["Title"]</h2>
<p class="text-success">@ViewData["StatusMessage"]</p> <p class="text-success">@ViewData["StatusMessage"]</p>
@if (User.IsSignedIn()) { @if (User.IsSignedIn()) {
<label> <label>
<input type="checkbox" id="cbv" checked/>Invisibles, posts privés</label> <input type="checkbox" id="cbv" checked/>Invisibles, posts privés</label>
<script> <script>
$("#cbv").change(function() { $("#cbv").change(function() {
if (this.checked) { if (this.checked) {
$("tr.ipost").removeClass("hidden"); $("tr.hiddenpost").removeClass("hidden");
} else { } else {
$("tr.ipost").addClass("hidden"); $("tr.hiddenpost").addClass("hidden");
} }
}); });
</script> </script>
}
<p> <p>
<a asp-action="Create">@SR["Create a new article"]</a> <a asp-action="Create">@SR["Create a new article"]</a>
</p> </p>
}
<table class="table"> <table class="table">
<tr> <tr>
<th colspan="3"> <th colspan="3">
@SR[Html.DisplayNameFor(model => model.Title)] @SR["Title"]
</th> </th>
</tr> </tr>
@foreach (var item in Model) { @foreach (var group in Model) {
var trclass = (item.Visible)?"vpost":"ipost"; var title = group.Key;
@foreach (var item in group) {
var trclass = (item.Visible)?"visiblepost":"hiddenpost";
<tr class="@trclass"> <tr class="@trclass">
<td><a asp-action="Details" asp-route-id="@item.Id"> <td><a asp-action="Details" asp-route-id="@item.Id" class="bloglink">
<img src="@item.Photo" > <img src="@item.Photo" class="smalltofhol"></a>
<a asp-action="Title" asp-route-id="@item.Title">
<markdown>@item.Title</markdown></a> <markdown>@item.Title</markdown></a>
</td> </td>
<td> <td>
@ -50,18 +50,22 @@
</td> </td>
<td> <td>
<ul class="actiongroup"> <ul class="actiongroup">
<li><a asp-action="Details" asp-route-id="@item.Id">Details</a> @if (await AuthorizationService.AuthorizeAsync(User, item, new ViewRequirement())) {
<li>
<a asp-action="Details" asp-route-id="@item.Id" class="btn btn-lg">Details</a>
</li> </li>
}
@if (await AuthorizationService.AuthorizeAsync(User, item, new EditRequirement())) { @if (await AuthorizationService.AuthorizeAsync(User, item, new EditRequirement())) {
<li><a asp-action="Edit" asp-route-id="@item.Id">@SR["Edit"]</a> <li><a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-default">@SR["Edit"]</a>
</li> </li>
<li><a asp-action="Delete" asp-route-id="@item.Id">@SR["Delete"]</a> <li><a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">@SR["Delete"]</a>
</li> </li>
} }
</ul> </ul>
</td> </td>
</tr> </tr>
} }
}
</table> </table>

@ -0,0 +1,61 @@
@model IEnumerable<Blog>
<h2 markdown="@ViewData["Title"]"></h2>
<p class="text-success">@ViewData["StatusMessage"]</p>
@if (User.IsSignedIn()) {
<label>
<input type="checkbox" id="cbv" checked/>Invisibles, posts privés</label>
<script>
$("#cbv").change(function() {
if (this.checked) {
$("tr.hiddenpost").removeClass("hidden");
} else {
$("tr.hiddenpost").addClass("hidden");
}
});
</script>
}
<p>
<a asp-action="Create" asp-route-title="@ViewData["Title"]">@SR["Poster au même titre"]</a>
</p>
<table class="table">
@foreach (var item in Model) {
var trclass = (item.Visible)?"visiblepost":"hiddenpost";
<tr class="@trclass">
<td><a asp-action="Details" asp-route-id="@item.Id" class="bloglink">
<img src="@item.Photo" class="smalltofhol"></a>
</td>
<td>
<markdown>@((item.Content?.Length > 120) ? item.Content.Substring(0, 122) + " ..." : item.Content)</markdown>
<span style="font-size:x-small;">(@item.Author.UserName </span>,
<span style="font-size:xx-small;">
posté le @item.DateCreated.ToString("dddd d MMM yyyy à H:mm")
@if ((item.DateModified - item.DateCreated).Minutes > 0){ 
@:- Modifié le @item.DateModified.ToString("dddd d MMM yyyy à H:mm")
})
</span>
</td>
<td>
<ul class="actiongroup">
@if (await AuthorizationService.AuthorizeAsync(User, item, new ViewRequirement())) {
<li>
<a asp-action="Details" asp-route-id="@item.Id" class="btn btn-lg">Details</a>
</li>
}
@if (await AuthorizationService.AuthorizeAsync(User, item, new EditRequirement())) {
<li><a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-default">@SR["Edit"]</a>
</li>
<li><a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">@SR["Delete"]</a>
</li>
}
</ul>
</td>
</tr>
}
</table>

@ -1,271 +1,320 @@
@model Yavsc.Models.Haircut.BrusherProfile @model Yavsc.Models.Haircut.BrusherProfile
@{ @{
ViewData["Title"] = "Edit"; ViewData["Title"] = "Edition du profile coiffeu(se|r)";
} }
<h2>Edit</h2> @section header {
<link rel="stylesheet" href="~/lib/jquery-timepicker/jquery.timepicker.css"></style>
}
@section scripts {
<script src="~/lib/jquery-timepicker/jquery.timepicker.min.js"></script>
<script src="~/lib/jonthornton-Datepair/datepair.min.js"></script>
<script src="~/lib/jonthornton-Datepair/jquery.datepair.min.js"></script>
<script>
$(document).ready(function(){
$('.timepicker').timepicker();
$('#datepair').datepair();
})
</script>
}
<h1>@ViewData["Title"]</h1>
<form asp-action="Edit"> <form asp-action="Edit">
<div class="form-horizontal"> <div class="form-horizontal">
<h4>BrusherProfile</h4>
<hr /> <hr />
@Html.ValidationSummary()
<environment names="Development">
<fieldset><legend>Disponibilité</legend> <fieldset><legend>Disponibilité</legend>
<div class="form-group"> <div class="form-group">
<label asp-for="StartOfTheDay" class="col-md-2 control-label"></label> <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> <label asp-for="EndOfTheDay" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="EndOfTheDay" class="form-control" /> <div class="col-md-10" id="datepair">
<span asp-validation-for="EndOfTheDay" class="text-danger" /> <input id="StartOfTheDay" name="aStartOfTheDay" class="timepicker form-control" />
<span asp-validation-for="StartOfTheDay" class="text-danger" ></span>
<input id="EndOfTheDay" name="aEndOfTheDay" class="timepicker form-control" />
<span asp-validation-for="EndOfTheDay" class="text-danger" ></span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label asp-for="ActionDistance" class="col-md-2 control-label"></label> <label asp-for="ActionDistance" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="ActionDistance" class="form-control" /> <input asp-for="ActionDistance" class="form-control" />
<span asp-validation-for="ActionDistance" class="text-danger" /> <span asp-validation-for="ActionDistance" class="text-danger" ></span>
</div> </div>
</div> </div>
</fieldset> </fieldset>
</environment>
<fieldset><legend>Grille tarifaire</legend> <fieldset><legend>Grille tarifaire</legend>
<h2>Divers</h2>
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div> <div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="UserId" /> <input type="hidden" asp-for="UserId" />
<div class="form-group"> <div class="form-group">
<label asp-for="CarePrice" class="col-md-2 control-label"></label> <label asp-for="CarePrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="CarePrice" class="form-control" /> <input asp-for="CarePrice" class="form-control" />
<span asp-validation-for="CarePrice" class="text-danger" /> <span asp-validation-for="CarePrice" class="text-danger" ></span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label asp-for="HalfBalayagePrice" class="col-md-2 control-label"></label> <label asp-for="ShampooPrice" 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"> <div class="col-md-10">
<input asp-for="HalfBrushingPrice" class="form-control" /> <input asp-for="ShampooPrice" class="form-control" />
<span asp-validation-for="HalfBrushingPrice" class="text-danger" /> <span asp-validation-for="ShampooPrice" class="text-danger" ></span>
</div> </div>
</div> </div>
<h2>Techniques</h2>
<h3>Couleurs</h3>
<h4>Simple</h4>
<div class="form-group"> <div class="form-group">
<label asp-for="HalfColorPrice" class="col-md-2 control-label"></label> <label asp-for="HalfColorPrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="HalfColorPrice" class="form-control" /> <input asp-for="HalfColorPrice" class="form-control" />
<span asp-validation-for="HalfColorPrice" class="text-danger" /> <span asp-validation-for="HalfColorPrice" class="text-danger" ></span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label asp-for="HalfDefrisPrice" class="col-md-2 control-label"></label> <label asp-for="LongColorPrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="HalfDefrisPrice" class="form-control" /> <input asp-for="LongColorPrice" class="form-control" />
<span asp-validation-for="HalfDefrisPrice" class="text-danger" /> <span asp-validation-for="LongColorPrice" class="text-danger" ></span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label asp-for="HalfMechPrice" class="col-md-2 control-label"></label> <label asp-for="ShortColorPrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="HalfMechPrice" class="form-control" /> <input asp-for="ShortColorPrice" class="form-control" />
<span asp-validation-for="HalfMechPrice" class="text-danger" /> <span asp-validation-for="ShortColorPrice" class="text-danger"></span>
</div> </div>
</div> </div>
<h4>Multi-couleur</h4>
<div class="form-group"> <div class="form-group">
<label asp-for="HalfMultiColorPrice" class="col-md-2 control-label"></label> <label asp-for="HalfMultiColorPrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="HalfMultiColorPrice" class="form-control" /> <input asp-for="HalfMultiColorPrice" class="form-control" />
<span asp-validation-for="HalfMultiColorPrice" class="text-danger" /> <span asp-validation-for="HalfMultiColorPrice" class="text-danger" ></span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label asp-for="HalfPermanentPrice" class="col-md-2 control-label"></label> <label asp-for="LongMultiColorPrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="HalfPermanentPrice" class="form-control" /> <input asp-for="LongMultiColorPrice" class="form-control" />
<span asp-validation-for="HalfPermanentPrice" class="text-danger" /> <span asp-validation-for="LongMultiColorPrice" class="text-danger" ></span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label asp-for="KidCutPrice" class="col-md-2 control-label"></label> <label asp-for="ShortMultiColorPrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="KidCutPrice" class="form-control" /> <input asp-for="ShortMultiColorPrice" class="form-control" />
<span asp-validation-for="KidCutPrice" class="text-danger" /> <span asp-validation-for="ShortMultiColorPrice" class="text-danger" ></span>
</div> </div>
</div> </div>
<h3>Balayage</h3>
<div class="form-group"> <div class="form-group">
<label asp-for="LongBalayagePrice" class="col-md-2 control-label"></label> <label asp-for="HalfBalayagePrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="LongBalayagePrice" class="form-control" /> <input asp-for="HalfBalayagePrice" class="form-control" />
<span asp-validation-for="LongBalayagePrice" class="text-danger" /> <span asp-validation-for="HalfBalayagePrice" class="text-danger" ></span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label asp-for="LongBrushingPrice" class="col-md-2 control-label"></label> <label asp-for="LongBalayagePrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="LongBrushingPrice" class="form-control" /> <input asp-for="LongBalayagePrice" class="form-control" />
<span asp-validation-for="LongBrushingPrice" class="text-danger" /> <span asp-validation-for="LongBalayagePrice" class="text-danger" ></span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label asp-for="LongColorPrice" class="col-md-2 control-label"></label> <label asp-for="ShortBalayagePrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="LongColorPrice" class="form-control" /> <input asp-for="ShortBalayagePrice" class="form-control" />
<span asp-validation-for="LongColorPrice" class="text-danger" /> <span asp-validation-for="ShortBalayagePrice" class="text-danger" ></span>
</div> </div>
</div> </div>
<h2>Coiffage</h2>
<h3>Brushing</h3>
<h4>Pour la femme</h4>
<div class="form-group"> <div class="form-group">
<label asp-for="LongDefrisPrice" class="col-md-2 control-label"></label> <label asp-for="HalfBrushingPrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="LongDefrisPrice" class="form-control" /> <input asp-for="HalfBrushingPrice" class="form-control" />
<span asp-validation-for="LongDefrisPrice" class="text-danger" /> <span asp-validation-for="HalfBrushingPrice" class="text-danger"></span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label asp-for="LongMechPrice" class="col-md-2 control-label"></label> <label asp-for="LongBrushingPrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="LongMechPrice" class="form-control" /> <input asp-for="LongBrushingPrice" class="form-control" />
<span asp-validation-for="LongMechPrice" class="text-danger" /> <span asp-validation-for="LongBrushingPrice" class="text-danger" ></span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label asp-for="LongMultiColorPrice" class="col-md-2 control-label"></label> <label asp-for="ShortBrushingPrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="LongMultiColorPrice" class="form-control" /> <input asp-for="ShortBrushingPrice" class="form-control" />
<span asp-validation-for="LongMultiColorPrice" class="text-danger" /> <span asp-validation-for="ShortBrushingPrice" class="text-danger" ></span>
</div> </div>
</div> </div>
<h4>Pour l'homme</h4>
<div class="form-group"> <div class="form-group">
<label asp-for="LongPermanentPrice" class="col-md-2 control-label"></label> <label asp-for="ManBrushPrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="LongPermanentPrice" class="form-control" /> <input asp-for="ManBrushPrice" class="form-control" />
<span asp-validation-for="LongPermanentPrice" class="text-danger" /> <span asp-validation-for="ManBrushPrice" class="text-danger" ></span>
</div> </div>
</div> </div>
<h3>Mise en plis</h3>
<div class="form-group"> <div class="form-group">
<label asp-for="ManCutPrice" class="col-md-2 control-label"></label> <label asp-for="HalfFoldingPrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="ManCutPrice" class="form-control" /> <input asp-for="HalfFoldingPrice" class="form-control" />
<span asp-validation-for="ManCutPrice" class="text-danger" /> <span asp-validation-for="HalfFoldingPrice" class="text-danger" ></span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label asp-for="ShampooPrice" class="col-md-2 control-label"></label> <label asp-for="LongFoldingPrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="ShampooPrice" class="form-control" /> <input asp-for="LongFoldingPrice" class="form-control" />
<span asp-validation-for="ShampooPrice" class="text-danger" /> <span asp-validation-for="LongFoldingPrice" class="text-danger"></span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label asp-for="ShortBalayagePrice" class="col-md-2 control-label"></label> <label asp-for="ShortFoldingPrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="ShortBalayagePrice" class="form-control" /> <input asp-for="ShortFoldingPrice" class="form-control" />
<span asp-validation-for="ShortBalayagePrice" class="text-danger" /> <span asp-validation-for="ShortFoldingPrice" class="text-danger"></span>
</div> </div>
</div> </div>
<h3>Défrisage</h3>
<div class="form-group"> <div class="form-group">
<label asp-for="ShortBrushingPrice" class="col-md-2 control-label"></label> <label asp-for="HalfDefrisPrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="ShortBrushingPrice" class="form-control" /> <input asp-for="HalfDefrisPrice" class="form-control" />
<span asp-validation-for="ShortBrushingPrice" class="text-danger" /> <span asp-validation-for="HalfDefrisPrice" class="text-danger" ></span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label asp-for="ShortColorPrice" class="col-md-2 control-label"></label> <label asp-for="LongDefrisPrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="ShortColorPrice" class="form-control" /> <input asp-for="LongDefrisPrice" class="form-control" />
<span asp-validation-for="ShortColorPrice" class="text-danger" /> <span asp-validation-for="LongDefrisPrice" class="text-danger" ></span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label asp-for="ShortDefrisPrice" class="col-md-2 control-label"></label> <label asp-for="ShortDefrisPrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="ShortDefrisPrice" class="form-control" /> <input asp-for="ShortDefrisPrice" class="form-control" />
<span asp-validation-for="ShortDefrisPrice" class="text-danger" /> <span asp-validation-for="ShortDefrisPrice" class="text-danger" ></span>
</div>
</div>
<h3>Mèches</h3>
<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" ></span>
</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" ></span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label asp-for="ShortMechPrice" class="col-md-2 control-label"></label> <label asp-for="ShortMechPrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="ShortMechPrice" class="form-control" /> <input asp-for="ShortMechPrice" class="form-control" />
<span asp-validation-for="ShortMechPrice" class="text-danger" /> <span asp-validation-for="ShortMechPrice" class="text-danger"></span>
</div> </div>
</div> </div>
<h3>Permanentes</h3>
<div class="form-group"> <div class="form-group">
<label asp-for="ShortMultiColorPrice" class="col-md-2 control-label"></label> <label asp-for="HalfPermanentPrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="ShortMultiColorPrice" class="form-control" /> <input asp-for="HalfPermanentPrice" class="form-control" />
<span asp-validation-for="ShortMultiColorPrice" class="text-danger" /> <span asp-validation-for="HalfPermanentPrice" class="text-danger"></span>
</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" ></span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label asp-for="ShortPermanentPrice" class="col-md-2 control-label"></label> <label asp-for="ShortPermanentPrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="ShortPermanentPrice" class="form-control" /> <input asp-for="ShortPermanentPrice" class="form-control" />
<span asp-validation-for="ShortPermanentPrice" class="text-danger" /> <span asp-validation-for="ShortPermanentPrice" class="text-danger"></span>
</div> </div>
</div> </div>
<h2>Coupes</h2>
<h3>Femme</h3>
<div class="form-group"> <div class="form-group">
<label asp-for="WomenHalfCutPrice" class="col-md-2 control-label"></label> <label asp-for="WomenHalfCutPrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="WomenHalfCutPrice" class="form-control" /> <input asp-for="WomenHalfCutPrice" class="form-control" />
<span asp-validation-for="WomenHalfCutPrice" class="text-danger" /> <span asp-validation-for="WomenHalfCutPrice" class="text-danger" ></span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label asp-for="WomenLongCutPrice" class="col-md-2 control-label"></label> <label asp-for="WomenLongCutPrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="WomenLongCutPrice" class="form-control" /> <input asp-for="WomenLongCutPrice" class="form-control" />
<span asp-validation-for="WomenLongCutPrice" class="text-danger" /> <span asp-validation-for="WomenLongCutPrice" class="text-danger" ></span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label asp-for="WomenShortCutPrice" class="col-md-2 control-label"></label> <label asp-for="WomenShortCutPrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="WomenShortCutPrice" class="form-control" /> <input asp-for="WomenShortCutPrice" class="form-control" />
<span asp-validation-for="WomenShortCutPrice" class="text-danger" /> <span asp-validation-for="WomenShortCutPrice" class="text-danger"></span>
</div> </div>
</div> </div>
<h3>Homme et enfant</h3>
<div class="form-group"> <div class="form-group">
<label asp-for="ManBrushPrice" class="col-md-2 control-label"></label> <label asp-for="KidCutPrice" 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"> <div class="col-md-10">
<input asp-for="HalfFoldingPrice" class="form-control" /> <input asp-for="KidCutPrice" class="form-control" />
<span asp-validation-for="HalfFoldingPrice" class="text-danger" /> <span asp-validation-for="KidCutPrice" class="text-danger" ></span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label asp-for="ShortFoldingPrice" class="col-md-2 control-label"></label> <label asp-for="ManCutPrice" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="ShortFoldingPrice" class="form-control" /> <input asp-for="ManCutPrice" class="form-control" />
<span asp-validation-for="ShortFoldingPrice" class="text-danger" /> <span asp-validation-for="ManCutPrice" class="text-danger" ></span>
</div> </div>
</div> </div>
<h2>Le forfait</h2>
<div class="form-group"> <div class="form-group">
<label asp-for="FlatFeeDiscount" class="col-md-2 control-label"></label> <label asp-for="FlatFeeDiscount" class="col-md-2 control-label"></label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="FlatFeeDiscount" class="form-control" /> <input asp-for="FlatFeeDiscount" class="form-control" />
<span asp-validation-for="FlatFeeDiscount" class="text-danger" /> <span asp-validation-for="FlatFeeDiscount" class="text-danger" ></span>
</div> </div>
</div> </div>

@ -3,7 +3,6 @@
@{ @{
ViewData["Title"] = "Profile coiffeur"; ViewData["Title"] = "Profile coiffeur";
} }
<h2>@ViewData["Title"]</h2> <h2>@ViewData["Title"]</h2>
<div> <div>

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

@ -23,6 +23,9 @@
{ {
<h4>@SR["GCM Notification sending failed"]</h4> <h4>@SR["GCM Notification sending failed"]</h4>
} }
else {
<!-- email sent -->
}
} }
} }
</div> </div>

@ -57,8 +57,8 @@
var pos = loc.geometry.location; var pos = loc.geometry.location;
var lat = new Number(pos.lat); var lat = new Number(pos.lat);
var lng = new Number(pos.lng); var lng = new Number(pos.lng);
$('#' + config.latId).val(lat.toLocaleString('fr')); $('#' + config.latId).val(lat.toLocaleString('en'));
$('#' + config.longId).val(lng.toLocaleString('fr')); $('#' + config.longId).val(lng.toLocaleString('en'));
gmap.setCenter(pos); gmap.setCenter(pos);
if (marker) { if (marker) {
marker.setMap(null); marker.setMap(null);
@ -169,10 +169,9 @@
</div> </div>
</div> </div>
<label asp-for="Reason" class="col-md-2 control-label">
<label for="Reason" class="col-md-2 control-label"> @SR["GiveAnExplicitReason"]
@SR["GiveAnExplicitReason"] </label>
</label>
<div class="col-md-10"> <div class="col-md-10">
<div class="container"> <div class="container">
<div class="row"> <div class="row">

@ -14,6 +14,9 @@
<th> <th>
@Html.DisplayNameFor(model => model.Title) @Html.DisplayNameFor(model => model.Title)
</th> </th>
<th>
@Html.DisplayNameFor(model => model.Context)
</th>
<th> <th>
@Html.DisplayNameFor(model => model.ActionName) @Html.DisplayNameFor(model => model.ActionName)
</th> </th>
@ -21,10 +24,13 @@
</tr> </tr>
@foreach (var item in Model) { @foreach (var item in Model) {
<tr> <tr class="@(item.Context.Hidden?"disabled":null)">
<td> <td>
@Html.DisplayFor(modelItem => item.Title) @Html.DisplayFor(modelItem => item.Title)
</td> </td>
<td>
@Html.DisplayFor(modelItem => item.Context)
</td>
<td> <td>
@Html.DisplayFor(modelItem => item.ActionName) @Html.DisplayFor(modelItem => item.ActionName)
</td> </td>

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

@ -1,7 +1,7 @@
@model IEnumerable<PerformerProfile> @model IEnumerable<PerformerProfile>
@{ @{
ViewData["Title"] = "Les profiles - " + (ViewBag.Activity?.Name ?? SR["Any"]); ViewData["Title"] = (ViewBag.Activity?.Name ?? SR["Any"]) ;
} }
<h1>@ViewData["Title"]</h1> <h1>@ViewData["Title"]</h1>
<em>@ViewBag.Activity.Description</em> <em>@ViewBag.Activity.Description</em>
@ -12,7 +12,7 @@
<form action="~/Command/Create" > <form action="~/Command/Create" >
<input type="hidden" name="id" value="@profile.PerformerId" /> <input type="hidden" name="id" value="@profile.PerformerId" />
<input type="hidden" name="activityCode" value="@ViewBag.Activity.Code" /> <input type="hidden" name="activityCode" value="@ViewBag.Activity.Code" />
<input type="submit" value="@SR["Proposer un rendez-vous à"] @profile.Performer.UserName"/> <input type="submit" class="btn btn-success" value="@SR["Proposer un rendez-vous à"] @profile.Performer.UserName"/>
</form> </form>
} }

@ -3,18 +3,19 @@
var tarifs = var tarifs =
[ [
{  { 
cut: [ @Model.WomenLongCutPrice, @Model.WomenHalfCutPrice, @Model.WomenShortCutPrice ], cut: [ @Model.WomenHalfCutPrice, @Model.WomenShortCutPrice, @Model.WomenLongCutPrice ],
tech: [ tech: [
[@Model.LongColorPrice, @Model.HalfColorPrice, @Model.ShortColorPrice], [@Model.HalfColorPrice, @Model.ShortColorPrice, @Model.LongColorPrice],
[@Model.LongPermanentPrice, @Model.HalfPermanentPrice, @Model.ShortPermanentPrice], [@Model.HalfPermanentPrice, @Model.ShortPermanentPrice, @Model.LongPermanentPrice],
[@Model.LongDefrisPrice, @Model.HalfDefrisPrice, @Model.ShortDefrisPrice], [@Model.HalfDefrisPrice, @Model.ShortDefrisPrice, @Model.LongDefrisPrice],
[@Model.LongMechPrice, @Model.HalfMechPrice, @Model.ShortMechPrice], [@Model.HalfMechPrice, @Model.ShortMechPrice, @Model.LongMechPrice],
[@Model.LongBalayagePrice, @Model.HalfBalayagePrice, @Model.ShortBalayagePrice], [@Model.HalfBalayagePrice, @Model.ShortBalayagePrice, @Model.LongBalayagePrice],
], ],
brush: [@Model.LongBrushingPrice, @Model.HalfBrushingPrice, @Model.ShortBrushingPrice], brush: [@Model.HalfBrushingPrice, @Model.ShortBrushingPrice, @Model.LongBrushingPrice],
multicolor: [@Model.LongMultiColorPrice, @Model.HalfMultiColorPrice, @Model.ShortMultiColorPrice], multicolor: [@Model.HalfMultiColorPrice, @Model.ShortMultiColorPrice, @Model.LongMultiColorPrice],
shampoo: @Model.ShampooPrice, shampoo: @Model.ShampooPrice,
care: @Model.CarePrice care: @Model.CarePrice,
feediscount: @Model.FlatFeeDiscount
}, },
{ cut: [@Model.ManCutPrice], brush: [@Model.ManBrushPrice], { cut: [@Model.ManCutPrice], brush: [@Model.ManBrushPrice],
shampoo: @Model.ShampooPrice, shampoo: @Model.ShampooPrice,

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

Loading…