un positionnement de paramètre workflow des pros
This commit is contained in:
parent
fbd352e788
commit
96746fcc0b
322 changed files with 25893 additions and 3844 deletions
|
|
@ -144,7 +144,7 @@ namespace Yavsc.WebApi.Controllers
|
|||
/// <param name="me">MyUpdate containing the new user name </param>
|
||||
/// <returns>Ok when all is ok.</returns>
|
||||
[HttpPut("~/api/me")]
|
||||
public async Task<IActionResult> UpdateMe(MyUpdate me)
|
||||
public async Task<IActionResult> UpdateMe(UserInfo me)
|
||||
{
|
||||
if (!ModelState.IsValid) return new BadRequestObjectResult(
|
||||
new { error = "Specify some valid user update request." });
|
||||
|
|
|
|||
165
Yavsc/ApiControllers/BlackListApiController.cs
Normal file
165
Yavsc/ApiControllers/BlackListApiController.cs
Normal file
|
|
@ -0,0 +1,165 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using Microsoft.AspNet.Authorization;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.Data.Entity;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Access;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
[Produces("application/json")]
|
||||
[Route("api/blacklist"), Authorize]
|
||||
public class BlackListApiController : Controller
|
||||
{
|
||||
private ApplicationDbContext _context;
|
||||
|
||||
public BlackListApiController(ApplicationDbContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
// GET: api/BlackListApi
|
||||
[HttpGet]
|
||||
public IEnumerable<BlackListed> GetBlackListed()
|
||||
{
|
||||
return _context.BlackListed;
|
||||
}
|
||||
|
||||
// GET: api/BlackListApi/5
|
||||
[HttpGet("{id}", Name = "GetBlackListed")]
|
||||
public IActionResult GetBlackListed([FromRoute] long id)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return HttpBadRequest(ModelState);
|
||||
}
|
||||
BlackListed blackListed = _context.BlackListed.Single(m => m.Id == id);
|
||||
if (blackListed == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
if (!CheckPermission(blackListed))
|
||||
return HttpBadRequest();
|
||||
|
||||
return Ok(blackListed);
|
||||
}
|
||||
|
||||
private bool CheckPermission(BlackListed blackListed)
|
||||
{
|
||||
var uid = User.GetUserId();
|
||||
if (uid != blackListed.OwnerId)
|
||||
if (!User.IsInRole(Constants.AdminGroupName))
|
||||
if (!User.IsInRole(Constants.FrontOfficeGroupName))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
// PUT: api/BlackListApi/5
|
||||
[HttpPut("{id}")]
|
||||
public IActionResult PutBlackListed(long id, [FromBody] BlackListed blackListed)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return HttpBadRequest(ModelState);
|
||||
}
|
||||
|
||||
if (id != blackListed.Id)
|
||||
{
|
||||
return HttpBadRequest();
|
||||
}
|
||||
if (!CheckPermission(blackListed))
|
||||
return HttpBadRequest();
|
||||
_context.Entry(blackListed).State = EntityState.Modified;
|
||||
|
||||
try
|
||||
{
|
||||
_context.SaveChanges();
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
{
|
||||
if (!BlackListedExists(id))
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
return new HttpStatusCodeResult(StatusCodes.Status204NoContent);
|
||||
}
|
||||
|
||||
// POST: api/BlackListApi
|
||||
[HttpPost]
|
||||
public IActionResult PostBlackListed([FromBody] BlackListed blackListed)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return HttpBadRequest(ModelState);
|
||||
}
|
||||
|
||||
if (!CheckPermission(blackListed))
|
||||
return HttpBadRequest();
|
||||
|
||||
_context.BlackListed.Add(blackListed);
|
||||
try
|
||||
{
|
||||
_context.SaveChanges();
|
||||
}
|
||||
catch (DbUpdateException)
|
||||
{
|
||||
if (BlackListedExists(blackListed.Id))
|
||||
{
|
||||
return new HttpStatusCodeResult(StatusCodes.Status409Conflict);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
return CreatedAtRoute("GetBlackListed", new { id = blackListed.Id }, blackListed);
|
||||
}
|
||||
|
||||
// DELETE: api/BlackListApi/5
|
||||
[HttpDelete("{id}")]
|
||||
public IActionResult DeleteBlackListed(long id)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return HttpBadRequest(ModelState);
|
||||
}
|
||||
|
||||
BlackListed blackListed = _context.BlackListed.Single(m => m.Id == id);
|
||||
if (blackListed == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
if (!CheckPermission(blackListed))
|
||||
return HttpBadRequest();
|
||||
|
||||
_context.BlackListed.Remove(blackListed);
|
||||
_context.SaveChanges();
|
||||
|
||||
return Ok(blackListed);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
_context.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private bool BlackListedExists(long id)
|
||||
{
|
||||
return _context.BlackListed.Count(e => e.Id == id) > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -11,6 +11,7 @@ namespace Yavsc.Controllers
|
|||
{
|
||||
using System;
|
||||
using Yavsc.Model;
|
||||
using Yavsc.Models.Messaging;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Booking;
|
||||
|
||||
|
|
@ -40,14 +41,19 @@ namespace Yavsc.Controllers
|
|||
var now = DateTime.Now;
|
||||
|
||||
var result = _context.Commands.Include(c => c.Location).
|
||||
Include(c => c.Client).Where(c => c.PerformerId == uid && c.Id < maxId && c.EventDate > now).
|
||||
Include(c => c.Client).Where(c => c.PerformerId == uid && c.Id < maxId && c.EventDate > now
|
||||
&& c.ValidationDate == null).
|
||||
Select(c => new BookQueryProviderInfo
|
||||
{
|
||||
Client = new ClientProviderInfo { UserName = c.Client.UserName, UserId = c.ClientId },
|
||||
Client = new ClientProviderInfo {
|
||||
UserName = c.Client.UserName,
|
||||
UserId = c.ClientId,
|
||||
Avatar = c.Client.Avatar },
|
||||
Location = c.Location,
|
||||
EventDate = c.EventDate,
|
||||
Id = c.Id,
|
||||
Previsional = c.Previsional
|
||||
Previsional = c.Previsional,
|
||||
Reason = c.Reason
|
||||
}).
|
||||
OrderBy(c=>c.Id).
|
||||
Take(25);
|
||||
|
|
|
|||
|
|
@ -6,33 +6,47 @@ using Microsoft.Data.Entity;
|
|||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
using Microsoft.AspNet.Identity;
|
||||
using Models;
|
||||
using ViewModels.Chat;
|
||||
[Route("api/chat")]
|
||||
public class ChatApiController : Controller
|
||||
{
|
||||
ApplicationDbContext dbContext;
|
||||
UserManager<ApplicationUser> userManager;
|
||||
public ChatApiController(ApplicationDbContext dbContext,
|
||||
UserManager<ApplicationUser> userManager)
|
||||
{
|
||||
this.dbContext = dbContext;
|
||||
this.userManager = userManager;
|
||||
}
|
||||
|
||||
[HttpGet("users")]
|
||||
public List<ChatUserInfo> GetUserList()
|
||||
public IEnumerable<ChatUserInfo> GetUserList()
|
||||
{
|
||||
using (var db = new ApplicationDbContext()) {
|
||||
List<ChatUserInfo> result = new List<ChatUserInfo>();
|
||||
var cxsQuery = dbContext.Connections?.Include(c=>c.Owner).GroupBy( c => c.ApplicationUserId );
|
||||
|
||||
var cxsQuery = db.Connections.Include(c=>c.Owner).GroupBy( c => c.ApplicationUserId );
|
||||
// List<ChatUserInfo> result = new List<ChatUserInfo>();
|
||||
if (cxsQuery!=null)
|
||||
foreach (var g in cxsQuery) {
|
||||
|
||||
List<ChatUserInfo> result = new List<ChatUserInfo>();
|
||||
|
||||
foreach (var g in cxsQuery) {
|
||||
|
||||
var uid = g.Key;
|
||||
var cxs = g.ToList();
|
||||
var uid = g.Key;
|
||||
var cxs = g.ToList();
|
||||
if (cxs !=null)
|
||||
if (cxs.Count>0) {
|
||||
var user = cxs.First().Owner;
|
||||
|
||||
result.Add(new ChatUserInfo { UserName = user.UserName,
|
||||
UserId = user.Id, Avatar = user.Avatar, Connections = cxs } );
|
||||
|
||||
}
|
||||
return result;
|
||||
if (user!=null ) {
|
||||
result.Add(new ChatUserInfo { UserName = user.UserName,
|
||||
UserId = user.Id, Avatar = user.Avatar, Connections = cxs,
|
||||
Roles = ( userManager.GetRolesAsync(user) ).Result.ToArray() });
|
||||
}
|
||||
else {
|
||||
result.Add(new ChatUserInfo { Connections = cxs });
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.Data.Entity;
|
||||
using Yavsc.Model;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Messaging;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
|
|
@ -20,29 +19,10 @@ namespace Yavsc.Controllers
|
|||
}
|
||||
|
||||
// GET: api/ContactsApi
|
||||
[HttpGet]
|
||||
public IEnumerable<ClientProviderInfo> GetClientProviderInfo()
|
||||
[HttpGet("{id}")]
|
||||
public ClientProviderInfo GetClientProviderInfo(string id)
|
||||
{
|
||||
return _context.ClientProviderInfo;
|
||||
}
|
||||
|
||||
// GET: api/ContactsApi/5
|
||||
[HttpGet("{id}", Name = "GetClientProviderInfo")]
|
||||
public IActionResult GetClientProviderInfo([FromRoute] string id)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return HttpBadRequest(ModelState);
|
||||
}
|
||||
|
||||
ClientProviderInfo clientProviderInfo = _context.ClientProviderInfo.Single(m => m.UserId == id);
|
||||
|
||||
if (clientProviderInfo == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
return Ok(clientProviderInfo);
|
||||
return _context.ClientProviderInfo.FirstOrDefault(c=>c.UserId == id);
|
||||
}
|
||||
|
||||
// PUT: api/ContactsApi/5
|
||||
|
|
|
|||
15
Yavsc/ApiControllers/DjProfileApiController.cs
Normal file
15
Yavsc/ApiControllers/DjProfileApiController.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
|
||||
namespace Yavsc.ApiControllers
|
||||
{
|
||||
using Models;
|
||||
using Models.Booking.Profiles;
|
||||
|
||||
public class DjProfileApiController : ProfileApiController<DjSettings>
|
||||
{
|
||||
public DjProfileApiController(ApplicationDbContext context) : base(context)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -68,7 +68,6 @@ namespace Yavsc.Controllers
|
|||
[HttpPut("{id}")]
|
||||
public IActionResult PutEstimate(long id, [FromBody] Estimate estimate)
|
||||
{
|
||||
var valdate = DateTime.Now;
|
||||
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
|
|
@ -90,7 +89,6 @@ namespace Yavsc.Controllers
|
|||
}
|
||||
|
||||
var entry = _context.Attach(estimate);
|
||||
estimate.ProviderValidationDate = valdate;
|
||||
try
|
||||
{
|
||||
_context.SaveChanges();
|
||||
|
|
@ -107,7 +105,7 @@ namespace Yavsc.Controllers
|
|||
}
|
||||
}
|
||||
|
||||
return Ok( new { Id = estimate.Id, LatestValidationDate = valdate });
|
||||
return Ok( new { Id = estimate.Id });
|
||||
}
|
||||
|
||||
// POST: api/Estimate
|
||||
|
|
@ -127,10 +125,15 @@ namespace Yavsc.Controllers
|
|||
return HttpBadRequest(ModelState);
|
||||
}
|
||||
}
|
||||
var valdate = DateTime.Now;
|
||||
estimate.ProviderValidationDate = valdate;
|
||||
|
||||
if (estimate.CommandId!=null) {
|
||||
var query = _context.BookQueries.FirstOrDefault(q => q.Id == estimate.CommandId);
|
||||
if (query == null || query.PerformerId!= uid)
|
||||
throw new InvalidOperationException();
|
||||
query.ValidationDate = DateTime.Now;
|
||||
}
|
||||
_context.Estimates.Add(estimate);
|
||||
|
||||
|
||||
/* _context.AttachRange(estimate.Bill);
|
||||
_context.Attach(estimate);
|
||||
_context.Entry(estimate).State = EntityState.Added;
|
||||
|
|
@ -153,7 +156,7 @@ namespace Yavsc.Controllers
|
|||
throw;
|
||||
}
|
||||
}
|
||||
return Ok( new { Id = estimate.Id, Bill = estimate.Bill , LatestValidationDate = valdate });
|
||||
return Ok( new { Id = estimate.Id, Bill = estimate.Bill });
|
||||
}
|
||||
|
||||
// DELETE: api/Estimate/5
|
||||
|
|
|
|||
147
Yavsc/ApiControllers/MusicalPreferencesApiController.cs
Normal file
147
Yavsc/ApiControllers/MusicalPreferencesApiController.cs
Normal file
|
|
@ -0,0 +1,147 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.Data.Entity;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Booking;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
[Produces("application/json")]
|
||||
[Route("api/museprefs")]
|
||||
public class MusicalPreferencesApiController : Controller
|
||||
{
|
||||
private ApplicationDbContext _context;
|
||||
|
||||
public MusicalPreferencesApiController(ApplicationDbContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
// GET: api/MusicalPreferencesApi
|
||||
[HttpGet]
|
||||
public IEnumerable<MusicalPreference> GetMusicalPreferences()
|
||||
{
|
||||
return _context.MusicalPreferences;
|
||||
}
|
||||
|
||||
// GET: api/MusicalPreferencesApi/5
|
||||
[HttpGet("{id}", Name = "GetMusicalPreference")]
|
||||
public IActionResult GetMusicalPreference([FromRoute] string id)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return HttpBadRequest(ModelState);
|
||||
}
|
||||
|
||||
MusicalPreference musicalPreference = _context.MusicalPreferences.Single(m => m.OwnerProfileId == id);
|
||||
|
||||
if (musicalPreference == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
return Ok(musicalPreference);
|
||||
}
|
||||
|
||||
// PUT: api/MusicalPreferencesApi/5
|
||||
[HttpPut("{id}")]
|
||||
public IActionResult PutMusicalPreference(string id, [FromBody] MusicalPreference musicalPreference)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return HttpBadRequest(ModelState);
|
||||
}
|
||||
|
||||
if (id != musicalPreference.OwnerProfileId)
|
||||
{
|
||||
return HttpBadRequest();
|
||||
}
|
||||
|
||||
_context.Entry(musicalPreference).State = EntityState.Modified;
|
||||
|
||||
try
|
||||
{
|
||||
_context.SaveChanges();
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
{
|
||||
if (!MusicalPreferenceExists(id))
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
return new HttpStatusCodeResult(StatusCodes.Status204NoContent);
|
||||
}
|
||||
|
||||
// POST: api/MusicalPreferencesApi
|
||||
[HttpPost]
|
||||
public IActionResult PostMusicalPreference([FromBody] MusicalPreference musicalPreference)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return HttpBadRequest(ModelState);
|
||||
}
|
||||
|
||||
_context.MusicalPreferences.Add(musicalPreference);
|
||||
try
|
||||
{
|
||||
_context.SaveChanges();
|
||||
}
|
||||
catch (DbUpdateException)
|
||||
{
|
||||
if (MusicalPreferenceExists(musicalPreference.OwnerProfileId))
|
||||
{
|
||||
return new HttpStatusCodeResult(StatusCodes.Status409Conflict);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
return CreatedAtRoute("GetMusicalPreference", new { id = musicalPreference.OwnerProfileId }, musicalPreference);
|
||||
}
|
||||
|
||||
// DELETE: api/MusicalPreferencesApi/5
|
||||
[HttpDelete("{id}")]
|
||||
public IActionResult DeleteMusicalPreference(string id)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return HttpBadRequest(ModelState);
|
||||
}
|
||||
|
||||
MusicalPreference musicalPreference = _context.MusicalPreferences.Single(m => m.OwnerProfileId == id);
|
||||
if (musicalPreference == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
_context.MusicalPreferences.Remove(musicalPreference);
|
||||
_context.SaveChanges();
|
||||
|
||||
return Ok(musicalPreference);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
_context.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private bool MusicalPreferenceExists(string id)
|
||||
{
|
||||
return _context.MusicalPreferences.Count(e => e.OwnerProfileId == id) > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
147
Yavsc/ApiControllers/MusicalTendenciesApiController.cs
Normal file
147
Yavsc/ApiControllers/MusicalTendenciesApiController.cs
Normal file
|
|
@ -0,0 +1,147 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.Data.Entity;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Booking;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
[Produces("application/json")]
|
||||
[Route("api/MusicalTendenciesApi")]
|
||||
public class MusicalTendenciesApiController : Controller
|
||||
{
|
||||
private ApplicationDbContext _context;
|
||||
|
||||
public MusicalTendenciesApiController(ApplicationDbContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
// GET: api/MusicalTendenciesApi
|
||||
[HttpGet]
|
||||
public IEnumerable<MusicalTendency> GetMusicalTendency()
|
||||
{
|
||||
return _context.MusicalTendency;
|
||||
}
|
||||
|
||||
// GET: api/MusicalTendenciesApi/5
|
||||
[HttpGet("{id}", Name = "GetMusicalTendency")]
|
||||
public IActionResult GetMusicalTendency([FromRoute] long id)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return HttpBadRequest(ModelState);
|
||||
}
|
||||
|
||||
MusicalTendency musicalTendency = _context.MusicalTendency.Single(m => m.Id == id);
|
||||
|
||||
if (musicalTendency == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
return Ok(musicalTendency);
|
||||
}
|
||||
|
||||
// PUT: api/MusicalTendenciesApi/5
|
||||
[HttpPut("{id}")]
|
||||
public IActionResult PutMusicalTendency(long id, [FromBody] MusicalTendency musicalTendency)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return HttpBadRequest(ModelState);
|
||||
}
|
||||
|
||||
if (id != musicalTendency.Id)
|
||||
{
|
||||
return HttpBadRequest();
|
||||
}
|
||||
|
||||
_context.Entry(musicalTendency).State = EntityState.Modified;
|
||||
|
||||
try
|
||||
{
|
||||
_context.SaveChanges();
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
{
|
||||
if (!MusicalTendencyExists(id))
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
return new HttpStatusCodeResult(StatusCodes.Status204NoContent);
|
||||
}
|
||||
|
||||
// POST: api/MusicalTendenciesApi
|
||||
[HttpPost]
|
||||
public IActionResult PostMusicalTendency([FromBody] MusicalTendency musicalTendency)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return HttpBadRequest(ModelState);
|
||||
}
|
||||
|
||||
_context.MusicalTendency.Add(musicalTendency);
|
||||
try
|
||||
{
|
||||
_context.SaveChanges();
|
||||
}
|
||||
catch (DbUpdateException)
|
||||
{
|
||||
if (MusicalTendencyExists(musicalTendency.Id))
|
||||
{
|
||||
return new HttpStatusCodeResult(StatusCodes.Status409Conflict);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
return CreatedAtRoute("GetMusicalTendency", new { id = musicalTendency.Id }, musicalTendency);
|
||||
}
|
||||
|
||||
// DELETE: api/MusicalTendenciesApi/5
|
||||
[HttpDelete("{id}")]
|
||||
public IActionResult DeleteMusicalTendency(long id)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return HttpBadRequest(ModelState);
|
||||
}
|
||||
|
||||
MusicalTendency musicalTendency = _context.MusicalTendency.Single(m => m.Id == id);
|
||||
if (musicalTendency == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
_context.MusicalTendency.Remove(musicalTendency);
|
||||
_context.SaveChanges();
|
||||
|
||||
return Ok(musicalTendency);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
_context.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
private bool MusicalTendencyExists(long id)
|
||||
{
|
||||
return _context.MusicalTendency.Count(e => e.Id == id) > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,73 +2,55 @@ using System.IO;
|
|||
using Microsoft.AspNet.Authorization;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Microsoft.AspNet.Mvc.ViewComponents;
|
||||
using Microsoft.AspNet.Razor;
|
||||
|
||||
namespace Yavsc.ApiControllers
|
||||
{
|
||||
using Models;
|
||||
using Helpers;
|
||||
using System.Linq;
|
||||
using Microsoft.Data.Entity;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Security.Claims;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Yavsc.Services;
|
||||
using Yavsc.Models.Messaging;
|
||||
|
||||
[Route("api/pdfestimate"), Authorize]
|
||||
public class PdfEstimateController : Controller
|
||||
{
|
||||
ApplicationDbContext dbContext;
|
||||
DefaultViewComponentHelper helper;
|
||||
IViewComponentDescriptorCollectionProvider provider;
|
||||
IViewComponentInvokerFactory factory;
|
||||
RazorEngineHost host;
|
||||
RazorTemplateEngine engine;
|
||||
IViewComponentSelector selector;
|
||||
private IStringLocalizer _localizer;
|
||||
private GoogleAuthSettings _googleSettings;
|
||||
private IGoogleCloudMessageSender _GCMSender;
|
||||
private IAuthorizationService authorizationService;
|
||||
|
||||
private ILogger logger;
|
||||
|
||||
public PdfEstimateController(
|
||||
IViewComponentDescriptorCollectionProvider provider,
|
||||
IViewComponentSelector selector,
|
||||
IViewComponentInvokerFactory factory,
|
||||
IAuthorizationService authorizationService,
|
||||
ILoggerFactory loggerFactory,
|
||||
ApplicationDbContext context)
|
||||
{
|
||||
|
||||
this.selector = selector;
|
||||
this.provider = provider;
|
||||
this.factory = factory;
|
||||
helper = new DefaultViewComponentHelper(provider, selector, factory);
|
||||
this.authorizationService = authorizationService;
|
||||
dbContext = context;
|
||||
|
||||
var language = new CSharpRazorCodeLanguage();
|
||||
host = new RazorEngineHost(language)
|
||||
{
|
||||
DefaultBaseClass = "RazorPage",
|
||||
DefaultClassName = "Estimate",
|
||||
DefaultNamespace = "Yavsc",
|
||||
};
|
||||
|
||||
// Everyone needs the System namespace, right?
|
||||
host.NamespaceImports.Add("System");
|
||||
engine = new RazorTemplateEngine(host);
|
||||
|
||||
|
||||
/*
|
||||
GeneratorResults razorResult =
|
||||
engine.GenerateCode(
|
||||
|
||||
) */
|
||||
logger = loggerFactory.CreateLogger<PdfEstimateController>();
|
||||
}
|
||||
|
||||
|
||||
[HttpGet("get/{id}", Name = "Get"), Authorize]
|
||||
public IActionResult Get(long id)
|
||||
public async Task<IActionResult> Get(long id)
|
||||
{
|
||||
var filename = $"estimate-{id}.pdf";
|
||||
|
||||
var cd = new System.Net.Mime.ContentDisposition
|
||||
var estimate = dbContext.Estimates.Include(
|
||||
e=>e.Query
|
||||
).FirstOrDefault(e=>e.Id == id);
|
||||
if (!await authorizationService.AuthorizeAsync(User, estimate, new ViewRequirement()))
|
||||
{
|
||||
// for example foo.bak
|
||||
FileName = filename,
|
||||
|
||||
// always prompt the user for downloading, set to true if you want
|
||||
// the browser to try to show the file inline
|
||||
Inline = false,
|
||||
};
|
||||
return new ChallengeResult();
|
||||
}
|
||||
|
||||
var filename = $"estimate-{id}.pdf";
|
||||
|
||||
FileInfo fi = new FileInfo(Path.Combine(Startup.UserBillsDirName, filename));
|
||||
if (!fi.Exists) return Ok(new { Error = "Not generated" });
|
||||
|
|
@ -76,16 +58,104 @@ namespace Yavsc.ApiControllers
|
|||
}
|
||||
|
||||
[HttpGet("estimate-{id}.tex", Name = "GetTex"), Authorize]
|
||||
public IActionResult GetTex(long id)
|
||||
public async Task<IActionResult> GetTex(long id)
|
||||
{
|
||||
var estimate = dbContext.Estimates.Include(
|
||||
e=>e.Query
|
||||
).FirstOrDefault(e=>e.Id == id);
|
||||
if (!await authorizationService.AuthorizeAsync(User, estimate, new ViewRequirement()))
|
||||
{
|
||||
return new ChallengeResult();
|
||||
}
|
||||
Response.ContentType = "text/x-tex";
|
||||
return ViewComponent("Estimate",new object[] { id, "LaTeX" });
|
||||
}
|
||||
|
||||
[HttpPost("gen/{id}")]
|
||||
public IActionResult GeneratePdf(long id)
|
||||
public async Task<IActionResult> GeneratePdf(long id)
|
||||
{
|
||||
var estimate = dbContext.Estimates.Include(
|
||||
e=>e.Query
|
||||
).FirstOrDefault(e=>e.Id == id);
|
||||
if (!await authorizationService.AuthorizeAsync(User, estimate, new ViewRequirement()))
|
||||
{
|
||||
return new ChallengeResult();
|
||||
}
|
||||
return ViewComponent("Estimate",new object[] { id, "Pdf" } );
|
||||
}
|
||||
|
||||
|
||||
[HttpPost("prosign/{id}")]
|
||||
public async Task<IActionResult> ProSign(long id)
|
||||
{
|
||||
var uid = User.GetUserId();
|
||||
var estimate = dbContext.Estimates.Include(
|
||||
e=>e.Query
|
||||
).FirstOrDefault(e=>e.Id == id && e.OwnerId == uid );
|
||||
if (!await authorizationService.AuthorizeAsync(User, estimate, new ViewRequirement()))
|
||||
{
|
||||
return new ChallengeResult();
|
||||
}
|
||||
if (Request.Form.Files.Count!=1)
|
||||
return new BadRequestResult();
|
||||
User.ReceiveProSignature(id,Request.Form.Files[0],"pro");
|
||||
estimate.ProviderValidationDate = DateTime.Now;
|
||||
dbContext.SaveChanges();
|
||||
// Notify the client
|
||||
var yaev = new EstimationEvent(dbContext,estimate,_localizer);
|
||||
var regids = estimate.Client.Devices.Select(d => d.GCMRegistrationId);
|
||||
var grep = await _GCMSender.NotifyEstimateAsync(_googleSettings,regids,yaev);
|
||||
return Ok (new { ProviderValidationDate = estimate.ProviderValidationDate, GCMSent = grep.success });
|
||||
}
|
||||
|
||||
[HttpGet("prosign/{id}")]
|
||||
public async Task<IActionResult> GetProSign(long id)
|
||||
{
|
||||
// For authorization purpose
|
||||
var estimate = dbContext.Estimates.FirstOrDefault(e=>e.Id == id);
|
||||
if (!await authorizationService.AuthorizeAsync(User, estimate, new ViewRequirement()))
|
||||
{
|
||||
return new ChallengeResult();
|
||||
}
|
||||
|
||||
var filename = FileSystemHelpers.SignFileNameFormat("pro",id);
|
||||
FileInfo fi = new FileInfo(Path.Combine(Startup.UserBillsDirName, filename));
|
||||
if (!fi.Exists) return HttpNotFound(new { Error = "Professional signature not found" });
|
||||
return File(fi.OpenRead(), "application/x-pdf", filename); ;
|
||||
}
|
||||
|
||||
[HttpPost("clisign/{id}")]
|
||||
public async Task<IActionResult> CliSign(long id)
|
||||
{
|
||||
var uid = User.GetUserId();
|
||||
var estimate = dbContext.Estimates.Include( e=>e.Query
|
||||
).FirstOrDefault( e=> e.Id == id && e.Query.ClientId == uid );
|
||||
if (!await authorizationService.AuthorizeAsync(User, estimate, new ViewRequirement()))
|
||||
{
|
||||
return new ChallengeResult();
|
||||
}
|
||||
if (Request.Form.Files.Count!=1)
|
||||
return new BadRequestResult();
|
||||
User.ReceiveProSignature(id,Request.Form.Files[0],"cli");
|
||||
estimate.ClientValidationDate = DateTime.Now;
|
||||
dbContext.SaveChanges();
|
||||
return Ok (new { ClientValidationDate = estimate.ClientValidationDate });
|
||||
}
|
||||
|
||||
[HttpGet("clisign/{id}")]
|
||||
public async Task<IActionResult> GetCliSign(long id)
|
||||
{
|
||||
// For authorization purpose
|
||||
var estimate = dbContext.Estimates.FirstOrDefault(e=>e.Id == id);
|
||||
if (!await authorizationService.AuthorizeAsync(User, estimate, new ViewRequirement()))
|
||||
{
|
||||
return new ChallengeResult();
|
||||
}
|
||||
|
||||
var filename = FileSystemHelpers.SignFileNameFormat("pro",id);
|
||||
FileInfo fi = new FileInfo(Path.Combine(Startup.UserBillsDirName, filename));
|
||||
if (!fi.Exists) return HttpNotFound(new { Error = "Professional signature not found" });
|
||||
return File(fi.OpenRead(), "application/x-pdf", filename); ;
|
||||
}
|
||||
}
|
||||
}
|
||||
16
Yavsc/ApiControllers/ProfileApiController.cs
Normal file
16
Yavsc/ApiControllers/ProfileApiController.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
using Microsoft.AspNet.Mvc;
|
||||
|
||||
namespace Yavsc.ApiControllers
|
||||
{
|
||||
using Models;
|
||||
[Produces("application/json"),Route("api/profile")]
|
||||
public abstract class ProfileApiController<T> : Controller
|
||||
{
|
||||
ApplicationDbContext dbContext;
|
||||
public ProfileApiController(ApplicationDbContext context)
|
||||
{
|
||||
dbContext = context;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 43 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.2 KiB |
|
|
@ -42,5 +42,7 @@ namespace Yavsc
|
|||
private static readonly string[] GoogleScopes = { "openid", "profile", "email" };
|
||||
public static readonly string[] GoogleCalendarScopes =
|
||||
{ "openid", "profile", "email", "https://www.googleapis.com/auth/calendar" };
|
||||
|
||||
public static readonly string NoneCode = "none";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,24 +1,97 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNet.Authorization;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.AspNet.Mvc.Rendering;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
[ServiceFilter(typeof(LanguageActionFilter)),Authorize("AdministratorOnly")]
|
||||
[Authorize("AdministratorOnly")]
|
||||
public class ActivityController : Controller
|
||||
{
|
||||
private ApplicationDbContext _context;
|
||||
IStringLocalizer<Yavsc.Resources.YavscLocalisation> SR;
|
||||
ILogger logger;
|
||||
|
||||
public ActivityController(ApplicationDbContext context)
|
||||
public ActivityController(ApplicationDbContext context,
|
||||
IStringLocalizer<Yavsc.Resources.YavscLocalisation> SR,
|
||||
ILoggerFactory loggerFactory)
|
||||
{
|
||||
_context = context;
|
||||
this.SR = SR;
|
||||
logger=loggerFactory.CreateLogger<ActivityController>();
|
||||
}
|
||||
|
||||
// GET: Activity
|
||||
public IActionResult Index()
|
||||
{
|
||||
return View(_context.Activities.ToList());
|
||||
SetSettingClasseInfo();
|
||||
return View(_context.Activities.Include(a=>a.Parent).ToList());
|
||||
}
|
||||
|
||||
private void SetSettingClasseInfo(string currentCode = null)
|
||||
{
|
||||
var items = Startup.ProfileTypes.Select(
|
||||
pt => new SelectListItem
|
||||
{
|
||||
Text = SR[pt.Key],
|
||||
Value = pt.Key,
|
||||
Selected = currentCode == pt.Key
|
||||
}).ToList();
|
||||
items.Add(new SelectListItem { Text = SR[Constants.NoneCode], Value = Constants.NoneCode, Selected = currentCode == null});
|
||||
ViewBag.SettingsClassName = items;
|
||||
}
|
||||
|
||||
private List<SelectListItem> GetEligibleParent(string code)
|
||||
{
|
||||
// eligibles are those
|
||||
// who are not in descendants
|
||||
|
||||
//
|
||||
var acts = _context.Activities.Where(
|
||||
a => a.Code != code
|
||||
).Select(a => new SelectListItem
|
||||
{
|
||||
Text = a.Name,
|
||||
Value = a.Code
|
||||
}).ToList();
|
||||
var nullItem = new SelectListItem { Text = SR[Constants.NoneCode], Value = Constants.NoneCode };
|
||||
acts.Add(nullItem);
|
||||
if (code == null) return acts;
|
||||
var existing = _context.Activities.Include(a => a.Children).FirstOrDefault(a => a.Code == code);
|
||||
if (existing == null) return acts;
|
||||
var pi = acts.FirstOrDefault(i => i.Value == existing.ParentCode);
|
||||
if (pi!=null) pi.Selected = true;
|
||||
else nullItem.Selected = true;
|
||||
RecFilterChild(acts, existing);
|
||||
return acts;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Filters a activity selection list
|
||||
/// in order to exculde any descendant
|
||||
/// from the eligible list at the <c>Parent</c> property.
|
||||
/// WARN! results in a infinite loop when
|
||||
/// data is corrupted and there is a circularity
|
||||
/// in the activity hierarchy graph (Parent/Children)
|
||||
/// </summary>
|
||||
/// <param name="list"></param>
|
||||
/// <param name="activity"></param>
|
||||
private static void RecFilterChild(List<SelectListItem> list, Activity activity)
|
||||
{
|
||||
if (activity == null) return;
|
||||
if (activity.Children == null) return;
|
||||
if (list.Count == 0) return;
|
||||
foreach (var child in activity.Children)
|
||||
{
|
||||
RecFilterChild(list, child);
|
||||
var rem = list.FirstOrDefault(i => i.Value == child.Code);
|
||||
if (rem != null) list.Remove(rem);
|
||||
}
|
||||
}
|
||||
|
||||
// GET: Activity/Details/5
|
||||
|
|
@ -41,6 +114,8 @@ namespace Yavsc.Controllers
|
|||
// GET: Activity/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
SetSettingClasseInfo();
|
||||
ViewBag.ParentCode = GetEligibleParent(null);
|
||||
return View();
|
||||
}
|
||||
|
||||
|
|
@ -49,12 +124,18 @@ namespace Yavsc.Controllers
|
|||
[ValidateAntiForgeryToken]
|
||||
public IActionResult Create(Activity activity)
|
||||
{
|
||||
if (activity.ParentCode==Constants.NoneCode)
|
||||
activity.ParentCode=null;
|
||||
if (activity.SettingsClassName==Constants.NoneCode)
|
||||
activity.SettingsClassName=null;
|
||||
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
_context.Activities.Add(activity);
|
||||
_context.SaveChanges();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
SetSettingClasseInfo();
|
||||
return View(activity);
|
||||
}
|
||||
|
||||
|
|
@ -71,6 +152,8 @@ namespace Yavsc.Controllers
|
|||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
ViewBag.ParentCode = GetEligibleParent(id);
|
||||
SetSettingClasseInfo();
|
||||
return View(activity);
|
||||
}
|
||||
|
||||
|
|
@ -79,6 +162,10 @@ namespace Yavsc.Controllers
|
|||
[ValidateAntiForgeryToken]
|
||||
public IActionResult Edit(Activity activity)
|
||||
{
|
||||
if (activity.ParentCode==Constants.NoneCode)
|
||||
activity.ParentCode=null;
|
||||
if (activity.SettingsClassName==Constants.NoneCode)
|
||||
activity.SettingsClassName=null;
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
_context.Update(activity);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -7,7 +6,10 @@ using Microsoft.AspNet.Authorization;
|
|||
using Microsoft.AspNet.Identity;
|
||||
using Microsoft.AspNet.Identity.EntityFramework;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.Data.Entity;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Auth;
|
||||
using Yavsc.ViewModels.Administration;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
|
|
@ -17,11 +19,15 @@ namespace Yavsc.Controllers
|
|||
private readonly UserManager<ApplicationUser> _userManager;
|
||||
private readonly RoleManager<IdentityRole> _roleManager;
|
||||
|
||||
private readonly ApplicationDbContext context;
|
||||
|
||||
public AdministrationController(UserManager<ApplicationUser> userManager,
|
||||
RoleManager<IdentityRole> roleManager)
|
||||
RoleManager<IdentityRole> roleManager,
|
||||
ApplicationDbContext context)
|
||||
{
|
||||
_userManager = userManager;
|
||||
_roleManager = roleManager;
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -47,30 +53,53 @@ namespace Yavsc.Controllers
|
|||
AddErrors(addToRoleResult);
|
||||
return new BadRequestObjectResult(ModelState);
|
||||
}
|
||||
return Ok(new {message="you owned it."});
|
||||
return Ok(new { message = "you owned it." });
|
||||
}
|
||||
public class RoleInfo {
|
||||
public string Name { get; set; }
|
||||
public IEnumerable<string> Users { get; set; }
|
||||
}
|
||||
[Authorize(Roles=Constants.AdminGroupName)]
|
||||
|
||||
[Authorize(Roles = Constants.AdminGroupName)]
|
||||
[Produces("application/json")]
|
||||
public async Task<IActionResult> Index() {
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
var adminCount = await _userManager.GetUsersInRoleAsync(
|
||||
Constants.AdminGroupName);
|
||||
var youAreAdmin = await _userManager.IsInRoleAsync(
|
||||
await _userManager.FindByIdAsync(User.GetUserId()),
|
||||
Constants.AdminGroupName);
|
||||
var roles = _roleManager.Roles.Select(x=>
|
||||
new RoleInfo {
|
||||
Name = x.Name,
|
||||
Users = x.Users.Select( u=>u.UserId )
|
||||
} );
|
||||
return Ok (new { Roles = roles, AdminCount = adminCount.Count,
|
||||
YouAreAdmin = youAreAdmin
|
||||
var roles = _roleManager.Roles.Include(
|
||||
x => x.Users
|
||||
).Select(x => new RoleInfo {
|
||||
Id = x.Id,
|
||||
Name = x.Name,
|
||||
Users = x.Users.Select(u=>u.UserId).ToArray()
|
||||
});
|
||||
return View(new AdminViewModel
|
||||
{
|
||||
Roles = roles.ToArray(),
|
||||
AdminCount = adminCount.Count,
|
||||
YouAreAdmin = youAreAdmin
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult Role(string id)
|
||||
{
|
||||
IdentityRole role = _roleManager.Roles
|
||||
.Include(r=>r.Users).FirstOrDefault
|
||||
( r=> r.Id == id );
|
||||
var ri = GetRoleUserCollection(role);
|
||||
return View("Role",ri);
|
||||
}
|
||||
|
||||
public RoleUserCollection GetRoleUserCollection(IdentityRole role)
|
||||
{
|
||||
var result = new RoleUserCollection {
|
||||
Id = role.Id,
|
||||
Name = role.Name,
|
||||
Users = context.Users.Where(u=>role.Users.Any(ru => u.Id == ru.UserId))
|
||||
.Select( u => new UserInfo { UserName = u.UserName, Avatar = u.Avatar, UserId = u.Id } )
|
||||
.ToArray()
|
||||
};
|
||||
return result;
|
||||
}
|
||||
private void AddErrors(IdentityResult result)
|
||||
{
|
||||
foreach (var error in result.Errors)
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ using Microsoft.AspNet.Authorization;
|
|||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Extensions.OptionsModel;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.ViewModels.Auth;
|
||||
|
||||
// For more information on enabling Web API for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
|
||||
|
||||
|
|
@ -38,22 +39,27 @@ namespace Yavsc.Controllers
|
|||
|
||||
// GET: Blog
|
||||
[AllowAnonymous]
|
||||
public IActionResult Index(string id)
|
||||
public IActionResult Index(string id, int skip=0, int maxLen=25)
|
||||
{
|
||||
string uid = null;
|
||||
if (User.IsSignedIn())
|
||||
uid = User.GetUserId();
|
||||
if (!string.IsNullOrEmpty(id))
|
||||
return UserPosts(id);
|
||||
return View(_context.Blogspot.Include(
|
||||
b => b.Author
|
||||
).Where(p => p.Visible).Take(10));
|
||||
).Where(p => p.Visible || p.AuthorId == uid ).OrderByDescending(p => p.Posted)
|
||||
.Skip(skip).Take(maxLen));
|
||||
}
|
||||
|
||||
[Route("/Title/{id?}")]
|
||||
[AllowAnonymous]
|
||||
public IActionResult Title(string id)
|
||||
{
|
||||
var uid = User.GetUserId();
|
||||
return View("Index", _context.Blogspot.Include(
|
||||
b => b.Author
|
||||
).Where(x => x.Title == id && x.Visible).ToList());
|
||||
).Where(x => x.Title == id && (x.Visible || x.AuthorId == uid )).ToList());
|
||||
}
|
||||
|
||||
[Route("/Blog/{id?}")]
|
||||
|
|
@ -88,7 +94,7 @@ namespace Yavsc.Controllers
|
|||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
|
||||
return View(blog);
|
||||
}
|
||||
|
||||
|
|
@ -115,7 +121,7 @@ namespace Yavsc.Controllers
|
|||
_context.SaveChanges();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
_logger.LogWarning("Invalid Blog posted ...");
|
||||
ModelState.AddModelError("Unknown","Invalid Blog posted ...");
|
||||
return View(blog);
|
||||
}
|
||||
[Authorize()]
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using System.Threading.Tasks;
|
|||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.AspNet.Mvc.Rendering;
|
||||
using Microsoft.Data.Entity;
|
||||
using System.Collections.Generic;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Auth;
|
||||
|
||||
|
|
@ -42,6 +43,7 @@ namespace Yavsc.Controllers
|
|||
// GET: Client/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
SetAppTypesInputValues();
|
||||
return View();
|
||||
}
|
||||
|
||||
|
|
@ -62,8 +64,7 @@ namespace Yavsc.Controllers
|
|||
}
|
||||
private void SetAppTypesInputValues()
|
||||
{
|
||||
ViewData["Type"] =
|
||||
new SelectListItem[] {
|
||||
IEnumerable<SelectListItem> types = new SelectListItem[] {
|
||||
new SelectListItem {
|
||||
Text = ApplicationTypes.JavaScript.ToString(),
|
||||
Value = ((int) ApplicationTypes.JavaScript).ToString() },
|
||||
|
|
@ -72,6 +73,7 @@ namespace Yavsc.Controllers
|
|||
Value = ((int) ApplicationTypes.NativeConfidential).ToString()
|
||||
}
|
||||
};
|
||||
ViewData["Type"] = types;
|
||||
}
|
||||
// GET: Client/Edit/5
|
||||
public async Task<IActionResult> Edit(string id)
|
||||
|
|
|
|||
|
|
@ -161,7 +161,6 @@ namespace Yavsc.Controllers
|
|||
if (pro.Performer.Devices.Count > 0) {
|
||||
var regids = command.PerformerProfile.Performer
|
||||
.Devices.Select(d => d.GCMRegistrationId);
|
||||
var sregids = string.Join(",",regids);
|
||||
grep = await _GCMSender.NotifyBookQueryAsync(_googleSettings,regids,yaev);
|
||||
}
|
||||
// TODO setup a profile choice to allow notifications
|
||||
|
|
@ -175,7 +174,7 @@ namespace Yavsc.Controllers
|
|||
_siteSettings, _smtpSettings,
|
||||
command.PerformerProfile.Performer.Email,
|
||||
yaev.Topic+" "+yaev.Client.UserName,
|
||||
$"{yaev.Message}\r\n-- \r\n{yaev.Previsional}\r\n"
|
||||
$"{yaev.Message}\r\n-- \r\n{yaev.Previsional}\r\n{yaev.EventDate}\r\n"
|
||||
);
|
||||
}
|
||||
ViewBag.GoogleSettings = _googleSettings;
|
||||
|
|
|
|||
169
Yavsc/Controllers/DoController.cs
Normal file
169
Yavsc/Controllers/DoController.cs
Normal file
|
|
@ -0,0 +1,169 @@
|
|||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using Microsoft.AspNet.Authorization;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.AspNet.Mvc.Rendering;
|
||||
using Microsoft.Data.Entity;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
using Models;
|
||||
using Models.Workflow;
|
||||
[Authorize]
|
||||
public class DoController : Controller
|
||||
{
|
||||
private ApplicationDbContext _context;
|
||||
|
||||
public DoController(ApplicationDbContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
// GET: /Do/Index
|
||||
[HttpGet]
|
||||
public IActionResult Index(string id)
|
||||
{
|
||||
if (id == null)
|
||||
id = User.GetUserId();
|
||||
|
||||
var userActivities = _context.UserActivities.Include(u => u.Does)
|
||||
.Include(u => u.User).Where(u=> u.UserId == id)
|
||||
.OrderByDescending(u => u.Weight);
|
||||
return View(userActivities.ToList());
|
||||
}
|
||||
|
||||
// GET: Do/Details/5
|
||||
public IActionResult Details(string id, string activityCode)
|
||||
{
|
||||
if (id == null || activityCode == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
UserActivity userActivity = _context.UserActivities.Include(m=>m.Does)
|
||||
.Include(m=>m.User).Single(m => m.DoesCode == activityCode && m.UserId == id);
|
||||
if (userActivity == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
ViewBag.HasConfigurableSettings = (userActivity.Does.SettingsClassName != null);
|
||||
if (ViewBag.HasConfigurableSettings)
|
||||
ViewBag.SettingsClassControllerName = Startup.ProfileTypes[userActivity.Does.SettingsClassName].Name;
|
||||
|
||||
return View(userActivity);
|
||||
}
|
||||
|
||||
// GET: Do/Create
|
||||
[ActionName("Create"),Authorize]
|
||||
public IActionResult Create(string userId)
|
||||
{
|
||||
if (userId==null)
|
||||
userId = User.GetUserId();
|
||||
var model = new UserActivity { UserId = userId };
|
||||
ViewBag.DoesCode = new SelectList(_context.Activities, "Code", "Name");
|
||||
//ViewData["UserId"] = userId;
|
||||
ViewBag.UserId = new SelectList(_context.Performers.Include(p=>p.Performer), "PerformerId", "Performer", userId);
|
||||
return View(model);
|
||||
}
|
||||
|
||||
// POST: Do/Create
|
||||
[HttpPost(),ActionName("Create"),Authorize]
|
||||
[ValidateAntiForgeryToken]
|
||||
public IActionResult Create(UserActivity userActivity)
|
||||
{
|
||||
var uid = User.GetUserId();
|
||||
if (!User.IsInRole("Administrator"))
|
||||
if (uid != userActivity.UserId)
|
||||
ModelState.AddModelError("User","You're not admin.");
|
||||
if (userActivity.UserId == null) userActivity.UserId = uid;
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
_context.UserActivities.Add(userActivity);
|
||||
_context.SaveChanges();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
ViewBag.DoesCode = new SelectList(_context.Activities, "Code", "Name", userActivity.DoesCode);
|
||||
ViewBag.UserId = new SelectList(_context.Performers.Include(p=>p.Performer), "PerformerId", "User", userActivity.UserId);
|
||||
return View(userActivity);
|
||||
}
|
||||
|
||||
// GET: Do/Edit/5
|
||||
[Authorize]
|
||||
public IActionResult Edit(string id, string activityCode)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
UserActivity userActivity = _context.UserActivities.Include(
|
||||
u=>u.Does
|
||||
).Include(
|
||||
u=>u.User
|
||||
).Single(m => m.DoesCode == activityCode && m.UserId == id);
|
||||
if (userActivity == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
ViewData["DoesCode"] = new SelectList(_context.Activities, "Code", "Does", userActivity.DoesCode);
|
||||
ViewData["UserId"] = new SelectList(_context.Performers, "PerformerId", "User", userActivity.UserId);
|
||||
return View(userActivity);
|
||||
}
|
||||
|
||||
// POST: Do/Edit/5
|
||||
[HttpPost,Authorize]
|
||||
[ValidateAntiForgeryToken]
|
||||
public IActionResult Edit(UserActivity userActivity)
|
||||
{
|
||||
if (!User.IsInRole("Administrator"))
|
||||
if (User.GetUserId() != userActivity.UserId)
|
||||
ModelState.AddModelError("User","You're not admin.");
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
_context.Update(userActivity);
|
||||
_context.SaveChanges();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
ViewData["DoesCode"] = new SelectList(_context.Activities, "Code", "Does", userActivity.DoesCode);
|
||||
ViewData["UserId"] = new SelectList(_context.Performers, "PerformerId", "User", userActivity.UserId);
|
||||
return View(userActivity);
|
||||
}
|
||||
|
||||
// GET: Do/Delete/5
|
||||
[ActionName("Delete"),Authorize]
|
||||
public IActionResult Delete(string id, string activityCode)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
UserActivity userActivity = _context.UserActivities.Single(m => m.UserId == id && m.DoesCode == activityCode);
|
||||
|
||||
if (userActivity == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
if (!User.IsInRole("Administrator"))
|
||||
if (User.GetUserId() != userActivity.UserId)
|
||||
ModelState.AddModelError("User","You're not admin.");
|
||||
return View(userActivity);
|
||||
}
|
||||
|
||||
// POST: Do/Delete/5
|
||||
[HttpPost, ActionName("Delete"),Authorize]
|
||||
[ValidateAntiForgeryToken]
|
||||
public IActionResult DeleteConfirmed(string id, string activityCode)
|
||||
{
|
||||
UserActivity userActivity = _context.UserActivities.Single(m => m.UserId == id && m.DoesCode == activityCode);
|
||||
if (!User.IsInRole("Administrator"))
|
||||
if (User.GetUserId() != userActivity.UserId) {
|
||||
ModelState.AddModelError("User","You're not admin.");
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
_context.UserActivities.Remove(userActivity);
|
||||
_context.SaveChanges();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@ using System.IO;
|
|||
using System.Linq;
|
||||
using System.Net.Mime;
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Authorization;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
|
|
@ -21,10 +22,13 @@ namespace Yavsc.Controllers
|
|||
private ApplicationDbContext _context;
|
||||
private SiteSettings _site;
|
||||
|
||||
public EstimateController(ApplicationDbContext context, IOptions<SiteSettings> siteSettings)
|
||||
IAuthorizationService authorizationService;
|
||||
|
||||
public EstimateController(ApplicationDbContext context, IAuthorizationService authorizationService, IOptions<SiteSettings> siteSettings)
|
||||
{
|
||||
_context = context;
|
||||
_site = siteSettings.Value;
|
||||
this.authorizationService = authorizationService;
|
||||
}
|
||||
|
||||
// GET: Estimate
|
||||
|
|
@ -41,7 +45,7 @@ namespace Yavsc.Controllers
|
|||
}
|
||||
|
||||
// GET: Estimate/Details/5
|
||||
public IActionResult Details(long? id)
|
||||
public async Task<IActionResult> Details(long? id)
|
||||
{
|
||||
var uid = User.GetUserId();
|
||||
if (id == null)
|
||||
|
|
@ -62,6 +66,10 @@ namespace Yavsc.Controllers
|
|||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
if (!await authorizationService.AuthorizeAsync(User, estimate, new ViewRequirement()))
|
||||
{
|
||||
return new ChallengeResult();
|
||||
}
|
||||
return View(estimate);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@ using Microsoft.Extensions.Logging;
|
|||
using Yavsc.Models.Booking;
|
||||
using Yavsc.Helpers;
|
||||
using System;
|
||||
using Yavsc.ViewModels.FrontOffice;
|
||||
using System.Security.Claims;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
[ServiceFilter(typeof(LanguageActionFilter)),
|
||||
Route("do")]
|
||||
public class FrontOfficeController : Controller
|
||||
{
|
||||
ApplicationDbContext _context;
|
||||
|
|
@ -29,10 +29,20 @@ namespace Yavsc.Controllers
|
|||
}
|
||||
public ActionResult Index()
|
||||
{
|
||||
var latestPosts = _context.Blogspot.Where(
|
||||
x => x.Visible == true
|
||||
).OrderBy(x => x.Modified).Take(25).ToArray();
|
||||
return View(latestPosts);
|
||||
var uid = User.GetUserId();
|
||||
var now = DateTime.Now;
|
||||
|
||||
var model = new FrontOfficeIndexViewModel{
|
||||
EstimateToProduceCount = _context.Commands.Where(c => c.PerformerId == uid && c.EventDate > now
|
||||
&& c.ValidationDate == null && !_context.Estimates.Any(e=>(e.CommandId == c.Id && e.ProviderValidationDate != null))).Count(),
|
||||
EstimateToSignAsProCount = _context.Commands.Where(c => ( c.PerformerId == uid && c.EventDate > now
|
||||
&& c.ValidationDate == null && _context.Estimates.Any(e=>(e.CommandId == c.Id && e.ProviderValidationDate != null)))).Count(),
|
||||
EstimateToSignAsCliCount = _context.Estimates.Where(e=>e.ClientId == uid && e.ClientValidationDate == null) .Count(),
|
||||
BillToSignAsProCount = 0,
|
||||
BillToSignAsCliCount = 0,
|
||||
NewPayementsCount = 0
|
||||
};
|
||||
return View(model);
|
||||
}
|
||||
|
||||
[Route("Book/{id?}"), HttpGet]
|
||||
|
|
@ -42,17 +52,11 @@ namespace Yavsc.Controllers
|
|||
{
|
||||
throw new NotImplementedException("No Activity code");
|
||||
}
|
||||
|
||||
ViewBag.Activities = _context.ActivityItems(id);
|
||||
ViewBag.Activity = _context.Activities.FirstOrDefault(
|
||||
a => a.Code == id);
|
||||
|
||||
return View(
|
||||
_context.Performers.Include(p => p.Performer).Where
|
||||
(p => p.ActivityCode == id && p.Active).OrderBy(
|
||||
x => x.MinDailyCost
|
||||
)
|
||||
);
|
||||
ViewBag.Activity = _context.Activities.FirstOrDefault(a=>a.Code == id);
|
||||
var result = _context.Performers
|
||||
.Include(p=>p.Performer).Where(p => p.Activity.Any(u=>u.DoesCode==id)).OrderBy( x => x.MinDailyCost );
|
||||
|
||||
return View(result);
|
||||
}
|
||||
|
||||
[Route("Book/{id}"), HttpPost]
|
||||
|
|
|
|||
153
Yavsc/Controllers/InstrumentationController.cs
Normal file
153
Yavsc/Controllers/InstrumentationController.cs
Normal file
|
|
@ -0,0 +1,153 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Authorization;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.AspNet.Mvc.Rendering;
|
||||
using Microsoft.Data.Entity;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Booking;
|
||||
using Yavsc.Models.Booking.Profiles;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
[Authorize]
|
||||
public class InstrumentationController : Controller
|
||||
{
|
||||
private ApplicationDbContext _context;
|
||||
|
||||
public InstrumentationController(ApplicationDbContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
// GET: Instrumentation
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
return View(await _context.Instrumentation.ToListAsync());
|
||||
}
|
||||
|
||||
// GET: Instrumentation/Details/5
|
||||
public async Task<IActionResult> Details(string id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
Instrumentation musicianSettings = await _context.Instrumentation.SingleAsync(m => m.UserId == id);
|
||||
if (musicianSettings == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
return View(musicianSettings);
|
||||
}
|
||||
|
||||
// GET: Instrumentation/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
var uid = User.GetUserId();
|
||||
var owned = _context.Instrumentation.Include(i=>i.Tool).Where(i=>i.UserId==uid).Select(i=>i.InstrumentId);
|
||||
var ownedArray = owned.ToArray();
|
||||
|
||||
ViewBag.YetAvailableInstruments = _context.Instrument.Select(k=>new SelectListItem
|
||||
{ Text = k.Name, Value = k.Id.ToString(), Disabled = ownedArray.Contains(k.Id) });
|
||||
|
||||
|
||||
return View(new Instrumentation { UserId = uid });
|
||||
}
|
||||
|
||||
// POST: Instrumentation/Create
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create(Instrumentation model)
|
||||
{
|
||||
var uid = User.GetUserId();
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
if (model.UserId != uid) if (!User.IsInRole(Constants.AdminGroupName))
|
||||
return new ChallengeResult();
|
||||
|
||||
_context.Instrumentation.Add(model);
|
||||
await _context.SaveChangesAsync();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
return View(model);
|
||||
}
|
||||
|
||||
// GET: Instrumentation/Edit/5
|
||||
public async Task<IActionResult> Edit(string id)
|
||||
{
|
||||
var uid = User.GetUserId();
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
if (id != uid) if (!User.IsInRole(Constants.AdminGroupName))
|
||||
return new ChallengeResult();
|
||||
Instrumentation musicianSettings = await _context.Instrumentation.SingleAsync(m => m.UserId == id);
|
||||
if (musicianSettings == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
return View(musicianSettings);
|
||||
}
|
||||
|
||||
// POST: Instrumentation/Edit/5
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(Instrumentation musicianSettings)
|
||||
{
|
||||
var uid = User.GetUserId();
|
||||
if (musicianSettings.UserId != uid) if (!User.IsInRole(Constants.AdminGroupName))
|
||||
return new ChallengeResult();
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
_context.Update(musicianSettings);
|
||||
await _context.SaveChangesAsync();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
return View(musicianSettings);
|
||||
}
|
||||
|
||||
// GET: Instrumentation/Delete/5
|
||||
[ActionName("Delete")]
|
||||
public async Task<IActionResult> Delete(string id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
Instrumentation musicianSettings = await _context.Instrumentation.SingleAsync(m => m.UserId == id);
|
||||
if (musicianSettings == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
var uid = User.GetUserId();
|
||||
if (musicianSettings.UserId != uid) if (!User.IsInRole(Constants.AdminGroupName))
|
||||
return new ChallengeResult();
|
||||
return View(musicianSettings);
|
||||
}
|
||||
|
||||
// POST: Instrumentation/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(string id)
|
||||
{
|
||||
Instrumentation musicianSettings = await _context.Instrumentation.SingleAsync(m => m.UserId == id);
|
||||
|
||||
var uid = User.GetUserId();
|
||||
if (musicianSettings.UserId != uid) if (!User.IsInRole(Constants.AdminGroupName))
|
||||
return new ChallengeResult();
|
||||
|
||||
|
||||
_context.Instrumentation.Remove(musicianSettings);
|
||||
await _context.SaveChangesAsync();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
}
|
||||
}
|
||||
119
Yavsc/Controllers/InstrumentsController.cs
Normal file
119
Yavsc/Controllers/InstrumentsController.cs
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
using System.Linq;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
using Models;
|
||||
using Models.Booking;
|
||||
public class InstrumentsController : Controller
|
||||
{
|
||||
private ApplicationDbContext _context;
|
||||
|
||||
public InstrumentsController(ApplicationDbContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
// GET: Instruments
|
||||
public IActionResult Index()
|
||||
{
|
||||
return View(_context.Instrument.ToList());
|
||||
}
|
||||
|
||||
// GET: Instruments/Details/5
|
||||
public IActionResult Details(long? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
Instrument instrument = _context.Instrument.Single(m => m.Id == id);
|
||||
if (instrument == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
return View(instrument);
|
||||
}
|
||||
|
||||
// GET: Instruments/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
// POST: Instruments/Create
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public IActionResult Create(Instrument instrument)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
_context.Instrument.Add(instrument);
|
||||
_context.SaveChanges();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
return View(instrument);
|
||||
}
|
||||
|
||||
// GET: Instruments/Edit/5
|
||||
public IActionResult Edit(long? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
Instrument instrument = _context.Instrument.Single(m => m.Id == id);
|
||||
if (instrument == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
return View(instrument);
|
||||
}
|
||||
|
||||
// POST: Instruments/Edit/5
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public IActionResult Edit(Instrument instrument)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
_context.Update(instrument);
|
||||
_context.SaveChanges();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
return View(instrument);
|
||||
}
|
||||
|
||||
// GET: Instruments/Delete/5
|
||||
[ActionName("Delete")]
|
||||
public IActionResult Delete(long? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
Instrument instrument = _context.Instrument.Single(m => m.Id == id);
|
||||
if (instrument == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
return View(instrument);
|
||||
}
|
||||
|
||||
// POST: Instruments/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public IActionResult DeleteConfirmed(long id)
|
||||
{
|
||||
Instrument instrument = _context.Instrument.Single(m => m.Id == id);
|
||||
_context.Instrument.Remove(instrument);
|
||||
_context.SaveChanges();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
}
|
||||
}
|
||||
119
Yavsc/Controllers/LocationTypesController.cs
Normal file
119
Yavsc/Controllers/LocationTypesController.cs
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
using System.Linq;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
using Models;
|
||||
using Models.Relationship;
|
||||
public class LocationTypesController : Controller
|
||||
{
|
||||
private ApplicationDbContext _context;
|
||||
|
||||
public LocationTypesController(ApplicationDbContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
// GET: LocationTypes
|
||||
public IActionResult Index()
|
||||
{
|
||||
return View(_context.LocationType.ToList());
|
||||
}
|
||||
|
||||
// GET: LocationTypes/Details/5
|
||||
public IActionResult Details(long? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
LocationType locationType = _context.LocationType.Single(m => m.Id == id);
|
||||
if (locationType == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
return View(locationType);
|
||||
}
|
||||
|
||||
// GET: LocationTypes/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
// POST: LocationTypes/Create
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public IActionResult Create(LocationType locationType)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
_context.LocationType.Add(locationType);
|
||||
_context.SaveChanges();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
return View(locationType);
|
||||
}
|
||||
|
||||
// GET: LocationTypes/Edit/5
|
||||
public IActionResult Edit(long? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
LocationType locationType = _context.LocationType.Single(m => m.Id == id);
|
||||
if (locationType == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
return View(locationType);
|
||||
}
|
||||
|
||||
// POST: LocationTypes/Edit/5
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public IActionResult Edit(LocationType locationType)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
_context.Update(locationType);
|
||||
_context.SaveChanges();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
return View(locationType);
|
||||
}
|
||||
|
||||
// GET: LocationTypes/Delete/5
|
||||
[ActionName("Delete")]
|
||||
public IActionResult Delete(long? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
LocationType locationType = _context.LocationType.Single(m => m.Id == id);
|
||||
if (locationType == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
return View(locationType);
|
||||
}
|
||||
|
||||
// POST: LocationTypes/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public IActionResult DeleteConfirmed(long id)
|
||||
{
|
||||
LocationType locationType = _context.LocationType.Single(m => m.Id == id);
|
||||
_context.LocationType.Remove(locationType);
|
||||
_context.SaveChanges();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -110,11 +110,9 @@ namespace Yavsc.Controllers
|
|||
DiskUsage = user.DiskUsage,
|
||||
DiskQuota = user.DiskQuota
|
||||
};
|
||||
if (_dbContext.Performers.Any(x => x.PerformerId == user.Id))
|
||||
{
|
||||
var code = _dbContext.Performers.First(x => x.PerformerId == user.Id).ActivityCode;
|
||||
model.Activity = _dbContext.Activities.First(x => x.Code == code);
|
||||
}
|
||||
model.HaveProfessionalSettings = _dbContext.Performers.Any(x => x.PerformerId == user.Id);
|
||||
model.Activity = _dbContext.UserActivities.Include(a=>a.Does).Where(u=>u.UserId == user.Id)
|
||||
.ToList();
|
||||
return View(model);
|
||||
}
|
||||
|
||||
|
|
@ -491,16 +489,19 @@ namespace Yavsc.Controllers
|
|||
{
|
||||
var user = GetCurrentUserAsync().Result;
|
||||
var uid = user.Id;
|
||||
bool existing = _dbContext.Performers.Any(x => x.PerformerId == uid);
|
||||
ViewBag.Activities = _dbContext.ActivityItems(null);
|
||||
var existing = _dbContext.Performers.Include(x => x.OrganizationAddress)
|
||||
.Include(p=>p.Activity).FirstOrDefault(x => x.PerformerId == uid);
|
||||
|
||||
ViewBag.GoogleSettings = _googleSettings;
|
||||
if (existing)
|
||||
if (existing!=null)
|
||||
{
|
||||
var currentProfile = _dbContext.Performers.Include(x => x.OrganizationAddress)
|
||||
.First(x => x.PerformerId == uid);
|
||||
string currentCode = currentProfile.ActivityCode;
|
||||
ViewBag.Activities = _dbContext.ActivityItems(existing.Activity);
|
||||
return View(currentProfile);
|
||||
}
|
||||
|
||||
ViewBag.Activities = _dbContext.ActivityItems(new List<UserActivity>());
|
||||
return View(new PerformerProfile
|
||||
{
|
||||
PerformerId = user.Id,
|
||||
|
|
@ -519,6 +520,7 @@ namespace Yavsc.Controllers
|
|||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
|
||||
var exSiren = await _dbContext.ExceptionsSIREN.FirstOrDefaultAsync(
|
||||
ex => ex.SIREN == model.SIREN
|
||||
);
|
||||
|
|
@ -535,7 +537,7 @@ namespace Yavsc.Controllers
|
|||
"SIREN",
|
||||
_SR["Invalid company number"] + " (" + taskCheck.errorCode + ")"
|
||||
);
|
||||
_logger.LogInformation("Invalid company number, using key:" + _cinfoSettings.ApiKey);
|
||||
_logger.LogInformation($"Invalid company number: {model.SIREN}/{taskCheck.errorType}/{taskCheck.errorCode}/{taskCheck.errorMessage}" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -543,6 +545,7 @@ namespace Yavsc.Controllers
|
|||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex.Message);
|
||||
ModelState.AddModelError("SIREN", ex.Message);
|
||||
}
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
|
|
@ -553,14 +556,13 @@ namespace Yavsc.Controllers
|
|||
{
|
||||
_dbContext.Map.Add(model.OrganizationAddress);
|
||||
}
|
||||
bool existing = _dbContext.Performers.Any(x => x.PerformerId == uid);
|
||||
if (existing)
|
||||
|
||||
if (_dbContext.Performers.Any(p=>p.PerformerId == uid))
|
||||
{
|
||||
_dbContext.Update(model);
|
||||
}
|
||||
else _dbContext.Performers.Add(model);
|
||||
_dbContext.SaveChanges();
|
||||
|
||||
// Give this user the Performer role
|
||||
if (!User.IsInRole("Performer"))
|
||||
await _userManager.AddToRoleAsync(user, "Performer");
|
||||
|
|
@ -571,8 +573,8 @@ namespace Yavsc.Controllers
|
|||
}
|
||||
else ModelState.AddModelError(string.Empty, $"Access denied ({uid} vs {model.PerformerId})");
|
||||
}
|
||||
|
||||
ViewBag.GoogleSettings = _googleSettings;
|
||||
ViewBag.Activities = _dbContext.ActivityItems(model.ActivityCode);
|
||||
return View(model);
|
||||
}
|
||||
|
||||
|
|
|
|||
119
Yavsc/Controllers/MusicalTendenciesController.cs
Normal file
119
Yavsc/Controllers/MusicalTendenciesController.cs
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
using System.Linq;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
|
||||
namespace Yavsc.Controllers
|
||||
{
|
||||
using Models;
|
||||
using Models.Booking;
|
||||
public class MusicalTendenciesController : Controller
|
||||
{
|
||||
private ApplicationDbContext _context;
|
||||
|
||||
public MusicalTendenciesController(ApplicationDbContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
// GET: MusicalTendencies
|
||||
public IActionResult Index()
|
||||
{
|
||||
return View(_context.MusicalTendency.ToList());
|
||||
}
|
||||
|
||||
// GET: MusicalTendencies/Details/5
|
||||
public IActionResult Details(long? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
MusicalTendency musicalTendency = _context.MusicalTendency.Single(m => m.Id == id);
|
||||
if (musicalTendency == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
return View(musicalTendency);
|
||||
}
|
||||
|
||||
// GET: MusicalTendencies/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
// POST: MusicalTendencies/Create
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public IActionResult Create(MusicalTendency musicalTendency)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
_context.MusicalTendency.Add(musicalTendency);
|
||||
_context.SaveChanges();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
return View(musicalTendency);
|
||||
}
|
||||
|
||||
// GET: MusicalTendencies/Edit/5
|
||||
public IActionResult Edit(long? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
MusicalTendency musicalTendency = _context.MusicalTendency.Single(m => m.Id == id);
|
||||
if (musicalTendency == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
return View(musicalTendency);
|
||||
}
|
||||
|
||||
// POST: MusicalTendencies/Edit/5
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
public IActionResult Edit(MusicalTendency musicalTendency)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
_context.Update(musicalTendency);
|
||||
_context.SaveChanges();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
return View(musicalTendency);
|
||||
}
|
||||
|
||||
// GET: MusicalTendencies/Delete/5
|
||||
[ActionName("Delete")]
|
||||
public IActionResult Delete(long? id)
|
||||
{
|
||||
if (id == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
MusicalTendency musicalTendency = _context.MusicalTendency.Single(m => m.Id == id);
|
||||
if (musicalTendency == null)
|
||||
{
|
||||
return HttpNotFound();
|
||||
}
|
||||
|
||||
return View(musicalTendency);
|
||||
}
|
||||
|
||||
// POST: MusicalTendencies/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public IActionResult DeleteConfirmed(long id)
|
||||
{
|
||||
MusicalTendency musicalTendency = _context.MusicalTendency.Single(m => m.Id == id);
|
||||
_context.MusicalTendency.Remove(musicalTendency);
|
||||
_context.SaveChanges();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
}
|
||||
}
|
||||
16
Yavsc/Helpers/EstimateHelpers.cs
Normal file
16
Yavsc/Helpers/EstimateHelpers.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
using Yavsc.Models.Billing;
|
||||
|
||||
namespace Yavsc.Helpers
|
||||
{
|
||||
public static class EstimateHelpers {
|
||||
public static decimal GetTotal(this Estimate estimate)
|
||||
{
|
||||
decimal result = 0;
|
||||
foreach (var l in estimate.Bill)
|
||||
result += l.Count*l.UnitaryCost;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
using Microsoft.Extensions.Localization;
|
||||
using Yavsc.Model;
|
||||
using Yavsc.Models.Booking;
|
||||
using Yavsc.Models.Messaging;
|
||||
|
||||
|
|
@ -12,14 +11,18 @@ namespace Yavsc.Helpers
|
|||
{
|
||||
var yaev = new BookQueryEvent
|
||||
{
|
||||
Client = new ClientProviderInfo { UserName = query.Client.UserName , UserId = query.ClientId } ,
|
||||
Client = new ClientProviderInfo {
|
||||
UserName = query.Client.UserName ,
|
||||
UserId = query.ClientId,
|
||||
Avatar = query.Client.Avatar } ,
|
||||
Previsional = query.Previsional,
|
||||
EventDate = query.EventDate,
|
||||
Location = query.Location,
|
||||
Id = query.Id
|
||||
Id = query.Id,
|
||||
Reason = query.Reason
|
||||
};
|
||||
return yaev;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,18 @@
|
|||
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Mime;
|
||||
using System.Security.Claims;
|
||||
using System.Web;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Yavsc.ApiControllers;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.FileSystem;
|
||||
using Yavsc.ViewModels;
|
||||
using Yavsc.ViewModels.UserFiles;
|
||||
|
||||
namespace Yavsc.Helpers
|
||||
|
|
@ -24,7 +27,7 @@ namespace Yavsc.Helpers
|
|||
|
||||
return di;
|
||||
}
|
||||
static char[] ValidChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_~.".ToCharArray();
|
||||
static char[] ValidChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_~. ".ToCharArray();
|
||||
|
||||
public static bool IsValidDirectoryName(this string name)
|
||||
{
|
||||
|
|
@ -95,16 +98,17 @@ namespace Yavsc.Helpers
|
|||
user.DiskUsage = usage;
|
||||
return item;
|
||||
}
|
||||
public static HtmlString FileLink(this DefaultFileInfo info, string username, string subpath)
|
||||
{
|
||||
return new HtmlString( Startup.UserFilesOptions.RequestPath+"/"+ username + "/" + subpath + "/" +
|
||||
HttpUtility.UrlEncode(info.Name) );
|
||||
}
|
||||
public static FileRecievedInfo ReceiveAvatar(this ApplicationUser user, IFormFile formFile)
|
||||
{
|
||||
var item = new FileRecievedInfo();
|
||||
item.FileName = user.UserName + ".png";
|
||||
var destFileName = Path.Combine(Startup.SiteSetup.UserFiles.Avatars, item.FileName);
|
||||
|
||||
ImageProcessor.ImageFactory f = new ImageProcessor.ImageFactory();
|
||||
|
||||
ImageProcessor.Web.Processors.Resize r = new ImageProcessor.Web.Processors.Resize();
|
||||
|
||||
var fi = new FileInfo(destFileName);
|
||||
if (fi.Exists) item.Overriden = true;
|
||||
Rectangle cropRect = new Rectangle();
|
||||
|
|
@ -166,5 +170,27 @@ namespace Yavsc.Helpers
|
|||
dir, xsmallname), ImageFormat.Png);
|
||||
}
|
||||
}
|
||||
public static Func<string,long,string>
|
||||
SignFileNameFormat = new Func<string,long,string> ((signType,estimateId) => $"estimate-{signType}sign-{estimateId}.png");
|
||||
|
||||
public static FileRecievedInfo ReceiveProSignature(this ClaimsPrincipal user, long estimateId, IFormFile formFile, string signtype)
|
||||
{
|
||||
var item = new FileRecievedInfo();
|
||||
item.FileName = SignFileNameFormat("pro",estimateId);
|
||||
var destFileName = Path.Combine(Startup.SiteSetup.UserFiles.Bills, item.FileName);
|
||||
|
||||
var fi = new FileInfo(destFileName);
|
||||
if (fi.Exists) item.Overriden = true;
|
||||
|
||||
using (var org = formFile.OpenReadStream())
|
||||
{
|
||||
Image i = Image.FromStream(org);
|
||||
using (Bitmap source = new Bitmap(i))
|
||||
{
|
||||
source.Save(destFileName, ImageFormat.Png);
|
||||
}
|
||||
}
|
||||
return item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,25 +3,19 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using Microsoft.AspNet.Mvc.Rendering;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Workflow;
|
||||
|
||||
namespace Yavsc.Helpers {
|
||||
public static class ListItemHelpers {
|
||||
|
||||
public static List<SelectListItem> ActivityItems(
|
||||
this ApplicationDbContext _dbContext, string selectedCode)
|
||||
this ApplicationDbContext _dbContext, List<UserActivity> activity)
|
||||
{
|
||||
var codeIsNull = (string.IsNullOrEmpty(selectedCode));
|
||||
List<SelectListItem> items;
|
||||
if (codeIsNull) items = _dbContext.Activities.Select(
|
||||
List<SelectListItem> items = _dbContext.Activities.Select(
|
||||
x=> new SelectListItem() {
|
||||
Value=x.Code, Text=x.Name
|
||||
} ).ToList();
|
||||
else items =
|
||||
_dbContext.Activities.Select(
|
||||
x=> new SelectListItem() {
|
||||
Value=x.Code, Text=x.Name,
|
||||
Selected = (x.Code == selectedCode)
|
||||
Value = x.Code, Text = x.Name, Selected = activity.Any(a=>a.DoesCode == x.Code)
|
||||
} ).ToList();
|
||||
|
||||
return items;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,14 +6,26 @@ using Microsoft.AspNet.Http;
|
|||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.AspNet.Mvc.Rendering;
|
||||
using Microsoft.AspNet.Mvc.ViewEngines;
|
||||
using Yavsc.ViewModels.Gen;
|
||||
|
||||
namespace Yavsc.Helpers
|
||||
{
|
||||
public class TeXString
|
||||
using ViewModels.Gen;
|
||||
public class TeXString : HtmlString
|
||||
{
|
||||
|
||||
public class Replacement
|
||||
public TeXString(TeXString teXString): base(teXString.ToString())
|
||||
{
|
||||
}
|
||||
|
||||
public TeXString(string str) : base(str)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
public class Replacement
|
||||
{
|
||||
string target;
|
||||
string replacement;
|
||||
|
|
@ -27,8 +39,9 @@ namespace Yavsc.Helpers
|
|||
return source.Replace(target, replacement);
|
||||
}
|
||||
}
|
||||
|
||||
public readonly static Replacement[] SpecialCharsRendering =
|
||||
public static class TeXHelpers
|
||||
{
|
||||
public static readonly Replacement[] SpecialCharsRendering =
|
||||
{
|
||||
new Replacement("<","\\textless"),
|
||||
new Replacement(">","\\textgreater"),
|
||||
|
|
@ -53,23 +66,16 @@ namespace Yavsc.Helpers
|
|||
new Replacement("†","\\dag"),
|
||||
new Replacement("–","\\textendash")
|
||||
};
|
||||
string data;
|
||||
public TeXString(string str)
|
||||
|
||||
public static TeXString ToTeX(this string source)
|
||||
{
|
||||
data = str;
|
||||
string result=source;
|
||||
foreach (var r in SpecialCharsRendering)
|
||||
{
|
||||
data = r.Execute(data);
|
||||
result = r.Execute(result);
|
||||
}
|
||||
return new TeXString(result);
|
||||
}
|
||||
|
||||
override public string ToString()
|
||||
{
|
||||
return data;
|
||||
}
|
||||
}
|
||||
public static class TeXHelpers
|
||||
{
|
||||
public static string NewLinesWith(this string target, string separator)
|
||||
{
|
||||
var items = target.Split(new char[] { '\n' }).Where(
|
||||
|
|
@ -78,11 +84,19 @@ namespace Yavsc.Helpers
|
|||
return string.Join(separator, items);
|
||||
}
|
||||
|
||||
public static TeXString ToTeX(string target, string lineSeparator = "\n\\\\")
|
||||
public static TeXString ToTeX(this string target, string lineSeparator = "\n\\\\")
|
||||
{
|
||||
if (target == null) return null;
|
||||
return new TeXString(target.NewLinesWith(lineSeparator));
|
||||
return new TeXString( target.ToTeX().ToString().NewLinesWith(lineSeparator) );
|
||||
}
|
||||
|
||||
public static TeXString SplitAddressToTeX (this string target)
|
||||
{
|
||||
var alines = target.Split(',');
|
||||
var texlines = alines.Select(l=>l.ToTeX().ToString());
|
||||
return new TeXString(string.Join("\\\\\n",texlines));
|
||||
}
|
||||
|
||||
public static bool GenerateEstimatePdf(this PdfGenerationViewModel Model)
|
||||
{
|
||||
string errorMsg = null;
|
||||
|
|
@ -111,6 +125,7 @@ namespace Yavsc.Helpers
|
|||
p.StartInfo.WorkingDirectory = tempdir;
|
||||
p.StartInfo = new ProcessStartInfo();
|
||||
p.StartInfo.UseShellExecute = false;
|
||||
p.StartInfo.WorkingDirectory = tempdir;
|
||||
p.StartInfo.FileName = "/usr/bin/texi2pdf";
|
||||
p.StartInfo.Arguments = $"--batch --build-dir=. -o {fo.FullName} {fi.FullName}";
|
||||
p.Start();
|
||||
|
|
@ -121,6 +136,8 @@ namespace Yavsc.Helpers
|
|||
}
|
||||
}
|
||||
fi.Delete();
|
||||
var di = new DirectoryInfo(Path.Combine(tempdir,$"{Model.BaseFileName}.t2d"));
|
||||
di.Delete(true);
|
||||
}
|
||||
Model.Generated = fo.Exists;
|
||||
Model.GenerationErrorMessage = new HtmlString(errorMsg);
|
||||
|
|
|
|||
16
Yavsc/Helpers/WorkflowHelpers.cs
Normal file
16
Yavsc/Helpers/WorkflowHelpers.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
using Yavsc.Models;
|
||||
using Yavsc.Models.Workflow;
|
||||
using YavscLib;
|
||||
|
||||
namespace Yavsc.Helpers
|
||||
{
|
||||
public static class WorkflowHelpers
|
||||
{
|
||||
public static ISpecializationSettings CreateSettings (this Activity activity) {
|
||||
if (activity.SettingsClassName==null) return null;
|
||||
var ctor = Startup.ProfileTypes[activity.SettingsClassName].GetConstructor(System.Type.EmptyTypes);
|
||||
if (ctor==null) return null;
|
||||
return (ISpecializationSettings) ctor.Invoke(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -19,7 +19,6 @@
|
|||
// 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/>.
|
||||
using Microsoft.AspNet.SignalR;
|
||||
using Microsoft.Data.Entity;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
|
@ -27,8 +26,7 @@ using System.Linq;
|
|||
namespace Yavsc
|
||||
{
|
||||
using Models;
|
||||
using Model.Chat;
|
||||
using ViewModels.Chat;
|
||||
using Models.Chat;
|
||||
|
||||
public class ChatHub : Hub
|
||||
{
|
||||
|
|
@ -127,7 +125,7 @@ namespace Yavsc
|
|||
{
|
||||
string uname = (Context.User != null) ?
|
||||
$"[{Context.User.Identity.Name}]" :
|
||||
$"(anony{name})";
|
||||
$"({name})";
|
||||
Clients.All.addMessage(uname, message);
|
||||
}
|
||||
|
||||
|
|
@ -155,26 +153,5 @@ namespace Yavsc
|
|||
|
||||
}
|
||||
|
||||
public List<ChatUserInfo> GetUserList()
|
||||
{
|
||||
using (var db = new ApplicationDbContext()) {
|
||||
|
||||
var cxsQuery = db.Connections.Include(c=>c.Owner).GroupBy( c => c.ApplicationUserId );
|
||||
|
||||
List<ChatUserInfo> result = new List<ChatUserInfo>();
|
||||
|
||||
foreach (var g in cxsQuery) {
|
||||
|
||||
var uid = g.Key;
|
||||
var cxs = g.ToList();
|
||||
var user = cxs.First().Owner;
|
||||
|
||||
result.Add(new ChatUserInfo { UserName = user.UserName,
|
||||
UserId = user.Id, Avatar = user.Avatar, Connections = cxs } );
|
||||
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
using System;
|
||||
using Yavsc.Model;
|
||||
|
||||
namespace Yavsc.Interfaces
|
||||
{
|
||||
using Yavsc.Models.Messaging;
|
||||
public interface IBookQueryData
|
||||
{
|
||||
ClientProviderInfo Client { get; set; }
|
||||
|
|
|
|||
|
|
@ -2,13 +2,18 @@
|
|||
|
||||
public interface IEvent {
|
||||
/// <summary>
|
||||
/// An acceptable topic for this event to be.
|
||||
/// Should return something like the class name
|
||||
/// of this object
|
||||
/// <c>/topic/(bookquery|estimate)</c>
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
string Topic { get; set ; }
|
||||
/// <summary>
|
||||
/// Should be the user's name
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
string Sender { get; set ; }
|
||||
|
||||
/// <summary>
|
||||
/// The message
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
string Message { get; set; }
|
||||
}
|
||||
|
|
@ -193,6 +193,7 @@ namespace Yavsc.Migrations
|
|||
table: "GoogleCloudMobileDeclaration",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
migrationBuilder.Sql("delete from \"GoogleCloudMobileDeclaration\"");
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Name",
|
||||
table: "GoogleCloudMobileDeclaration",
|
||||
|
|
|
|||
838
Yavsc/Migrations/20161209121035_bookQueryReason.Designer.cs
generated
Normal file
838
Yavsc/Migrations/20161209121035_bookQueryReason.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,838 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20161209121035_bookQueryReason")]
|
||||
partial class bookQueryReason
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Model.Bank.BankIdentity", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AccountNumber")
|
||||
.HasAnnotation("MaxLength", 15);
|
||||
|
||||
b.Property<string>("BIC")
|
||||
.HasAnnotation("MaxLength", 15);
|
||||
|
||||
b.Property<string>("BankCode")
|
||||
.HasAnnotation("MaxLength", 5);
|
||||
|
||||
b.Property<int>("BankedKey");
|
||||
|
||||
b.Property<string>("IBAN")
|
||||
.HasAnnotation("MaxLength", 33);
|
||||
|
||||
b.Property<string>("WicketCode")
|
||||
.HasAnnotation("MaxLength", 5);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Model.Chat.Connection", b =>
|
||||
{
|
||||
b.Property<string>("ConnectionId");
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.Property<bool>("Connected");
|
||||
|
||||
b.Property<string>("UserAgent");
|
||||
|
||||
b.HasKey("ConnectionId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Model.ClientProviderInfo", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("Avatar");
|
||||
|
||||
b.Property<long?>("BillingAddressId");
|
||||
|
||||
b.Property<string>("ChatHubConnectionId");
|
||||
|
||||
b.Property<string>("EMail");
|
||||
|
||||
b.Property<string>("Phone");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("UserName");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("ContactCredits");
|
||||
|
||||
b.Property<decimal>("Credits");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ActorDenomination");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("ModeratorGroupName");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("Avatar")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<long?>("BankInfoId");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
|
||||
b.Property<long>("DiskQuota");
|
||||
|
||||
b.Property<long>("DiskUsage");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<string>("FullName")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Auth.Client", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("DisplayName");
|
||||
|
||||
b.Property<string>("LogoutRedirectUri")
|
||||
.HasAnnotation("MaxLength", 100);
|
||||
|
||||
b.Property<string>("RedirectUri");
|
||||
|
||||
b.Property<int>("RefreshTokenLifeTime");
|
||||
|
||||
b.Property<string>("Secret");
|
||||
|
||||
b.Property<int>("Type");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Auth.RefreshToken", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 50);
|
||||
|
||||
b.Property<DateTime>("ExpiresUtc");
|
||||
|
||||
b.Property<DateTime>("IssuedUtc");
|
||||
|
||||
b.Property<string>("ProtectedTicket")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Subject")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 50);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("BalanceId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<decimal>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<long>("EstimateId");
|
||||
|
||||
b.Property<long?>("EstimateTemplateId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AttachedFilesString");
|
||||
|
||||
b.Property<string>("AttachedGraphicsString");
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ClientValidationDate");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("CommandType");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ProviderValidationDate");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.EstimateTemplate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.ExceptionSIREN", b =>
|
||||
{
|
||||
b.Property<string>("SIREN");
|
||||
|
||||
b.HasKey("SIREN");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId");
|
||||
|
||||
b.Property<string>("Content");
|
||||
|
||||
b.Property<DateTime>("Modified");
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.Property<DateTime>("Posted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.Property<bool>("Visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<long?>("LocationId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<string>("Reason");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long>("CircleId");
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
|
||||
{
|
||||
b.Property<string>("DeviceId");
|
||||
|
||||
b.Property<DateTime>("DeclarationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<string>("DeviceOwnerId");
|
||||
|
||||
b.Property<string>("GCMRegistrationId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Model");
|
||||
|
||||
b.Property<string>("Platform");
|
||||
|
||||
b.Property<string>("Version");
|
||||
|
||||
b.HasKey("DeviceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Discriminator")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorProperty", "Discriminator");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorValue", "BaseProduct");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.OAuth.OAuth2Tokens", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("AccessToken");
|
||||
|
||||
b.Property<DateTime>("Expiration");
|
||||
|
||||
b.Property<string>("ExpiresIn");
|
||||
|
||||
b.Property<string>("RefreshToken");
|
||||
|
||||
b.Property<string>("TokenType");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
|
||||
{
|
||||
b.Property<long>("PostId");
|
||||
|
||||
b.Property<long>("TagId");
|
||||
|
||||
b.HasKey("PostId", "TagId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Tag", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerformerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalization");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int?>("MaxDailyCost");
|
||||
|
||||
b.Property<int?>("MinDailyCost");
|
||||
|
||||
b.Property<long?>("OfferId");
|
||||
|
||||
b.Property<long>("OrganizationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIREN")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Product", b =>
|
||||
{
|
||||
b.HasBaseType("Yavsc.Models.Market.BaseProduct");
|
||||
|
||||
b.Property<decimal>("Depth");
|
||||
|
||||
b.Property<decimal>("Height");
|
||||
|
||||
b.Property<decimal?>("Price");
|
||||
|
||||
b.Property<decimal>("Weight");
|
||||
|
||||
b.Property<decimal>("Width");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorValue", "Product");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Model.Chat.Connection", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Model.ClientProviderInfo", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("BillingAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("Yavsc.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Model.Bank.BankIdentity")
|
||||
.WithMany()
|
||||
.HasForeignKey("BankInfoId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.AccountBalance")
|
||||
.WithMany()
|
||||
.HasForeignKey("BalanceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Market.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Billing.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Billing.EstimateTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateTemplateId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Booking.BookQuery")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Circle", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("DeviceOwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Blog")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("Yavsc.Models.Market.Service")
|
||||
.WithMany()
|
||||
.HasForeignKey("OfferId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganizationAddressId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
276
Yavsc/Migrations/20161209121035_bookQueryReason.cs
Normal file
276
Yavsc/Migrations/20161209121035_bookQueryReason.cs
Normal file
|
|
@ -0,0 +1,276 @@
|
|||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class bookQueryReason : 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_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
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_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Reason",
|
||||
table: "BookQuery",
|
||||
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_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
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);
|
||||
}
|
||||
|
||||
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_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
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_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "Reason", table: "BookQuery");
|
||||
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_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
869
Yavsc/Migrations/20161231163016_musicalPreferences.Designer.cs
generated
Normal file
869
Yavsc/Migrations/20161231163016_musicalPreferences.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,869 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20161231163016_musicalPreferences")]
|
||||
partial class musicalPreferences
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Model.Bank.BankIdentity", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AccountNumber")
|
||||
.HasAnnotation("MaxLength", 15);
|
||||
|
||||
b.Property<string>("BIC")
|
||||
.HasAnnotation("MaxLength", 15);
|
||||
|
||||
b.Property<string>("BankCode")
|
||||
.HasAnnotation("MaxLength", 5);
|
||||
|
||||
b.Property<int>("BankedKey");
|
||||
|
||||
b.Property<string>("IBAN")
|
||||
.HasAnnotation("MaxLength", 33);
|
||||
|
||||
b.Property<string>("WicketCode")
|
||||
.HasAnnotation("MaxLength", 5);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("ContactCredits");
|
||||
|
||||
b.Property<decimal>("Credits");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ActorDenomination");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("ModeratorGroupName");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("Avatar")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<long?>("BankInfoId");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
|
||||
b.Property<long>("DiskQuota");
|
||||
|
||||
b.Property<long>("DiskUsage");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<string>("FullName")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Auth.Client", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("DisplayName");
|
||||
|
||||
b.Property<string>("LogoutRedirectUri")
|
||||
.HasAnnotation("MaxLength", 100);
|
||||
|
||||
b.Property<string>("RedirectUri");
|
||||
|
||||
b.Property<int>("RefreshTokenLifeTime");
|
||||
|
||||
b.Property<string>("Secret");
|
||||
|
||||
b.Property<int>("Type");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Auth.RefreshToken", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 50);
|
||||
|
||||
b.Property<DateTime>("ExpiresUtc");
|
||||
|
||||
b.Property<DateTime>("IssuedUtc");
|
||||
|
||||
b.Property<string>("ProtectedTicket")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Subject")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 50);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("BalanceId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<decimal>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<long>("EstimateId");
|
||||
|
||||
b.Property<long?>("EstimateTemplateId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AttachedFilesString");
|
||||
|
||||
b.Property<string>("AttachedGraphicsString");
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ClientValidationDate");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("CommandType");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ProviderValidationDate");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.EstimateTemplate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.ExceptionSIREN", b =>
|
||||
{
|
||||
b.Property<string>("SIREN");
|
||||
|
||||
b.HasKey("SIREN");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId");
|
||||
|
||||
b.Property<string>("Content");
|
||||
|
||||
b.Property<DateTime>("Modified");
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.Property<DateTime>("Posted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.Property<bool>("Visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<long?>("LocationId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<string>("Reason");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalPreference", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.Property<long>("OwnerId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
|
||||
{
|
||||
b.Property<string>("ConnectionId");
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.Property<bool>("Connected");
|
||||
|
||||
b.Property<string>("UserAgent");
|
||||
|
||||
b.HasKey("ConnectionId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long>("CircleId");
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
|
||||
{
|
||||
b.Property<string>("DeviceId");
|
||||
|
||||
b.Property<DateTime>("DeclarationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<string>("DeviceOwnerId");
|
||||
|
||||
b.Property<string>("GCMRegistrationId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Model");
|
||||
|
||||
b.Property<string>("Platform");
|
||||
|
||||
b.Property<string>("Version");
|
||||
|
||||
b.HasKey("DeviceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Discriminator")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorProperty", "Discriminator");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorValue", "BaseProduct");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("Avatar");
|
||||
|
||||
b.Property<long?>("BillingAddressId");
|
||||
|
||||
b.Property<string>("EMail");
|
||||
|
||||
b.Property<string>("Phone");
|
||||
|
||||
b.Property<string>("UserName");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.OAuth.OAuth2Tokens", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("AccessToken");
|
||||
|
||||
b.Property<DateTime>("Expiration");
|
||||
|
||||
b.Property<string>("ExpiresIn");
|
||||
|
||||
b.Property<string>("RefreshToken");
|
||||
|
||||
b.Property<string>("TokenType");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
|
||||
{
|
||||
b.Property<long>("PostId");
|
||||
|
||||
b.Property<long>("TagId");
|
||||
|
||||
b.HasKey("PostId", "TagId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Tag", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerformerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalization");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int?>("MaxDailyCost");
|
||||
|
||||
b.Property<int?>("MinDailyCost");
|
||||
|
||||
b.Property<long?>("OfferId");
|
||||
|
||||
b.Property<long>("OrganizationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIREN")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Product", b =>
|
||||
{
|
||||
b.HasBaseType("Yavsc.Models.Market.BaseProduct");
|
||||
|
||||
b.Property<decimal>("Depth");
|
||||
|
||||
b.Property<decimal>("Height");
|
||||
|
||||
b.Property<decimal?>("Price");
|
||||
|
||||
b.Property<decimal>("Weight");
|
||||
|
||||
b.Property<decimal>("Width");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorValue", "Product");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("Yavsc.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Model.Bank.BankIdentity")
|
||||
.WithMany()
|
||||
.HasForeignKey("BankInfoId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.AccountBalance")
|
||||
.WithMany()
|
||||
.HasForeignKey("BalanceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Market.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Billing.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Billing.EstimateTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateTemplateId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Booking.BookQuery")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Circle", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("DeviceOwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("BillingAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Blog")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("Yavsc.Models.Market.Service")
|
||||
.WithMany()
|
||||
.HasForeignKey("OfferId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganizationAddressId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
317
Yavsc/Migrations/20161231163016_musicalPreferences.cs
Normal file
317
Yavsc/Migrations/20161231163016_musicalPreferences.cs
Normal file
|
|
@ -0,0 +1,317 @@
|
|||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class musicalPreferences : 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_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
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_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "ChatHubConnectionId", table: "ClientProviderInfo");
|
||||
migrationBuilder.DropColumn(name: "Rate", table: "ClientProviderInfo");
|
||||
migrationBuilder.CreateTable(
|
||||
name: "BlackListed",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
OwnerId = table.Column<string>(nullable: true),
|
||||
UserId = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_BlackListed", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_BlackListed_ApplicationUser_OwnerId",
|
||||
column: x => x.OwnerId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "MusicalPreference",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
Name = table.Column<string>(nullable: false),
|
||||
OwnerId = table.Column<long>(nullable: false),
|
||||
Rate = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_MusicalPreference", x => x.Id);
|
||||
});
|
||||
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_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
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);
|
||||
}
|
||||
|
||||
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_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
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_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropTable("BlackListed");
|
||||
migrationBuilder.DropTable("MusicalPreference");
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ChatHubConnectionId",
|
||||
table: "ClientProviderInfo",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Rate",
|
||||
table: "ClientProviderInfo",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
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_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
881
Yavsc/Migrations/20170102140332_musicalTendencies.Designer.cs
generated
Normal file
881
Yavsc/Migrations/20170102140332_musicalTendencies.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,881 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20170102140332_musicalTendencies")]
|
||||
partial class musicalTendencies
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Model.Bank.BankIdentity", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AccountNumber")
|
||||
.HasAnnotation("MaxLength", 15);
|
||||
|
||||
b.Property<string>("BIC")
|
||||
.HasAnnotation("MaxLength", 15);
|
||||
|
||||
b.Property<string>("BankCode")
|
||||
.HasAnnotation("MaxLength", 5);
|
||||
|
||||
b.Property<int>("BankedKey");
|
||||
|
||||
b.Property<string>("IBAN")
|
||||
.HasAnnotation("MaxLength", 33);
|
||||
|
||||
b.Property<string>("WicketCode")
|
||||
.HasAnnotation("MaxLength", 5);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("ContactCredits");
|
||||
|
||||
b.Property<decimal>("Credits");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ActorDenomination");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("ModeratorGroupName");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("Avatar")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<long?>("BankInfoId");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
|
||||
b.Property<long>("DiskQuota");
|
||||
|
||||
b.Property<long>("DiskUsage");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<string>("FullName")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Auth.Client", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("DisplayName");
|
||||
|
||||
b.Property<string>("LogoutRedirectUri")
|
||||
.HasAnnotation("MaxLength", 100);
|
||||
|
||||
b.Property<string>("RedirectUri");
|
||||
|
||||
b.Property<int>("RefreshTokenLifeTime");
|
||||
|
||||
b.Property<string>("Secret");
|
||||
|
||||
b.Property<int>("Type");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Auth.RefreshToken", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 50);
|
||||
|
||||
b.Property<DateTime>("ExpiresUtc");
|
||||
|
||||
b.Property<DateTime>("IssuedUtc");
|
||||
|
||||
b.Property<string>("ProtectedTicket")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Subject")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 50);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("BalanceId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<decimal>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<long>("EstimateId");
|
||||
|
||||
b.Property<long?>("EstimateTemplateId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AttachedFilesString");
|
||||
|
||||
b.Property<string>("AttachedGraphicsString");
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ClientValidationDate");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("CommandType");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ProviderValidationDate");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.EstimateTemplate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.ExceptionSIREN", b =>
|
||||
{
|
||||
b.Property<string>("SIREN");
|
||||
|
||||
b.HasKey("SIREN");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId");
|
||||
|
||||
b.Property<string>("Content");
|
||||
|
||||
b.Property<DateTime>("Modified");
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.Property<DateTime>("Posted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.Property<bool>("Visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<long?>("LocationId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<string>("Reason");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalPreference", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.Property<long>("OwnerId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalTendency", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
|
||||
{
|
||||
b.Property<string>("ConnectionId");
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.Property<bool>("Connected");
|
||||
|
||||
b.Property<string>("UserAgent");
|
||||
|
||||
b.HasKey("ConnectionId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long>("CircleId");
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
|
||||
{
|
||||
b.Property<string>("DeviceId");
|
||||
|
||||
b.Property<DateTime>("DeclarationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<string>("DeviceOwnerId");
|
||||
|
||||
b.Property<string>("GCMRegistrationId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Model");
|
||||
|
||||
b.Property<string>("Platform");
|
||||
|
||||
b.Property<string>("Version");
|
||||
|
||||
b.HasKey("DeviceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Discriminator")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorProperty", "Discriminator");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorValue", "BaseProduct");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("Avatar");
|
||||
|
||||
b.Property<long?>("BillingAddressId");
|
||||
|
||||
b.Property<string>("EMail");
|
||||
|
||||
b.Property<string>("Phone");
|
||||
|
||||
b.Property<string>("UserName");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.OAuth.OAuth2Tokens", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("AccessToken");
|
||||
|
||||
b.Property<DateTime>("Expiration");
|
||||
|
||||
b.Property<string>("ExpiresIn");
|
||||
|
||||
b.Property<string>("RefreshToken");
|
||||
|
||||
b.Property<string>("TokenType");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
|
||||
{
|
||||
b.Property<long>("PostId");
|
||||
|
||||
b.Property<long>("TagId");
|
||||
|
||||
b.HasKey("PostId", "TagId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Tag", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerformerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalization");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int?>("MaxDailyCost");
|
||||
|
||||
b.Property<int?>("MinDailyCost");
|
||||
|
||||
b.Property<long?>("OfferId");
|
||||
|
||||
b.Property<long>("OrganizationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIREN")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Product", b =>
|
||||
{
|
||||
b.HasBaseType("Yavsc.Models.Market.BaseProduct");
|
||||
|
||||
b.Property<decimal>("Depth");
|
||||
|
||||
b.Property<decimal>("Height");
|
||||
|
||||
b.Property<decimal?>("Price");
|
||||
|
||||
b.Property<decimal>("Weight");
|
||||
|
||||
b.Property<decimal>("Width");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorValue", "Product");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("Yavsc.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Model.Bank.BankIdentity")
|
||||
.WithMany()
|
||||
.HasForeignKey("BankInfoId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.AccountBalance")
|
||||
.WithMany()
|
||||
.HasForeignKey("BalanceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Market.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Billing.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Billing.EstimateTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateTemplateId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Booking.BookQuery")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Circle", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("DeviceOwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("BillingAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Blog")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("Yavsc.Models.Market.Service")
|
||||
.WithMany()
|
||||
.HasForeignKey("OfferId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganizationAddressId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
285
Yavsc/Migrations/20170102140332_musicalTendencies.cs
Normal file
285
Yavsc/Migrations/20170102140332_musicalTendencies.cs
Normal file
|
|
@ -0,0 +1,285 @@
|
|||
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class musicalTendencies : 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_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
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_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.CreateTable(
|
||||
name: "MusicalTendency",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
Name = table.Column<string>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_MusicalTendency", x => x.Id);
|
||||
});
|
||||
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_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
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);
|
||||
}
|
||||
|
||||
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_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
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_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropTable("MusicalTendency");
|
||||
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_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
897
Yavsc/Migrations/20170102152745_locationTypes.Designer.cs
generated
Normal file
897
Yavsc/Migrations/20170102152745_locationTypes.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,897 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20170102152745_locationTypes")]
|
||||
partial class locationTypes
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Model.Bank.BankIdentity", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AccountNumber")
|
||||
.HasAnnotation("MaxLength", 15);
|
||||
|
||||
b.Property<string>("BIC")
|
||||
.HasAnnotation("MaxLength", 15);
|
||||
|
||||
b.Property<string>("BankCode")
|
||||
.HasAnnotation("MaxLength", 5);
|
||||
|
||||
b.Property<int>("BankedKey");
|
||||
|
||||
b.Property<string>("IBAN")
|
||||
.HasAnnotation("MaxLength", 33);
|
||||
|
||||
b.Property<string>("WicketCode")
|
||||
.HasAnnotation("MaxLength", 5);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("ContactCredits");
|
||||
|
||||
b.Property<decimal>("Credits");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ActorDenomination");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("ModeratorGroupName");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("Avatar")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<long?>("BankInfoId");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
|
||||
b.Property<long>("DiskQuota");
|
||||
|
||||
b.Property<long>("DiskUsage");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<string>("FullName")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Auth.Client", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("DisplayName");
|
||||
|
||||
b.Property<string>("LogoutRedirectUri")
|
||||
.HasAnnotation("MaxLength", 100);
|
||||
|
||||
b.Property<string>("RedirectUri");
|
||||
|
||||
b.Property<int>("RefreshTokenLifeTime");
|
||||
|
||||
b.Property<string>("Secret");
|
||||
|
||||
b.Property<int>("Type");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Auth.RefreshToken", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 50);
|
||||
|
||||
b.Property<DateTime>("ExpiresUtc");
|
||||
|
||||
b.Property<DateTime>("IssuedUtc");
|
||||
|
||||
b.Property<string>("ProtectedTicket")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Subject")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 50);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("BalanceId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<decimal>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<long>("EstimateId");
|
||||
|
||||
b.Property<long?>("EstimateTemplateId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AttachedFilesString");
|
||||
|
||||
b.Property<string>("AttachedGraphicsString");
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ClientValidationDate");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("CommandType");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ProviderValidationDate");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.EstimateTemplate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.ExceptionSIREN", b =>
|
||||
{
|
||||
b.Property<string>("SIREN");
|
||||
|
||||
b.HasKey("SIREN");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId");
|
||||
|
||||
b.Property<string>("Content");
|
||||
|
||||
b.Property<DateTime>("Modified");
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.Property<DateTime>("Posted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.Property<bool>("Visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<long?>("LocationId");
|
||||
|
||||
b.Property<long?>("LocationTypeId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<string>("Reason");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalPreference", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.Property<long>("OwnerId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalTendency", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
|
||||
{
|
||||
b.Property<string>("ConnectionId");
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.Property<bool>("Connected");
|
||||
|
||||
b.Property<string>("UserAgent");
|
||||
|
||||
b.HasKey("ConnectionId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long>("CircleId");
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
|
||||
{
|
||||
b.Property<string>("DeviceId");
|
||||
|
||||
b.Property<DateTime>("DeclarationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<string>("DeviceOwnerId");
|
||||
|
||||
b.Property<string>("GCMRegistrationId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Model");
|
||||
|
||||
b.Property<string>("Platform");
|
||||
|
||||
b.Property<string>("Version");
|
||||
|
||||
b.HasKey("DeviceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Discriminator")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorProperty", "Discriminator");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorValue", "BaseProduct");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("Avatar");
|
||||
|
||||
b.Property<long?>("BillingAddressId");
|
||||
|
||||
b.Property<string>("EMail");
|
||||
|
||||
b.Property<string>("Phone");
|
||||
|
||||
b.Property<string>("UserName");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.OAuth.OAuth2Tokens", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("AccessToken");
|
||||
|
||||
b.Property<DateTime>("Expiration");
|
||||
|
||||
b.Property<string>("ExpiresIn");
|
||||
|
||||
b.Property<string>("RefreshToken");
|
||||
|
||||
b.Property<string>("TokenType");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
|
||||
{
|
||||
b.Property<long>("PostId");
|
||||
|
||||
b.Property<long>("TagId");
|
||||
|
||||
b.HasKey("PostId", "TagId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Relationship.LocationType", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Tag", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerformerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalization");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int?>("MaxDailyCost");
|
||||
|
||||
b.Property<int?>("MinDailyCost");
|
||||
|
||||
b.Property<long?>("OfferId");
|
||||
|
||||
b.Property<long>("OrganizationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIREN")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Product", b =>
|
||||
{
|
||||
b.HasBaseType("Yavsc.Models.Market.BaseProduct");
|
||||
|
||||
b.Property<decimal>("Depth");
|
||||
|
||||
b.Property<decimal>("Height");
|
||||
|
||||
b.Property<decimal?>("Price");
|
||||
|
||||
b.Property<decimal>("Weight");
|
||||
|
||||
b.Property<decimal>("Width");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorValue", "Product");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("Yavsc.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Model.Bank.BankIdentity")
|
||||
.WithMany()
|
||||
.HasForeignKey("BankInfoId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.AccountBalance")
|
||||
.WithMany()
|
||||
.HasForeignKey("BalanceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Market.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Billing.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Billing.EstimateTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateTemplateId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Booking.BookQuery")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Relationship.LocationType")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationTypeId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Circle", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("DeviceOwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("BillingAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Blog")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("Yavsc.Models.Market.Service")
|
||||
.WithMany()
|
||||
.HasForeignKey("OfferId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganizationAddressId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
298
Yavsc/Migrations/20170102152745_locationTypes.cs
Normal file
298
Yavsc/Migrations/20170102152745_locationTypes.cs
Normal file
|
|
@ -0,0 +1,298 @@
|
|||
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class locationTypes : 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_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
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_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.CreateTable(
|
||||
name: "LocationType",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
Name = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_LocationType", x => x.Id);
|
||||
});
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "LocationTypeId",
|
||||
table: "BookQuery",
|
||||
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_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_LocationType_LocationTypeId",
|
||||
table: "BookQuery",
|
||||
column: "LocationTypeId",
|
||||
principalTable: "LocationType",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
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);
|
||||
}
|
||||
|
||||
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_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_LocationType_LocationTypeId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
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_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "LocationTypeId", table: "BookQuery");
|
||||
migrationBuilder.DropTable("LocationType");
|
||||
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_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
907
Yavsc/Migrations/20170106092028_WFActivityParentAndProfiles.Designer.cs
generated
Normal file
907
Yavsc/Migrations/20170106092028_WFActivityParentAndProfiles.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,907 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20170106092028_WFActivityParentAndProfiles")]
|
||||
partial class WFActivityParentAndProfiles
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Model.Bank.BankIdentity", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AccountNumber")
|
||||
.HasAnnotation("MaxLength", 15);
|
||||
|
||||
b.Property<string>("BIC")
|
||||
.HasAnnotation("MaxLength", 15);
|
||||
|
||||
b.Property<string>("BankCode")
|
||||
.HasAnnotation("MaxLength", 5);
|
||||
|
||||
b.Property<int>("BankedKey");
|
||||
|
||||
b.Property<string>("IBAN")
|
||||
.HasAnnotation("MaxLength", 33);
|
||||
|
||||
b.Property<string>("WicketCode")
|
||||
.HasAnnotation("MaxLength", 5);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("ContactCredits");
|
||||
|
||||
b.Property<decimal>("Credits");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ActorDenomination");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("ModeratorGroupName");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ParentCode")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("Avatar")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<long?>("BankInfoId");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
|
||||
b.Property<long>("DiskQuota");
|
||||
|
||||
b.Property<long>("DiskUsage");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<string>("FullName")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Auth.Client", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("DisplayName");
|
||||
|
||||
b.Property<string>("LogoutRedirectUri")
|
||||
.HasAnnotation("MaxLength", 100);
|
||||
|
||||
b.Property<string>("RedirectUri");
|
||||
|
||||
b.Property<int>("RefreshTokenLifeTime");
|
||||
|
||||
b.Property<string>("Secret");
|
||||
|
||||
b.Property<int>("Type");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Auth.RefreshToken", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 50);
|
||||
|
||||
b.Property<DateTime>("ExpiresUtc");
|
||||
|
||||
b.Property<DateTime>("IssuedUtc");
|
||||
|
||||
b.Property<string>("ProtectedTicket")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Subject")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 50);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("BalanceId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<decimal>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<long>("EstimateId");
|
||||
|
||||
b.Property<long?>("EstimateTemplateId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AttachedFilesString");
|
||||
|
||||
b.Property<string>("AttachedGraphicsString");
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ClientValidationDate");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("CommandType");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ProviderValidationDate");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.EstimateTemplate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.ExceptionSIREN", b =>
|
||||
{
|
||||
b.Property<string>("SIREN");
|
||||
|
||||
b.HasKey("SIREN");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId");
|
||||
|
||||
b.Property<string>("Content");
|
||||
|
||||
b.Property<DateTime>("Modified");
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.Property<DateTime>("Posted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.Property<bool>("Visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<long?>("LocationId");
|
||||
|
||||
b.Property<long?>("LocationTypeId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<string>("Reason");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalPreference", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.Property<long>("OwnerId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalTendency", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
|
||||
{
|
||||
b.Property<string>("ConnectionId");
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.Property<bool>("Connected");
|
||||
|
||||
b.Property<string>("UserAgent");
|
||||
|
||||
b.HasKey("ConnectionId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long>("CircleId");
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
|
||||
{
|
||||
b.Property<string>("DeviceId");
|
||||
|
||||
b.Property<DateTime>("DeclarationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<string>("DeviceOwnerId");
|
||||
|
||||
b.Property<string>("GCMRegistrationId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Model");
|
||||
|
||||
b.Property<string>("Platform");
|
||||
|
||||
b.Property<string>("Version");
|
||||
|
||||
b.HasKey("DeviceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Discriminator")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorProperty", "Discriminator");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorValue", "BaseProduct");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("Avatar");
|
||||
|
||||
b.Property<long?>("BillingAddressId");
|
||||
|
||||
b.Property<string>("EMail");
|
||||
|
||||
b.Property<string>("Phone");
|
||||
|
||||
b.Property<string>("UserName");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.OAuth.OAuth2Tokens", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("AccessToken");
|
||||
|
||||
b.Property<DateTime>("Expiration");
|
||||
|
||||
b.Property<string>("ExpiresIn");
|
||||
|
||||
b.Property<string>("RefreshToken");
|
||||
|
||||
b.Property<string>("TokenType");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
|
||||
{
|
||||
b.Property<long>("PostId");
|
||||
|
||||
b.Property<long>("TagId");
|
||||
|
||||
b.HasKey("PostId", "TagId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Relationship.LocationType", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Tag", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerformerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalization");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int?>("MaxDailyCost");
|
||||
|
||||
b.Property<int?>("MinDailyCost");
|
||||
|
||||
b.Property<long?>("OfferId");
|
||||
|
||||
b.Property<long>("OrganizationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIREN")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Product", b =>
|
||||
{
|
||||
b.HasBaseType("Yavsc.Models.Market.BaseProduct");
|
||||
|
||||
b.Property<decimal>("Depth");
|
||||
|
||||
b.Property<decimal>("Height");
|
||||
|
||||
b.Property<decimal?>("Price");
|
||||
|
||||
b.Property<decimal>("Weight");
|
||||
|
||||
b.Property<decimal>("Width");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorValue", "Product");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("Yavsc.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Activity", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ParentCode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Model.Bank.BankIdentity")
|
||||
.WithMany()
|
||||
.HasForeignKey("BankInfoId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.AccountBalance")
|
||||
.WithMany()
|
||||
.HasForeignKey("BalanceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Market.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Billing.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Billing.EstimateTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateTemplateId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Booking.BookQuery")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Relationship.LocationType")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationTypeId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Circle", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("DeviceOwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("BillingAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Blog")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("Yavsc.Models.Market.Service")
|
||||
.WithMany()
|
||||
.HasForeignKey("OfferId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganizationAddressId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
285
Yavsc/Migrations/20170106092028_WFActivityParentAndProfiles.cs
Normal file
285
Yavsc/Migrations/20170106092028_WFActivityParentAndProfiles.cs
Normal file
|
|
@ -0,0 +1,285 @@
|
|||
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class WFActivityParentAndProfiles : 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_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
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_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ParentCode",
|
||||
table: "Activity",
|
||||
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_AccountBalance_ApplicationUser_UserId",
|
||||
table: "AccountBalance",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Activity_Activity_ParentCode",
|
||||
table: "Activity",
|
||||
column: "ParentCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
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);
|
||||
}
|
||||
|
||||
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_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
|
||||
migrationBuilder.DropForeignKey(name: "FK_Activity_Activity_ParentCode", table: "Activity");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
|
||||
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
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_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "ParentCode", table: "Activity");
|
||||
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_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
914
Yavsc/Migrations/20170106113614_ownerProfile.Designer.cs
generated
Normal file
914
Yavsc/Migrations/20170106113614_ownerProfile.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,914 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20170106113614_ownerProfile")]
|
||||
partial class ownerProfile
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Model.Bank.BankIdentity", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AccountNumber")
|
||||
.HasAnnotation("MaxLength", 15);
|
||||
|
||||
b.Property<string>("BIC")
|
||||
.HasAnnotation("MaxLength", 15);
|
||||
|
||||
b.Property<string>("BankCode")
|
||||
.HasAnnotation("MaxLength", 5);
|
||||
|
||||
b.Property<int>("BankedKey");
|
||||
|
||||
b.Property<string>("IBAN")
|
||||
.HasAnnotation("MaxLength", 33);
|
||||
|
||||
b.Property<string>("WicketCode")
|
||||
.HasAnnotation("MaxLength", 5);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("ContactCredits");
|
||||
|
||||
b.Property<decimal>("Credits");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ActorDenomination");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("ModeratorGroupName");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ParentCode")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("Avatar")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<long?>("BankInfoId");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
|
||||
b.Property<long>("DiskQuota");
|
||||
|
||||
b.Property<long>("DiskUsage");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<string>("FullName")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Auth.Client", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("DisplayName");
|
||||
|
||||
b.Property<string>("LogoutRedirectUri")
|
||||
.HasAnnotation("MaxLength", 100);
|
||||
|
||||
b.Property<string>("RedirectUri");
|
||||
|
||||
b.Property<int>("RefreshTokenLifeTime");
|
||||
|
||||
b.Property<string>("Secret");
|
||||
|
||||
b.Property<int>("Type");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Auth.RefreshToken", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 50);
|
||||
|
||||
b.Property<DateTime>("ExpiresUtc");
|
||||
|
||||
b.Property<DateTime>("IssuedUtc");
|
||||
|
||||
b.Property<string>("ProtectedTicket")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Subject")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 50);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("BalanceId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<decimal>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<long>("EstimateId");
|
||||
|
||||
b.Property<long?>("EstimateTemplateId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AttachedFilesString");
|
||||
|
||||
b.Property<string>("AttachedGraphicsString");
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ClientValidationDate");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("CommandType");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ProviderValidationDate");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.EstimateTemplate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.ExceptionSIREN", b =>
|
||||
{
|
||||
b.Property<string>("SIREN");
|
||||
|
||||
b.HasKey("SIREN");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId");
|
||||
|
||||
b.Property<string>("Content");
|
||||
|
||||
b.Property<DateTime>("Modified");
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.Property<DateTime>("Posted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.Property<bool>("Visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<long?>("LocationId");
|
||||
|
||||
b.Property<long?>("LocationTypeId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<string>("Reason");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalPreference", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.Property<string>("OwnerProfileId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalTendency", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
|
||||
{
|
||||
b.Property<string>("ConnectionId");
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.Property<bool>("Connected");
|
||||
|
||||
b.Property<string>("UserAgent");
|
||||
|
||||
b.HasKey("ConnectionId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long>("CircleId");
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
|
||||
{
|
||||
b.Property<string>("DeviceId");
|
||||
|
||||
b.Property<DateTime>("DeclarationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<string>("DeviceOwnerId");
|
||||
|
||||
b.Property<string>("GCMRegistrationId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Model");
|
||||
|
||||
b.Property<string>("Platform");
|
||||
|
||||
b.Property<string>("Version");
|
||||
|
||||
b.HasKey("DeviceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Discriminator")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorProperty", "Discriminator");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorValue", "BaseProduct");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("Avatar");
|
||||
|
||||
b.Property<long?>("BillingAddressId");
|
||||
|
||||
b.Property<string>("EMail");
|
||||
|
||||
b.Property<string>("Phone");
|
||||
|
||||
b.Property<string>("UserName");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.OAuth.OAuth2Tokens", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("AccessToken");
|
||||
|
||||
b.Property<DateTime>("Expiration");
|
||||
|
||||
b.Property<string>("ExpiresIn");
|
||||
|
||||
b.Property<string>("RefreshToken");
|
||||
|
||||
b.Property<string>("TokenType");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
|
||||
{
|
||||
b.Property<long>("PostId");
|
||||
|
||||
b.Property<long>("TagId");
|
||||
|
||||
b.HasKey("PostId", "TagId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Relationship.LocationType", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Tag", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerformerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalization");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int?>("MaxDailyCost");
|
||||
|
||||
b.Property<int?>("MinDailyCost");
|
||||
|
||||
b.Property<long?>("OfferId");
|
||||
|
||||
b.Property<long>("OrganizationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIREN")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Product", b =>
|
||||
{
|
||||
b.HasBaseType("Yavsc.Models.Market.BaseProduct");
|
||||
|
||||
b.Property<decimal>("Depth");
|
||||
|
||||
b.Property<decimal>("Height");
|
||||
|
||||
b.Property<decimal?>("Price");
|
||||
|
||||
b.Property<decimal>("Weight");
|
||||
|
||||
b.Property<decimal>("Width");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorValue", "Product");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("Yavsc.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Activity", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ParentCode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Model.Bank.BankIdentity")
|
||||
.WithMany()
|
||||
.HasForeignKey("BankInfoId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.AccountBalance")
|
||||
.WithMany()
|
||||
.HasForeignKey("BalanceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Market.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Billing.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Billing.EstimateTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateTemplateId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Booking.BookQuery")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Relationship.LocationType")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationTypeId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalPreference", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerProfileId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Circle", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("DeviceOwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("BillingAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Blog")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("Yavsc.Models.Market.Service")
|
||||
.WithMany()
|
||||
.HasForeignKey("OfferId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganizationAddressId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
291
Yavsc/Migrations/20170106113614_ownerProfile.cs
Normal file
291
Yavsc/Migrations/20170106113614_ownerProfile.cs
Normal file
|
|
@ -0,0 +1,291 @@
|
|||
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class ownerProfile : 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_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
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_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "OwnerId", table: "MusicalPreference");
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "OwnerProfileId",
|
||||
table: "MusicalPreference",
|
||||
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_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_MusicalPreference_PerformerProfile_OwnerProfileId",
|
||||
table: "MusicalPreference",
|
||||
column: "OwnerProfileId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
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_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
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);
|
||||
}
|
||||
|
||||
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_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_MusicalPreference_PerformerProfile_OwnerProfileId", table: "MusicalPreference");
|
||||
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_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "OwnerProfileId", table: "MusicalPreference");
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "OwnerId",
|
||||
table: "MusicalPreference",
|
||||
nullable: false,
|
||||
defaultValue: 0L);
|
||||
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_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
926
Yavsc/Migrations/20170106122307_Instruments.Designer.cs
generated
Normal file
926
Yavsc/Migrations/20170106122307_Instruments.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,926 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20170106122307_Instruments")]
|
||||
partial class Instruments
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Model.Bank.BankIdentity", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AccountNumber")
|
||||
.HasAnnotation("MaxLength", 15);
|
||||
|
||||
b.Property<string>("BIC")
|
||||
.HasAnnotation("MaxLength", 15);
|
||||
|
||||
b.Property<string>("BankCode")
|
||||
.HasAnnotation("MaxLength", 5);
|
||||
|
||||
b.Property<int>("BankedKey");
|
||||
|
||||
b.Property<string>("IBAN")
|
||||
.HasAnnotation("MaxLength", 33);
|
||||
|
||||
b.Property<string>("WicketCode")
|
||||
.HasAnnotation("MaxLength", 5);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("ContactCredits");
|
||||
|
||||
b.Property<decimal>("Credits");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ActorDenomination");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("ModeratorGroupName");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ParentCode")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("Avatar")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<long?>("BankInfoId");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
|
||||
b.Property<long>("DiskQuota");
|
||||
|
||||
b.Property<long>("DiskUsage");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<string>("FullName")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Auth.Client", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("DisplayName");
|
||||
|
||||
b.Property<string>("LogoutRedirectUri")
|
||||
.HasAnnotation("MaxLength", 100);
|
||||
|
||||
b.Property<string>("RedirectUri");
|
||||
|
||||
b.Property<int>("RefreshTokenLifeTime");
|
||||
|
||||
b.Property<string>("Secret");
|
||||
|
||||
b.Property<int>("Type");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Auth.RefreshToken", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 50);
|
||||
|
||||
b.Property<DateTime>("ExpiresUtc");
|
||||
|
||||
b.Property<DateTime>("IssuedUtc");
|
||||
|
||||
b.Property<string>("ProtectedTicket")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Subject")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 50);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("BalanceId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<decimal>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<long>("EstimateId");
|
||||
|
||||
b.Property<long?>("EstimateTemplateId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AttachedFilesString");
|
||||
|
||||
b.Property<string>("AttachedGraphicsString");
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ClientValidationDate");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("CommandType");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ProviderValidationDate");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.EstimateTemplate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.ExceptionSIREN", b =>
|
||||
{
|
||||
b.Property<string>("SIREN");
|
||||
|
||||
b.HasKey("SIREN");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId");
|
||||
|
||||
b.Property<string>("Content");
|
||||
|
||||
b.Property<DateTime>("Modified");
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.Property<DateTime>("Posted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.Property<bool>("Visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<long?>("LocationId");
|
||||
|
||||
b.Property<long?>("LocationTypeId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<string>("Reason");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.Instrument", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalPreference", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.Property<string>("OwnerProfileId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalTendency", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
|
||||
{
|
||||
b.Property<string>("ConnectionId");
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.Property<bool>("Connected");
|
||||
|
||||
b.Property<string>("UserAgent");
|
||||
|
||||
b.HasKey("ConnectionId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long>("CircleId");
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
|
||||
{
|
||||
b.Property<string>("DeviceId");
|
||||
|
||||
b.Property<DateTime>("DeclarationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<string>("DeviceOwnerId");
|
||||
|
||||
b.Property<string>("GCMRegistrationId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Model");
|
||||
|
||||
b.Property<string>("Platform");
|
||||
|
||||
b.Property<string>("Version");
|
||||
|
||||
b.HasKey("DeviceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Discriminator")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorProperty", "Discriminator");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorValue", "BaseProduct");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("Avatar");
|
||||
|
||||
b.Property<long?>("BillingAddressId");
|
||||
|
||||
b.Property<string>("EMail");
|
||||
|
||||
b.Property<string>("Phone");
|
||||
|
||||
b.Property<string>("UserName");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.OAuth.OAuth2Tokens", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("AccessToken");
|
||||
|
||||
b.Property<DateTime>("Expiration");
|
||||
|
||||
b.Property<string>("ExpiresIn");
|
||||
|
||||
b.Property<string>("RefreshToken");
|
||||
|
||||
b.Property<string>("TokenType");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
|
||||
{
|
||||
b.Property<long>("PostId");
|
||||
|
||||
b.Property<long>("TagId");
|
||||
|
||||
b.HasKey("PostId", "TagId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Relationship.LocationType", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Tag", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerformerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalization");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int?>("MaxDailyCost");
|
||||
|
||||
b.Property<int?>("MinDailyCost");
|
||||
|
||||
b.Property<long?>("OfferId");
|
||||
|
||||
b.Property<long>("OrganizationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIREN")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Product", b =>
|
||||
{
|
||||
b.HasBaseType("Yavsc.Models.Market.BaseProduct");
|
||||
|
||||
b.Property<decimal>("Depth");
|
||||
|
||||
b.Property<decimal>("Height");
|
||||
|
||||
b.Property<decimal?>("Price");
|
||||
|
||||
b.Property<decimal>("Weight");
|
||||
|
||||
b.Property<decimal>("Width");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorValue", "Product");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("Yavsc.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Activity", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ParentCode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Model.Bank.BankIdentity")
|
||||
.WithMany()
|
||||
.HasForeignKey("BankInfoId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.AccountBalance")
|
||||
.WithMany()
|
||||
.HasForeignKey("BalanceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Market.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Billing.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Billing.EstimateTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateTemplateId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Booking.BookQuery")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Relationship.LocationType")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationTypeId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalPreference", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerProfileId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Circle", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("DeviceOwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("BillingAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Blog")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("Yavsc.Models.Market.Service")
|
||||
.WithMany()
|
||||
.HasForeignKey("OfferId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganizationAddressId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
285
Yavsc/Migrations/20170106122307_Instruments.cs
Normal file
285
Yavsc/Migrations/20170106122307_Instruments.cs
Normal file
|
|
@ -0,0 +1,285 @@
|
|||
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class Instruments : 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_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
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_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Instrument",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
Name = table.Column<string>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Instrument", x => x.Id);
|
||||
});
|
||||
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_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
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);
|
||||
}
|
||||
|
||||
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_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
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_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropTable("Instrument");
|
||||
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_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
926
Yavsc/Migrations/20170106124548_instrumentation.Designer.cs
generated
Normal file
926
Yavsc/Migrations/20170106124548_instrumentation.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,926 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20170106124548_instrumentation")]
|
||||
partial class instrumentation
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Model.Bank.BankIdentity", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AccountNumber")
|
||||
.HasAnnotation("MaxLength", 15);
|
||||
|
||||
b.Property<string>("BIC")
|
||||
.HasAnnotation("MaxLength", 15);
|
||||
|
||||
b.Property<string>("BankCode")
|
||||
.HasAnnotation("MaxLength", 5);
|
||||
|
||||
b.Property<int>("BankedKey");
|
||||
|
||||
b.Property<string>("IBAN")
|
||||
.HasAnnotation("MaxLength", 33);
|
||||
|
||||
b.Property<string>("WicketCode")
|
||||
.HasAnnotation("MaxLength", 5);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("ContactCredits");
|
||||
|
||||
b.Property<decimal>("Credits");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ActorDenomination");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("ModeratorGroupName");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ParentCode")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("Avatar")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<long?>("BankInfoId");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
|
||||
b.Property<long>("DiskQuota");
|
||||
|
||||
b.Property<long>("DiskUsage");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<string>("FullName")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Auth.Client", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("DisplayName");
|
||||
|
||||
b.Property<string>("LogoutRedirectUri")
|
||||
.HasAnnotation("MaxLength", 100);
|
||||
|
||||
b.Property<string>("RedirectUri");
|
||||
|
||||
b.Property<int>("RefreshTokenLifeTime");
|
||||
|
||||
b.Property<string>("Secret");
|
||||
|
||||
b.Property<int>("Type");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Auth.RefreshToken", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 50);
|
||||
|
||||
b.Property<DateTime>("ExpiresUtc");
|
||||
|
||||
b.Property<DateTime>("IssuedUtc");
|
||||
|
||||
b.Property<string>("ProtectedTicket")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Subject")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 50);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("BalanceId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<decimal>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<long>("EstimateId");
|
||||
|
||||
b.Property<long?>("EstimateTemplateId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AttachedFilesString");
|
||||
|
||||
b.Property<string>("AttachedGraphicsString");
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ClientValidationDate");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("CommandType");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ProviderValidationDate");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.EstimateTemplate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.ExceptionSIREN", b =>
|
||||
{
|
||||
b.Property<string>("SIREN");
|
||||
|
||||
b.HasKey("SIREN");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId");
|
||||
|
||||
b.Property<string>("Content");
|
||||
|
||||
b.Property<DateTime>("Modified");
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.Property<DateTime>("Posted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.Property<bool>("Visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<long?>("LocationId");
|
||||
|
||||
b.Property<long?>("LocationTypeId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<string>("Reason");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.Instrument", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalPreference", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.Property<string>("OwnerProfileId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalTendency", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
|
||||
{
|
||||
b.Property<string>("ConnectionId");
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.Property<bool>("Connected");
|
||||
|
||||
b.Property<string>("UserAgent");
|
||||
|
||||
b.HasKey("ConnectionId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long>("CircleId");
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
|
||||
{
|
||||
b.Property<string>("DeviceId");
|
||||
|
||||
b.Property<DateTime>("DeclarationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<string>("DeviceOwnerId");
|
||||
|
||||
b.Property<string>("GCMRegistrationId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Model");
|
||||
|
||||
b.Property<string>("Platform");
|
||||
|
||||
b.Property<string>("Version");
|
||||
|
||||
b.HasKey("DeviceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Discriminator")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorProperty", "Discriminator");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorValue", "BaseProduct");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("Avatar");
|
||||
|
||||
b.Property<long?>("BillingAddressId");
|
||||
|
||||
b.Property<string>("EMail");
|
||||
|
||||
b.Property<string>("Phone");
|
||||
|
||||
b.Property<string>("UserName");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.OAuth.OAuth2Tokens", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("AccessToken");
|
||||
|
||||
b.Property<DateTime>("Expiration");
|
||||
|
||||
b.Property<string>("ExpiresIn");
|
||||
|
||||
b.Property<string>("RefreshToken");
|
||||
|
||||
b.Property<string>("TokenType");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
|
||||
{
|
||||
b.Property<long>("PostId");
|
||||
|
||||
b.Property<long>("TagId");
|
||||
|
||||
b.HasKey("PostId", "TagId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Relationship.LocationType", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Tag", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerformerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalization");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int?>("MaxDailyCost");
|
||||
|
||||
b.Property<int?>("MinDailyCost");
|
||||
|
||||
b.Property<long?>("OfferId");
|
||||
|
||||
b.Property<long>("OrganizationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIREN")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Product", b =>
|
||||
{
|
||||
b.HasBaseType("Yavsc.Models.Market.BaseProduct");
|
||||
|
||||
b.Property<decimal>("Depth");
|
||||
|
||||
b.Property<decimal>("Height");
|
||||
|
||||
b.Property<decimal?>("Price");
|
||||
|
||||
b.Property<decimal>("Weight");
|
||||
|
||||
b.Property<decimal>("Width");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorValue", "Product");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("Yavsc.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Activity", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ParentCode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Model.Bank.BankIdentity")
|
||||
.WithMany()
|
||||
.HasForeignKey("BankInfoId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.AccountBalance")
|
||||
.WithMany()
|
||||
.HasForeignKey("BalanceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Market.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Billing.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Billing.EstimateTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateTemplateId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Booking.BookQuery")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Relationship.LocationType")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationTypeId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalPreference", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerProfileId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Circle", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("DeviceOwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("BillingAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Blog")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("Yavsc.Models.Market.Service")
|
||||
.WithMany()
|
||||
.HasForeignKey("OfferId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganizationAddressId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
272
Yavsc/Migrations/20170106124548_instrumentation.cs
Normal file
272
Yavsc/Migrations/20170106124548_instrumentation.cs
Normal file
|
|
@ -0,0 +1,272 @@
|
|||
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class instrumentation : 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_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
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_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
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_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
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);
|
||||
}
|
||||
|
||||
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_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
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_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
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_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
944
Yavsc/Migrations/20170106144035_activityRate.Designer.cs
generated
Normal file
944
Yavsc/Migrations/20170106144035_activityRate.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,944 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20170106144035_activityRate")]
|
||||
partial class activityRate
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Model.Bank.BankIdentity", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AccountNumber")
|
||||
.HasAnnotation("MaxLength", 15);
|
||||
|
||||
b.Property<string>("BIC")
|
||||
.HasAnnotation("MaxLength", 15);
|
||||
|
||||
b.Property<string>("BankCode")
|
||||
.HasAnnotation("MaxLength", 5);
|
||||
|
||||
b.Property<int>("BankedKey");
|
||||
|
||||
b.Property<string>("IBAN")
|
||||
.HasAnnotation("MaxLength", 33);
|
||||
|
||||
b.Property<string>("WicketCode")
|
||||
.HasAnnotation("MaxLength", 5);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("ContactCredits");
|
||||
|
||||
b.Property<decimal>("Credits");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ActorDenomination");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("ModeratorGroupName");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ParentCode")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("Avatar")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<long?>("BankInfoId");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
|
||||
b.Property<long>("DiskQuota");
|
||||
|
||||
b.Property<long>("DiskUsage");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<string>("FullName")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Auth.Client", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("DisplayName");
|
||||
|
||||
b.Property<string>("LogoutRedirectUri")
|
||||
.HasAnnotation("MaxLength", 100);
|
||||
|
||||
b.Property<string>("RedirectUri");
|
||||
|
||||
b.Property<int>("RefreshTokenLifeTime");
|
||||
|
||||
b.Property<string>("Secret");
|
||||
|
||||
b.Property<int>("Type");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Auth.RefreshToken", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 50);
|
||||
|
||||
b.Property<DateTime>("ExpiresUtc");
|
||||
|
||||
b.Property<DateTime>("IssuedUtc");
|
||||
|
||||
b.Property<string>("ProtectedTicket")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Subject")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 50);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("BalanceId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<decimal>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<long>("EstimateId");
|
||||
|
||||
b.Property<long?>("EstimateTemplateId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AttachedFilesString");
|
||||
|
||||
b.Property<string>("AttachedGraphicsString");
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ClientValidationDate");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("CommandType");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ProviderValidationDate");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.EstimateTemplate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.ExceptionSIREN", b =>
|
||||
{
|
||||
b.Property<string>("SIREN");
|
||||
|
||||
b.HasKey("SIREN");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId");
|
||||
|
||||
b.Property<string>("Content");
|
||||
|
||||
b.Property<DateTime>("Modified");
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.Property<DateTime>("Posted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.Property<bool>("Visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<long?>("LocationId");
|
||||
|
||||
b.Property<long?>("LocationTypeId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<string>("Reason");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.Instrument", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalPreference", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.Property<string>("OwnerProfileId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalTendency", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
|
||||
{
|
||||
b.Property<string>("ConnectionId");
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.Property<bool>("Connected");
|
||||
|
||||
b.Property<string>("UserAgent");
|
||||
|
||||
b.HasKey("ConnectionId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long>("CircleId");
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
|
||||
{
|
||||
b.Property<string>("DeviceId");
|
||||
|
||||
b.Property<DateTime>("DeclarationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<string>("DeviceOwnerId");
|
||||
|
||||
b.Property<string>("GCMRegistrationId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Model");
|
||||
|
||||
b.Property<string>("Platform");
|
||||
|
||||
b.Property<string>("Version");
|
||||
|
||||
b.HasKey("DeviceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Discriminator")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorProperty", "Discriminator");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorValue", "BaseProduct");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("Avatar");
|
||||
|
||||
b.Property<long?>("BillingAddressId");
|
||||
|
||||
b.Property<string>("EMail");
|
||||
|
||||
b.Property<string>("Phone");
|
||||
|
||||
b.Property<string>("UserName");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.OAuth.OAuth2Tokens", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("AccessToken");
|
||||
|
||||
b.Property<DateTime>("Expiration");
|
||||
|
||||
b.Property<string>("ExpiresIn");
|
||||
|
||||
b.Property<string>("RefreshToken");
|
||||
|
||||
b.Property<string>("TokenType");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
|
||||
{
|
||||
b.Property<long>("PostId");
|
||||
|
||||
b.Property<long>("TagId");
|
||||
|
||||
b.HasKey("PostId", "TagId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Relationship.LocationType", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Tag", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerformerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalization");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<int?>("MaxDailyCost");
|
||||
|
||||
b.Property<int?>("MinDailyCost");
|
||||
|
||||
b.Property<long?>("OfferId");
|
||||
|
||||
b.Property<long>("OrganizationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIREN")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.UserActivity", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("DoesCode");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Product", b =>
|
||||
{
|
||||
b.HasBaseType("Yavsc.Models.Market.BaseProduct");
|
||||
|
||||
b.Property<decimal>("Depth");
|
||||
|
||||
b.Property<decimal>("Height");
|
||||
|
||||
b.Property<decimal?>("Price");
|
||||
|
||||
b.Property<decimal>("Weight");
|
||||
|
||||
b.Property<decimal>("Width");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorValue", "Product");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("Yavsc.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Activity", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ParentCode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Model.Bank.BankIdentity")
|
||||
.WithMany()
|
||||
.HasForeignKey("BankInfoId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.AccountBalance")
|
||||
.WithMany()
|
||||
.HasForeignKey("BalanceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Market.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Billing.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Billing.EstimateTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateTemplateId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Booking.BookQuery")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Relationship.LocationType")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationTypeId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalPreference", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerProfileId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Circle", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("DeviceOwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("BillingAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Blog")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Market.Service")
|
||||
.WithMany()
|
||||
.HasForeignKey("OfferId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganizationAddressId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.UserActivity", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("DoesCode");
|
||||
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
302
Yavsc/Migrations/20170106144035_activityRate.cs
Normal file
302
Yavsc/Migrations/20170106144035_activityRate.cs
Normal file
|
|
@ -0,0 +1,302 @@
|
|||
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class activityRate : 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_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
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_PerformerProfile_Activity_ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "ActivityCode", table: "PerformerProfile");
|
||||
migrationBuilder.CreateTable(
|
||||
name: "UserActivity",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
DoesCode = table.Column<string>(nullable: true),
|
||||
UserId = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_UserActivity", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_UserActivity_Activity_DoesCode",
|
||||
column: x => x.DoesCode,
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_UserActivity_PerformerProfile_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Rate",
|
||||
table: "Activity",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
|
||||
table: "AspNetRoleClaims",
|
||||
column: "RoleId",
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserClaims",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserLogins",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
|
||||
table: "AspNetUserRoles",
|
||||
column: "RoleId",
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserRoles",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_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);
|
||||
}
|
||||
|
||||
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_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
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_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "Rate", table: "Activity");
|
||||
migrationBuilder.DropTable("UserActivity");
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
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_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_PerformerProfile_Activity_ActivityCode",
|
||||
table: "PerformerProfile",
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
946
Yavsc/Migrations/20170106235954_weight.Designer.cs
generated
Normal file
946
Yavsc/Migrations/20170106235954_weight.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,946 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20170106235954_weight")]
|
||||
partial class weight
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Model.Bank.BankIdentity", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AccountNumber")
|
||||
.HasAnnotation("MaxLength", 15);
|
||||
|
||||
b.Property<string>("BIC")
|
||||
.HasAnnotation("MaxLength", 15);
|
||||
|
||||
b.Property<string>("BankCode")
|
||||
.HasAnnotation("MaxLength", 5);
|
||||
|
||||
b.Property<int>("BankedKey");
|
||||
|
||||
b.Property<string>("IBAN")
|
||||
.HasAnnotation("MaxLength", 33);
|
||||
|
||||
b.Property<string>("WicketCode")
|
||||
.HasAnnotation("MaxLength", 5);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("ContactCredits");
|
||||
|
||||
b.Property<decimal>("Credits");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ActorDenomination");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("ModeratorGroupName");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ParentCode")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("Avatar")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<long?>("BankInfoId");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
|
||||
b.Property<long>("DiskQuota");
|
||||
|
||||
b.Property<long>("DiskUsage");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<string>("FullName")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Auth.Client", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("DisplayName");
|
||||
|
||||
b.Property<string>("LogoutRedirectUri")
|
||||
.HasAnnotation("MaxLength", 100);
|
||||
|
||||
b.Property<string>("RedirectUri");
|
||||
|
||||
b.Property<int>("RefreshTokenLifeTime");
|
||||
|
||||
b.Property<string>("Secret");
|
||||
|
||||
b.Property<int>("Type");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Auth.RefreshToken", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 50);
|
||||
|
||||
b.Property<DateTime>("ExpiresUtc");
|
||||
|
||||
b.Property<DateTime>("IssuedUtc");
|
||||
|
||||
b.Property<string>("ProtectedTicket")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Subject")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 50);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("BalanceId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<decimal>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<long>("EstimateId");
|
||||
|
||||
b.Property<long?>("EstimateTemplateId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AttachedFilesString");
|
||||
|
||||
b.Property<string>("AttachedGraphicsString");
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ClientValidationDate");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("CommandType");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ProviderValidationDate");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.EstimateTemplate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.ExceptionSIREN", b =>
|
||||
{
|
||||
b.Property<string>("SIREN");
|
||||
|
||||
b.HasKey("SIREN");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId");
|
||||
|
||||
b.Property<string>("Content");
|
||||
|
||||
b.Property<DateTime>("Modified");
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.Property<DateTime>("Posted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.Property<bool>("Visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<long?>("LocationId");
|
||||
|
||||
b.Property<long?>("LocationTypeId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<string>("Reason");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.Instrument", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalPreference", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.Property<string>("OwnerProfileId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalTendency", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
|
||||
{
|
||||
b.Property<string>("ConnectionId");
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.Property<bool>("Connected");
|
||||
|
||||
b.Property<string>("UserAgent");
|
||||
|
||||
b.HasKey("ConnectionId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long>("CircleId");
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
|
||||
{
|
||||
b.Property<string>("DeviceId");
|
||||
|
||||
b.Property<DateTime>("DeclarationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<string>("DeviceOwnerId");
|
||||
|
||||
b.Property<string>("GCMRegistrationId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Model");
|
||||
|
||||
b.Property<string>("Platform");
|
||||
|
||||
b.Property<string>("Version");
|
||||
|
||||
b.HasKey("DeviceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Discriminator")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorProperty", "Discriminator");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorValue", "BaseProduct");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("Avatar");
|
||||
|
||||
b.Property<long?>("BillingAddressId");
|
||||
|
||||
b.Property<string>("EMail");
|
||||
|
||||
b.Property<string>("Phone");
|
||||
|
||||
b.Property<string>("UserName");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.OAuth.OAuth2Tokens", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("AccessToken");
|
||||
|
||||
b.Property<DateTime>("Expiration");
|
||||
|
||||
b.Property<string>("ExpiresIn");
|
||||
|
||||
b.Property<string>("RefreshToken");
|
||||
|
||||
b.Property<string>("TokenType");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
|
||||
{
|
||||
b.Property<long>("PostId");
|
||||
|
||||
b.Property<long>("TagId");
|
||||
|
||||
b.HasKey("PostId", "TagId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Relationship.LocationType", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Tag", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerformerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalization");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<int?>("MaxDailyCost");
|
||||
|
||||
b.Property<int?>("MinDailyCost");
|
||||
|
||||
b.Property<long?>("OfferId");
|
||||
|
||||
b.Property<long>("OrganizationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIREN")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.UserActivity", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("DoesCode");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<int>("Weight");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Product", b =>
|
||||
{
|
||||
b.HasBaseType("Yavsc.Models.Market.BaseProduct");
|
||||
|
||||
b.Property<decimal>("Depth");
|
||||
|
||||
b.Property<decimal>("Height");
|
||||
|
||||
b.Property<decimal?>("Price");
|
||||
|
||||
b.Property<decimal>("Weight");
|
||||
|
||||
b.Property<decimal>("Width");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorValue", "Product");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("Yavsc.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Activity", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ParentCode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Model.Bank.BankIdentity")
|
||||
.WithMany()
|
||||
.HasForeignKey("BankInfoId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.AccountBalance")
|
||||
.WithMany()
|
||||
.HasForeignKey("BalanceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Market.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Billing.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Billing.EstimateTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateTemplateId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Booking.BookQuery")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Relationship.LocationType")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationTypeId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalPreference", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerProfileId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Circle", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("DeviceOwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("BillingAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Blog")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Market.Service")
|
||||
.WithMany()
|
||||
.HasForeignKey("OfferId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganizationAddressId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.UserActivity", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("DoesCode");
|
||||
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
262
Yavsc/Migrations/20170106235954_weight.cs
Normal file
262
Yavsc/Migrations/20170106235954_weight.cs
Normal file
|
|
@ -0,0 +1,262 @@
|
|||
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class weight : 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_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
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_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Weight",
|
||||
table: "UserActivity",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
|
||||
table: "AspNetRoleClaims",
|
||||
column: "RoleId",
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserClaims",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserLogins",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
|
||||
table: "AspNetUserRoles",
|
||||
column: "RoleId",
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserRoles",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_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);
|
||||
}
|
||||
|
||||
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_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
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_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "Weight", table: "UserActivity");
|
||||
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_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_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);
|
||||
}
|
||||
}
|
||||
}
|
||||
948
Yavsc/Migrations/20170107004233_userActivitiesValidity.Designer.cs
generated
Normal file
948
Yavsc/Migrations/20170107004233_userActivitiesValidity.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,948 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20170107004233_userActivitiesValidity")]
|
||||
partial class userActivitiesValidity
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.0-rc1-16348");
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRole", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedName")
|
||||
.HasAnnotation("Relational:Name", "RoleNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClaimType");
|
||||
|
||||
b.Property<string>("ClaimValue");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.Property<string>("LoginProvider");
|
||||
|
||||
b.Property<string>("ProviderKey");
|
||||
|
||||
b.Property<string>("ProviderDisplayName");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("LoginProvider", "ProviderKey");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("RoleId");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Location", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
b.Property<double>("Longitude");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Model.Bank.BankIdentity", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AccountNumber")
|
||||
.HasAnnotation("MaxLength", 15);
|
||||
|
||||
b.Property<string>("BIC")
|
||||
.HasAnnotation("MaxLength", 15);
|
||||
|
||||
b.Property<string>("BankCode")
|
||||
.HasAnnotation("MaxLength", 5);
|
||||
|
||||
b.Property<int>("BankedKey");
|
||||
|
||||
b.Property<string>("IBAN")
|
||||
.HasAnnotation("MaxLength", 33);
|
||||
|
||||
b.Property<string>("WicketCode")
|
||||
.HasAnnotation("MaxLength", 5);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<long>("ContactCredits");
|
||||
|
||||
b.Property<decimal>("Credits");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Activity", b =>
|
||||
{
|
||||
b.Property<string>("Code")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ActorDenomination");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("ModeratorGroupName");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ParentCode")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("Avatar")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<long?>("BankInfoId");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
|
||||
b.Property<long>("DiskQuota");
|
||||
|
||||
b.Property<long>("DiskUsage");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<string>("FullName")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.Property<string>("PasswordHash");
|
||||
|
||||
b.Property<string>("PhoneNumber");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed");
|
||||
|
||||
b.Property<long?>("PostalAddressId");
|
||||
|
||||
b.Property<string>("SecurityStamp");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasAnnotation("MaxLength", 256);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("NormalizedEmail")
|
||||
.HasAnnotation("Relational:Name", "EmailIndex");
|
||||
|
||||
b.HasIndex("NormalizedUserName")
|
||||
.HasAnnotation("Relational:Name", "UserNameIndex");
|
||||
|
||||
b.HasAnnotation("Relational:TableName", "AspNetUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Auth.Client", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("DisplayName");
|
||||
|
||||
b.Property<string>("LogoutRedirectUri")
|
||||
.HasAnnotation("MaxLength", 100);
|
||||
|
||||
b.Property<string>("RedirectUri");
|
||||
|
||||
b.Property<int>("RefreshTokenLifeTime");
|
||||
|
||||
b.Property<string>("Secret");
|
||||
|
||||
b.Property<int>("Type");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Auth.RefreshToken", b =>
|
||||
{
|
||||
b.Property<string>("Id");
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 50);
|
||||
|
||||
b.Property<DateTime>("ExpiresUtc");
|
||||
|
||||
b.Property<DateTime>("IssuedUtc");
|
||||
|
||||
b.Property<string>("ProtectedTicket")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Subject")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 50);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("BalanceId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ExecDate");
|
||||
|
||||
b.Property<decimal>("Impact");
|
||||
|
||||
b.Property<string>("Reason")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long?>("ArticleId");
|
||||
|
||||
b.Property<int>("Count");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<long>("EstimateId");
|
||||
|
||||
b.Property<long?>("EstimateTemplateId");
|
||||
|
||||
b.Property<decimal>("UnitaryCost");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AttachedFilesString");
|
||||
|
||||
b.Property<string>("AttachedGraphicsString");
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ClientValidationDate");
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("CommandType");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("ProviderValidationDate");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.EstimateTemplate", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.ExceptionSIREN", b =>
|
||||
{
|
||||
b.Property<string>("SIREN");
|
||||
|
||||
b.HasKey("SIREN");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Blog", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("AuthorId");
|
||||
|
||||
b.Property<string>("Content");
|
||||
|
||||
b.Property<DateTime>("Modified");
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.Property<DateTime>("Posted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("Title");
|
||||
|
||||
b.Property<bool>("Visible");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<DateTime>("EventDate");
|
||||
|
||||
b.Property<long?>("LocationId");
|
||||
|
||||
b.Property<long?>("LocationTypeId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<string>("Reason");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.Instrument", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalPreference", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.Property<string>("OwnerProfileId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalTendency", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
|
||||
{
|
||||
b.Property<string>("ConnectionId");
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.Property<bool>("Connected");
|
||||
|
||||
b.Property<string>("UserAgent");
|
||||
|
||||
b.HasKey("ConnectionId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<long>("CircleId");
|
||||
|
||||
b.Property<string>("MemberId")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Contact", b =>
|
||||
{
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.HasKey("OwnerId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
|
||||
{
|
||||
b.Property<string>("DeviceId");
|
||||
|
||||
b.Property<DateTime>("DeclarationDate")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasAnnotation("Relational:GeneratedValueSql", "LOCALTIMESTAMP");
|
||||
|
||||
b.Property<string>("DeviceOwnerId");
|
||||
|
||||
b.Property<string>("GCMRegistrationId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Model");
|
||||
|
||||
b.Property<string>("Platform");
|
||||
|
||||
b.Property<string>("Version");
|
||||
|
||||
b.HasKey("DeviceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.BaseProduct", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Discriminator")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorProperty", "Discriminator");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorValue", "BaseProduct");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ContextId");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<bool>("Public");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("Avatar");
|
||||
|
||||
b.Property<long?>("BillingAddressId");
|
||||
|
||||
b.Property<string>("EMail");
|
||||
|
||||
b.Property<string>("Phone");
|
||||
|
||||
b.Property<string>("UserName");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.OAuth.OAuth2Tokens", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("AccessToken");
|
||||
|
||||
b.Property<DateTime>("Expiration");
|
||||
|
||||
b.Property<string>("ExpiresIn");
|
||||
|
||||
b.Property<string>("RefreshToken");
|
||||
|
||||
b.Property<string>("TokenType");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
|
||||
{
|
||||
b.Property<long>("PostId");
|
||||
|
||||
b.Property<long>("TagId");
|
||||
|
||||
b.HasKey("PostId", "TagId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Relationship.LocationType", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Tag", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired();
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerformerId");
|
||||
|
||||
b.Property<bool>("AcceptGeoLocalization");
|
||||
|
||||
b.Property<bool>("AcceptNotifications");
|
||||
|
||||
b.Property<bool>("AcceptPublicContact");
|
||||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<int?>("MaxDailyCost");
|
||||
|
||||
b.Property<int?>("MinDailyCost");
|
||||
|
||||
b.Property<long?>("OfferId");
|
||||
|
||||
b.Property<long>("OrganizationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SIREN")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 14);
|
||||
|
||||
b.Property<string>("WebSite");
|
||||
|
||||
b.HasKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.UserActivity", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("DoesCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int>("Weight");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Product", b =>
|
||||
{
|
||||
b.HasBaseType("Yavsc.Models.Market.BaseProduct");
|
||||
|
||||
b.Property<decimal>("Depth");
|
||||
|
||||
b.Property<decimal>("Height");
|
||||
|
||||
b.Property<decimal?>("Price");
|
||||
|
||||
b.Property<decimal>("Weight");
|
||||
|
||||
b.Property<decimal>("Width");
|
||||
|
||||
b.HasAnnotation("Relational:DiscriminatorValue", "Product");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
|
||||
{
|
||||
b.HasOne("Microsoft.AspNet.Identity.EntityFramework.IdentityRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("Yavsc.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Activity", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ParentCode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Model.Bank.BankIdentity")
|
||||
.WithMany()
|
||||
.HasForeignKey("BankInfoId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostalAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.BalanceImpact", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.AccountBalance")
|
||||
.WithMany()
|
||||
.HasForeignKey("BalanceId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.CommandLine", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Market.BaseProduct")
|
||||
.WithMany()
|
||||
.HasForeignKey("ArticleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Billing.Estimate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Billing.EstimateTemplate")
|
||||
.WithMany()
|
||||
.HasForeignKey("EstimateTemplateId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Booking.BookQuery")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Blog", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AuthorId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.BookQuery", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Relationship.LocationType")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationTypeId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalPreference", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerProfileId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Circle", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.CircleMember", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Circle")
|
||||
.WithMany()
|
||||
.HasForeignKey("CircleId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MemberId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Contact", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Identity.GoogleCloudMobileDeclaration", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("DeviceOwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ContextId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("BillingAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Blog")
|
||||
.WithMany()
|
||||
.HasForeignKey("PostId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Market.Service")
|
||||
.WithMany()
|
||||
.HasForeignKey("OfferId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganizationAddressId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.UserActivity", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("DoesCode");
|
||||
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
304
Yavsc/Migrations/20170107004233_userActivitiesValidity.cs
Normal file
304
Yavsc/Migrations/20170107004233_userActivitiesValidity.cs
Normal file
|
|
@ -0,0 +1,304 @@
|
|||
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class userActivitiesValidity : 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_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
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_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "UserId",
|
||||
table: "UserActivity",
|
||||
nullable: false);
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "DoesCode",
|
||||
table: "UserActivity",
|
||||
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_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_PerformerProfile_Location_OrganizationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganizationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerformerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_Activity_DoesCode",
|
||||
table: "UserActivity",
|
||||
column: "DoesCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_PerformerProfile_UserId",
|
||||
table: "UserActivity",
|
||||
column: "UserId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
|
||||
migrationBuilder.DropForeignKey(name: "FK_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
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_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "UserId",
|
||||
table: "UserActivity",
|
||||
nullable: true);
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "DoesCode",
|
||||
table: "UserActivity",
|
||||
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_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_PerformerProfile_Location_OrganizationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganizationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerformerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_Activity_DoesCode",
|
||||
table: "UserActivity",
|
||||
column: "DoesCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_PerformerProfile_UserId",
|
||||
table: "UserActivity",
|
||||
column: "UserId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
1010
Yavsc/Migrations/20170113022807_SettingsClassName.Designer.cs
generated
Normal file
1010
Yavsc/Migrations/20170113022807_SettingsClassName.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
489
Yavsc/Migrations/20170113022807_SettingsClassName.cs
Normal file
489
Yavsc/Migrations/20170113022807_SettingsClassName.cs
Normal file
|
|
@ -0,0 +1,489 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class SettingsClassName : 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_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_MusicalPreference_PerformerProfile_OwnerProfileId", table: "MusicalPreference");
|
||||
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_PerformerProfile_Service_OfferId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
|
||||
migrationBuilder.DropPrimaryKey(name: "PK_UserActivity", table: "UserActivity");
|
||||
migrationBuilder.DropPrimaryKey(name: "PK_MusicalPreference", table: "MusicalPreference");
|
||||
migrationBuilder.DropColumn(name: "Id", table: "UserActivity");
|
||||
migrationBuilder.DropColumn(name: "OfferId", table: "PerformerProfile");
|
||||
migrationBuilder.DropColumn(name: "Id", table: "MusicalPreference");
|
||||
migrationBuilder.DropColumn(name: "Name", table: "MusicalPreference");
|
||||
migrationBuilder.CreateTable(
|
||||
name: "MusicianSettings",
|
||||
columns: table => new
|
||||
{
|
||||
UserId = table.Column<string>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_MusicianSettings", x => x.UserId);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "DjSettings",
|
||||
columns: table => new
|
||||
{
|
||||
UserId = table.Column<string>(nullable: false),
|
||||
SoundCloudId = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DjSettings", x => x.UserId);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "FormationSettings",
|
||||
columns: table => new
|
||||
{
|
||||
UserId = table.Column<string>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_FormationSettings", x => x.UserId);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "GeneralSettings",
|
||||
columns: table => new
|
||||
{
|
||||
UserId = table.Column<string>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_GeneralSettings", x => x.UserId);
|
||||
});
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CoWorking",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("Npgsql:Serial", true),
|
||||
FormationSettingsUserId = table.Column<string>(nullable: true),
|
||||
PerformerId = table.Column<string>(nullable: true),
|
||||
WorkingForId = table.Column<string>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CoWorking", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_CoWorking_FormationSettings_FormationSettingsUserId",
|
||||
column: x => x.FormationSettingsUserId,
|
||||
principalTable: "FormationSettings",
|
||||
principalColumn: "UserId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_CoWorking_PerformerProfile_PerformerId",
|
||||
column: x => x.PerformerId,
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_CoWorking_ApplicationUser_WorkingForId",
|
||||
column: x => x.WorkingForId,
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_UserActivity",
|
||||
table: "UserActivity",
|
||||
columns: new[] { "DoesCode", "UserId" });
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "OwnerProfileId",
|
||||
table: "MusicalPreference",
|
||||
nullable: false);
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "DjSettingsUserId",
|
||||
table: "MusicalPreference",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "GeneralSettingsUserId",
|
||||
table: "MusicalPreference",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "TendencyId",
|
||||
table: "MusicalPreference",
|
||||
nullable: false,
|
||||
defaultValue: 0L);
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_MusicalPreference",
|
||||
table: "MusicalPreference",
|
||||
column: "OwnerProfileId");
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "SettingsClassName",
|
||||
table: "Activity",
|
||||
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_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_MusicalPreference_DjSettings_DjSettingsUserId",
|
||||
table: "MusicalPreference",
|
||||
column: "DjSettingsUserId",
|
||||
principalTable: "DjSettings",
|
||||
principalColumn: "UserId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_MusicalPreference_GeneralSettings_GeneralSettingsUserId",
|
||||
table: "MusicalPreference",
|
||||
column: "GeneralSettingsUserId",
|
||||
principalTable: "GeneralSettings",
|
||||
principalColumn: "UserId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
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_PerformerProfile_Location_OrganizationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganizationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerformerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_Activity_DoesCode",
|
||||
table: "UserActivity",
|
||||
column: "DoesCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_PerformerProfile_UserId",
|
||||
table: "UserActivity",
|
||||
column: "UserId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
|
||||
migrationBuilder.DropForeignKey(name: "FK_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_MusicalPreference_DjSettings_DjSettingsUserId", table: "MusicalPreference");
|
||||
migrationBuilder.DropForeignKey(name: "FK_MusicalPreference_GeneralSettings_GeneralSettingsUserId", table: "MusicalPreference");
|
||||
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_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
|
||||
migrationBuilder.DropPrimaryKey(name: "PK_UserActivity", table: "UserActivity");
|
||||
migrationBuilder.DropPrimaryKey(name: "PK_MusicalPreference", table: "MusicalPreference");
|
||||
migrationBuilder.DropColumn(name: "DjSettingsUserId", table: "MusicalPreference");
|
||||
migrationBuilder.DropColumn(name: "GeneralSettingsUserId", table: "MusicalPreference");
|
||||
migrationBuilder.DropColumn(name: "TendencyId", table: "MusicalPreference");
|
||||
migrationBuilder.DropColumn(name: "SettingsClassName", table: "Activity");
|
||||
migrationBuilder.DropTable("MusicianSettings");
|
||||
migrationBuilder.DropTable("DjSettings");
|
||||
migrationBuilder.DropTable("GeneralSettings");
|
||||
migrationBuilder.DropTable("CoWorking");
|
||||
migrationBuilder.DropTable("FormationSettings");
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "Id",
|
||||
table: "UserActivity",
|
||||
nullable: false,
|
||||
defaultValue: 0L)
|
||||
.Annotation("Npgsql:Serial", true);
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_UserActivity",
|
||||
table: "UserActivity",
|
||||
column: "Id");
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "OfferId",
|
||||
table: "PerformerProfile",
|
||||
nullable: true);
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "OwnerProfileId",
|
||||
table: "MusicalPreference",
|
||||
nullable: true);
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "Id",
|
||||
table: "MusicalPreference",
|
||||
nullable: false,
|
||||
defaultValue: 0L)
|
||||
.Annotation("Npgsql:Serial", true);
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Name",
|
||||
table: "MusicalPreference",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_MusicalPreference",
|
||||
table: "MusicalPreference",
|
||||
column: "Id");
|
||||
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_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_MusicalPreference_PerformerProfile_OwnerProfileId",
|
||||
table: "MusicalPreference",
|
||||
column: "OwnerProfileId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_PerformerProfile_Service_OfferId",
|
||||
table: "PerformerProfile",
|
||||
column: "OfferId",
|
||||
principalTable: "Service",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_Location_OrganizationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganizationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerformerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_Activity_DoesCode",
|
||||
table: "UserActivity",
|
||||
column: "DoesCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_PerformerProfile_UserId",
|
||||
table: "UserActivity",
|
||||
column: "UserId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
1023
Yavsc/Migrations/20170113150714_instrumentationReloaded.Designer.cs
generated
Normal file
1023
Yavsc/Migrations/20170113150714_instrumentationReloaded.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
356
Yavsc/Migrations/20170113150714_instrumentationReloaded.cs
Normal file
356
Yavsc/Migrations/20170113150714_instrumentationReloaded.cs
Normal file
|
|
@ -0,0 +1,356 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class instrumentationReloaded : 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_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
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_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
|
||||
migrationBuilder.DropTable("MusicianSettings");
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Instrumentation",
|
||||
columns: table => new
|
||||
{
|
||||
InstrumentId = table.Column<long>(nullable: false),
|
||||
UserId = table.Column<string>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Instrumentation", x => new { x.InstrumentId, x.UserId });
|
||||
table.ForeignKey(
|
||||
name: "FK_Instrumentation_Instrument_InstrumentId",
|
||||
column: x => x.InstrumentId,
|
||||
principalTable: "Instrument",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Instrumentation_PerformerProfile_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
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_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_PerformerProfile_Location_OrganizationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganizationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerformerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_Activity_DoesCode",
|
||||
table: "UserActivity",
|
||||
column: "DoesCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_PerformerProfile_UserId",
|
||||
table: "UserActivity",
|
||||
column: "UserId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
|
||||
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
|
||||
migrationBuilder.DropForeignKey(name: "FK_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_BookQuery_ApplicationUser_ClientId", table: "BookQuery");
|
||||
migrationBuilder.DropForeignKey(name: "FK_BookQuery_PerformerProfile_PerformerId", table: "BookQuery");
|
||||
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_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
|
||||
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
|
||||
migrationBuilder.DropTable("Instrumentation");
|
||||
migrationBuilder.CreateTable(
|
||||
name: "MusicianSettings",
|
||||
columns: table => new
|
||||
{
|
||||
UserId = table.Column<string>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_MusicianSettings", x => x.UserId);
|
||||
});
|
||||
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_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_BookQuery_ApplicationUser_ClientId",
|
||||
table: "BookQuery",
|
||||
column: "ClientId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BookQuery_PerformerProfile_PerformerId",
|
||||
table: "BookQuery",
|
||||
column: "PerformerId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
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_PerformerProfile_Location_OrganizationAddressId",
|
||||
table: "PerformerProfile",
|
||||
column: "OrganizationAddressId",
|
||||
principalTable: "Location",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
|
||||
table: "PerformerProfile",
|
||||
column: "PerformerId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_Activity_DoesCode",
|
||||
table: "UserActivity",
|
||||
column: "DoesCode",
|
||||
principalTable: "Activity",
|
||||
principalColumn: "Code",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserActivity_PerformerProfile_UserId",
|
||||
table: "UserActivity",
|
||||
column: "UserId",
|
||||
principalTable: "PerformerProfile",
|
||||
principalColumn: "PerformerId",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Metadata;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
|
|
@ -136,38 +138,16 @@ namespace Yavsc.Migrations
|
|||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Model.Chat.Connection", b =>
|
||||
modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
|
||||
{
|
||||
b.Property<string>("ConnectionId");
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
b.Property<string>("OwnerId");
|
||||
|
||||
b.Property<bool>("Connected");
|
||||
|
||||
b.Property<string>("UserAgent");
|
||||
|
||||
b.HasKey("ConnectionId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Model.ClientProviderInfo", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("Avatar");
|
||||
|
||||
b.Property<long?>("BillingAddressId");
|
||||
|
||||
b.Property<string>("ChatHubConnectionId");
|
||||
|
||||
b.Property<string>("EMail");
|
||||
|
||||
b.Property<string>("Phone");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("UserName");
|
||||
|
||||
b.HasKey("UserId");
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||
|
|
@ -196,8 +176,15 @@ namespace Yavsc.Migrations
|
|||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ParentCode")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("Photo");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<string>("SettingsClassName");
|
||||
|
||||
b.HasKey("Code");
|
||||
});
|
||||
|
||||
|
|
@ -443,16 +430,104 @@ namespace Yavsc.Migrations
|
|||
|
||||
b.Property<long?>("LocationId");
|
||||
|
||||
b.Property<long?>("LocationTypeId");
|
||||
|
||||
b.Property<string>("PerformerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<decimal?>("Previsional");
|
||||
|
||||
b.Property<string>("Reason");
|
||||
|
||||
b.Property<DateTime?>("ValidationDate");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.Instrument", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalPreference", b =>
|
||||
{
|
||||
b.Property<string>("OwnerProfileId");
|
||||
|
||||
b.Property<string>("DjSettingsUserId");
|
||||
|
||||
b.Property<string>("GeneralSettingsUserId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
||||
b.Property<long>("TendencyId");
|
||||
|
||||
b.HasKey("OwnerProfileId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalTendency", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 255);
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.Profiles.DjSettings", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("SoundCloudId");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.Profiles.FormationSettings", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.Profiles.GeneralSettings", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.Profiles.Instrumentation", b =>
|
||||
{
|
||||
b.Property<long>("InstrumentId");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.HasKey("InstrumentId", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
|
||||
{
|
||||
b.Property<string>("ConnectionId");
|
||||
|
||||
b.Property<string>("ApplicationUserId");
|
||||
|
||||
b.Property<bool>("Connected");
|
||||
|
||||
b.Property<string>("UserAgent");
|
||||
|
||||
b.HasKey("ConnectionId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Circle", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
|
|
@ -550,6 +625,23 @@ namespace Yavsc.Migrations
|
|||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<string>("Avatar");
|
||||
|
||||
b.Property<long?>("BillingAddressId");
|
||||
|
||||
b.Property<string>("EMail");
|
||||
|
||||
b.Property<string>("Phone");
|
||||
|
||||
b.Property<string>("UserName");
|
||||
|
||||
b.HasKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.OAuth.OAuth2Tokens", b =>
|
||||
{
|
||||
b.Property<string>("UserId");
|
||||
|
|
@ -576,6 +668,16 @@ namespace Yavsc.Migrations
|
|||
b.HasKey("PostId", "TagId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Relationship.LocationType", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Name");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Skill", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
|
|
@ -599,6 +701,20 @@ namespace Yavsc.Migrations
|
|||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.CoWorking", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("FormationSettingsUserId");
|
||||
|
||||
b.Property<string>("PerformerId");
|
||||
|
||||
b.Property<string>("WorkingForId");
|
||||
|
||||
b.HasKey("Id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
|
||||
{
|
||||
b.Property<string>("PerformerId");
|
||||
|
|
@ -611,15 +727,10 @@ namespace Yavsc.Migrations
|
|||
|
||||
b.Property<bool>("Active");
|
||||
|
||||
b.Property<string>("ActivityCode")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int?>("MaxDailyCost");
|
||||
|
||||
b.Property<int?>("MinDailyCost");
|
||||
|
||||
b.Property<long?>("OfferId");
|
||||
|
||||
b.Property<long>("OrganizationAddressId");
|
||||
|
||||
b.Property<int>("Rate");
|
||||
|
|
@ -633,6 +744,17 @@ namespace Yavsc.Migrations
|
|||
b.HasKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.UserActivity", b =>
|
||||
{
|
||||
b.Property<string>("DoesCode");
|
||||
|
||||
b.Property<string>("UserId");
|
||||
|
||||
b.Property<int>("Weight");
|
||||
|
||||
b.HasKey("DoesCode", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Market.Product", b =>
|
||||
{
|
||||
b.HasBaseType("Yavsc.Models.Market.BaseProduct");
|
||||
|
|
@ -682,18 +804,11 @@ namespace Yavsc.Migrations
|
|||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Model.Chat.Connection", b =>
|
||||
modelBuilder.Entity("Yavsc.Models.Access.BlackListed", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Model.ClientProviderInfo", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("BillingAddressId");
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.AccountBalance", b =>
|
||||
|
|
@ -703,6 +818,13 @@ namespace Yavsc.Migrations
|
|||
.HasForeignKey("Yavsc.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Activity", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ParentCode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Model.Bank.BankIdentity")
|
||||
|
|
@ -738,9 +860,17 @@ namespace Yavsc.Migrations
|
|||
|
||||
modelBuilder.Entity("Yavsc.Models.Billing.Estimate", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClientId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Booking.BookQuery")
|
||||
.WithMany()
|
||||
.HasForeignKey("CommandId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Blog", b =>
|
||||
|
|
@ -760,11 +890,44 @@ namespace Yavsc.Migrations
|
|||
.WithMany()
|
||||
.HasForeignKey("LocationId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Relationship.LocationType")
|
||||
.WithMany()
|
||||
.HasForeignKey("LocationTypeId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.MusicalPreference", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Booking.Profiles.DjSettings")
|
||||
.WithMany()
|
||||
.HasForeignKey("DjSettingsUserId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Booking.Profiles.GeneralSettings")
|
||||
.WithMany()
|
||||
.HasForeignKey("GeneralSettingsUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Booking.Profiles.Instrumentation", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Booking.Instrument")
|
||||
.WithMany()
|
||||
.HasForeignKey("InstrumentId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Chat.Connection", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("ApplicationUserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Circle", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
|
|
@ -804,6 +967,13 @@ namespace Yavsc.Migrations
|
|||
.HasForeignKey("ContextId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Messaging.ClientProviderInfo", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("BillingAddressId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.PostTag", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Blog")
|
||||
|
|
@ -811,16 +981,23 @@ namespace Yavsc.Migrations
|
|||
.HasForeignKey("PostId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.CoWorking", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Booking.Profiles.FormationSettings")
|
||||
.WithMany()
|
||||
.HasForeignKey("FormationSettingsUserId");
|
||||
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("WorkingForId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.PerformerProfile", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("ActivityCode");
|
||||
|
||||
b.HasOne("Yavsc.Models.Market.Service")
|
||||
.WithMany()
|
||||
.HasForeignKey("OfferId");
|
||||
|
||||
b.HasOne("Yavsc.Location")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganizationAddressId");
|
||||
|
|
@ -829,6 +1006,17 @@ namespace Yavsc.Migrations
|
|||
.WithMany()
|
||||
.HasForeignKey("PerformerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.Workflow.UserActivity", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.Activity")
|
||||
.WithMany()
|
||||
.HasForeignKey("DoesCode");
|
||||
|
||||
b.HasOne("Yavsc.Models.Workflow.PerformerProfile")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
17
Yavsc/Models/Access/BlackList.cs
Normal file
17
Yavsc/Models/Access/BlackList.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Access
|
||||
{
|
||||
public class BlackListed: IBlackListed
|
||||
{
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
public string UserId { get; set; }
|
||||
public string OwnerId { get; set; }
|
||||
|
||||
[ForeignKey("OwnerId")]
|
||||
public virtual ApplicationUser Owner { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,194 +1,215 @@
|
|||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Authentication.OAuth;
|
||||
using Microsoft.AspNet.Identity.EntityFramework;
|
||||
using Microsoft.Data.Entity;
|
||||
using Yavsc.Models.Auth;
|
||||
using Yavsc.Models.Billing;
|
||||
using Yavsc.Models.Booking;
|
||||
using Yavsc.Models.OAuth;
|
||||
using Yavsc.Models.Workflow;
|
||||
using Yavsc.Models.Identity;
|
||||
using Yavsc.Models.Market;
|
||||
using Yavsc.Model;
|
||||
using Yavsc.Model.Chat;
|
||||
|
||||
namespace Yavsc.Models
|
||||
{
|
||||
|
||||
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
|
||||
{
|
||||
protected override void OnModelCreating(ModelBuilder builder)
|
||||
{
|
||||
base.OnModelCreating(builder);
|
||||
// Customize the ASP.NET Identity model and override the defaults if needed.
|
||||
// For example, you can rename the ASP.NET Identity table names and more.
|
||||
// Add your customizations after calling base.OnModelCreating(builder);
|
||||
builder.Entity<Contact>().HasKey(x => new { x.OwnerId, x.UserId });
|
||||
builder.Entity<BookQuery>().Property(x=>x.CreationDate).HasDefaultValueSql("LOCALTIMESTAMP");
|
||||
builder.Entity<Blog>().Property(x=>x.Posted).HasDefaultValueSql("LOCALTIMESTAMP");
|
||||
builder.Entity<GoogleCloudMobileDeclaration>().Property(x=>x.DeclarationDate).HasDefaultValueSql("LOCALTIMESTAMP");
|
||||
builder.Entity<PostTag>().HasKey(x=>new { x.PostId, x.TagId});
|
||||
builder.Entity<ApplicationUser>().HasMany<Connection>( c=>c.Connections );
|
||||
}
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
optionsBuilder.UseNpgsql(Startup.ConnectionString);
|
||||
}
|
||||
|
||||
public DbSet<Client> Applications { get; set; }
|
||||
|
||||
public DbSet<RefreshToken> RefreshTokens { get; set; }
|
||||
/// <summary>
|
||||
/// Activities referenced on this site
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DbSet<Activity> Activities { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Users posts
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DbSet<Blog> Blogspot { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Skills propulsed by this site
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DbSet<Skill> SiteSkills { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Circle members
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DbSet<CircleMember> CircleMembers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Commands, from an user, to a performer
|
||||
/// (A performer is an user who's actived a main activity
|
||||
/// on his profile).
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DbSet<BookQuery> Commands { get; set; }
|
||||
/// <summary>
|
||||
/// Special commands, talking about
|
||||
/// a given place and date.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DbSet<BookQuery> BookQueries { get; set; }
|
||||
public DbSet<PerformerProfile> Performers { get; set; }
|
||||
public DbSet<Estimate> Estimates { get; set; }
|
||||
public DbSet<AccountBalance> BankStatus { get; set; }
|
||||
public DbSet<BalanceImpact> BankBook { get; set; }
|
||||
public DbSet<Location> Map { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Google Calendar offline
|
||||
/// open auth tokens
|
||||
/// </summary>
|
||||
/// <returns>tokens</returns>
|
||||
public DbSet<OAuth2Tokens> Tokens { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// References all declared external GCM devices
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DbSet<GoogleCloudMobileDeclaration> GCMDevices { get; set; }
|
||||
|
||||
public DbSet<Service> Services { get; set; }
|
||||
public DbSet<Product> Products { get; set; }
|
||||
public Task ClearTokensAsync()
|
||||
{
|
||||
Tokens.RemoveRange(this.Tokens);
|
||||
SaveChanges();
|
||||
return Task.FromResult(0);
|
||||
}
|
||||
|
||||
public Task DeleteTokensAsync(string email)
|
||||
{
|
||||
if (string.IsNullOrEmpty(email))
|
||||
{
|
||||
throw new ArgumentException("email MUST have a value");
|
||||
}
|
||||
|
||||
var item = this.Tokens.FirstOrDefault(x => x.UserId == email);
|
||||
if (item != null)
|
||||
{
|
||||
Tokens.Remove(item);
|
||||
SaveChanges();
|
||||
}
|
||||
return Task.FromResult(0);
|
||||
}
|
||||
|
||||
public Task<OAuth2Tokens> GetTokensAsync(string googleUserId)
|
||||
{
|
||||
if (string.IsNullOrEmpty(googleUserId))
|
||||
{
|
||||
throw new ArgumentException("email MUST have a value");
|
||||
}
|
||||
|
||||
using (var context = new ApplicationDbContext())
|
||||
{
|
||||
var item = this.Tokens.FirstOrDefault(x => x.UserId == googleUserId);
|
||||
return Task.FromResult(item);
|
||||
}
|
||||
}
|
||||
|
||||
public Task StoreTokenAsync(string googleUserId, OAuthTokenResponse value)
|
||||
{
|
||||
if (string.IsNullOrEmpty(googleUserId))
|
||||
{
|
||||
throw new ArgumentException("googleUserId MUST have a value");
|
||||
}
|
||||
|
||||
var item = this.Tokens.SingleOrDefaultAsync(x => x.UserId == googleUserId).Result;
|
||||
if (item == null)
|
||||
{
|
||||
Tokens.Add(new OAuth2Tokens
|
||||
{
|
||||
TokenType = "Bearer", // FIXME why value.TokenType would be null?
|
||||
AccessToken = value.AccessToken,
|
||||
RefreshToken = value.RefreshToken,
|
||||
Expiration = DateTime.Now.AddSeconds(int.Parse(value.ExpiresIn)),
|
||||
UserId = googleUserId
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
item.AccessToken = value.AccessToken;
|
||||
item.Expiration = DateTime.Now.AddMinutes(int.Parse(value.ExpiresIn));
|
||||
if (value.RefreshToken != null)
|
||||
item.RefreshToken = value.RefreshToken;
|
||||
Tokens.Update(item);
|
||||
}
|
||||
SaveChanges();
|
||||
return Task.FromResult(0);
|
||||
}
|
||||
|
||||
Client FindApplication(string clientId)
|
||||
{
|
||||
return Applications.FirstOrDefault(
|
||||
app=>app.Id == clientId);
|
||||
}
|
||||
|
||||
public DbSet<ExceptionSIREN> ExceptionsSIREN { get; set; }
|
||||
|
||||
public DbSet<Location> Locations { get; set; }
|
||||
|
||||
public DbSet<Tag> Tags { get; set; }
|
||||
|
||||
public DbSet<PostTag> TagsDomain { get; set; }
|
||||
|
||||
public DbSet<EstimateTemplate> EstimateTemplates { get; set; }
|
||||
|
||||
public DbSet<Contact> Contacts { get; set; }
|
||||
|
||||
public DbSet<ClientProviderInfo> ClientProviderInfo { get; set; }
|
||||
|
||||
public DbSet<Connection> Connections { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Authentication.OAuth;
|
||||
using Microsoft.AspNet.Identity.EntityFramework;
|
||||
using Microsoft.Data.Entity;
|
||||
using Yavsc.Models.Relationship;
|
||||
|
||||
namespace Yavsc.Models
|
||||
{
|
||||
|
||||
using Auth;
|
||||
using Billing;
|
||||
using Booking;
|
||||
using OAuth;
|
||||
using Workflow;
|
||||
using Identity;
|
||||
using Market;
|
||||
using Chat;
|
||||
using Messaging;
|
||||
using Access;
|
||||
using Yavsc.Models.Booking.Profiles;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
|
||||
{
|
||||
protected override void OnModelCreating(ModelBuilder builder)
|
||||
{
|
||||
base.OnModelCreating(builder);
|
||||
// Customize the ASP.NET Identity model and override the defaults if needed.
|
||||
// For example, you can rename the ASP.NET Identity table names and more.
|
||||
// Add your customizations after calling base.OnModelCreating(builder);
|
||||
builder.Entity<Contact>().HasKey(x => new { x.OwnerId, x.UserId });
|
||||
builder.Entity<BookQuery>().Property(x=>x.CreationDate).HasDefaultValueSql("LOCALTIMESTAMP");
|
||||
builder.Entity<Blog>().Property(x=>x.Posted).HasDefaultValueSql("LOCALTIMESTAMP");
|
||||
builder.Entity<GoogleCloudMobileDeclaration>().Property(x=>x.DeclarationDate).HasDefaultValueSql("LOCALTIMESTAMP");
|
||||
builder.Entity<PostTag>().HasKey(x=>new { x.PostId, x.TagId});
|
||||
builder.Entity<ApplicationUser>().HasMany<Connection>( c=>c.Connections );
|
||||
builder.Entity<UserActivity>().HasKey(u=> new { u.DoesCode, u.UserId});
|
||||
builder.Entity<Instrumentation>().HasKey(u=> new { u.InstrumentId, u.UserId});
|
||||
}
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
optionsBuilder.UseNpgsql(Startup.ConnectionString);
|
||||
}
|
||||
|
||||
public DbSet<Client> Applications { get; set; }
|
||||
|
||||
public DbSet<RefreshToken> RefreshTokens { get; set; }
|
||||
/// <summary>
|
||||
/// Activities referenced on this site
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DbSet<Activity> Activities { get; set; }
|
||||
public DbSet<UserActivity> UserActivities { get; set; }
|
||||
/// <summary>
|
||||
/// Users posts
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DbSet<Blog> Blogspot { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Skills propulsed by this site
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DbSet<Skill> SiteSkills { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Circle members
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DbSet<CircleMember> CircleMembers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Commands, from an user, to a performer
|
||||
/// (A performer is an user who's actived a main activity
|
||||
/// on his profile).
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DbSet<BookQuery> Commands { get; set; }
|
||||
/// <summary>
|
||||
/// Special commands, talking about
|
||||
/// a given place and date.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DbSet<BookQuery> BookQueries { get; set; }
|
||||
public DbSet<PerformerProfile> Performers { get; set; }
|
||||
public DbSet<Estimate> Estimates { get; set; }
|
||||
public DbSet<AccountBalance> BankStatus { get; set; }
|
||||
public DbSet<BalanceImpact> BankBook { get; set; }
|
||||
public DbSet<Location> Map { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Google Calendar offline
|
||||
/// open auth tokens
|
||||
/// </summary>
|
||||
/// <returns>tokens</returns>
|
||||
public DbSet<OAuth2Tokens> Tokens { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// References all declared external GCM devices
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DbSet<GoogleCloudMobileDeclaration> GCMDevices { get; set; }
|
||||
|
||||
public DbSet<Service> Services { get; set; }
|
||||
public DbSet<Product> Products { get; set; }
|
||||
public Task ClearTokensAsync()
|
||||
{
|
||||
Tokens.RemoveRange(this.Tokens);
|
||||
SaveChanges();
|
||||
return Task.FromResult(0);
|
||||
}
|
||||
|
||||
public Task DeleteTokensAsync(string email)
|
||||
{
|
||||
if (string.IsNullOrEmpty(email))
|
||||
{
|
||||
throw new ArgumentException("email MUST have a value");
|
||||
}
|
||||
|
||||
var item = this.Tokens.FirstOrDefault(x => x.UserId == email);
|
||||
if (item != null)
|
||||
{
|
||||
Tokens.Remove(item);
|
||||
SaveChanges();
|
||||
}
|
||||
return Task.FromResult(0);
|
||||
}
|
||||
|
||||
public Task<OAuth2Tokens> GetTokensAsync(string googleUserId)
|
||||
{
|
||||
if (string.IsNullOrEmpty(googleUserId))
|
||||
{
|
||||
throw new ArgumentException("email MUST have a value");
|
||||
}
|
||||
|
||||
using (var context = new ApplicationDbContext())
|
||||
{
|
||||
var item = this.Tokens.FirstOrDefault(x => x.UserId == googleUserId);
|
||||
return Task.FromResult(item);
|
||||
}
|
||||
}
|
||||
|
||||
public Task StoreTokenAsync(string googleUserId, OAuthTokenResponse value)
|
||||
{
|
||||
if (string.IsNullOrEmpty(googleUserId))
|
||||
{
|
||||
throw new ArgumentException("googleUserId MUST have a value");
|
||||
}
|
||||
|
||||
var item = this.Tokens.SingleOrDefaultAsync(x => x.UserId == googleUserId).Result;
|
||||
if (item == null)
|
||||
{
|
||||
Tokens.Add(new OAuth2Tokens
|
||||
{
|
||||
TokenType = "Bearer", // FIXME why value.TokenType would be null?
|
||||
AccessToken = value.AccessToken,
|
||||
RefreshToken = value.RefreshToken,
|
||||
Expiration = DateTime.Now.AddSeconds(int.Parse(value.ExpiresIn)),
|
||||
UserId = googleUserId
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
item.AccessToken = value.AccessToken;
|
||||
item.Expiration = DateTime.Now.AddMinutes(int.Parse(value.ExpiresIn));
|
||||
if (value.RefreshToken != null)
|
||||
item.RefreshToken = value.RefreshToken;
|
||||
Tokens.Update(item);
|
||||
}
|
||||
SaveChanges();
|
||||
return Task.FromResult(0);
|
||||
}
|
||||
|
||||
Client FindApplication(string clientId)
|
||||
{
|
||||
return Applications.FirstOrDefault(
|
||||
app=>app.Id == clientId);
|
||||
}
|
||||
|
||||
public DbSet<ExceptionSIREN> ExceptionsSIREN { get; set; }
|
||||
|
||||
public DbSet<Location> Locations { get; set; }
|
||||
|
||||
public DbSet<Tag> Tags { get; set; }
|
||||
|
||||
public DbSet<PostTag> TagsDomain { get; set; }
|
||||
|
||||
public DbSet<EstimateTemplate> EstimateTemplates { get; set; }
|
||||
|
||||
public DbSet<Contact> Contacts { get; set; }
|
||||
|
||||
public DbSet<ClientProviderInfo> ClientProviderInfo { get; set; }
|
||||
|
||||
public DbSet<Connection> Connections { get; set; }
|
||||
|
||||
public DbSet<BlackListed> BlackListed { get; set; }
|
||||
|
||||
public DbSet<MusicalPreference> MusicalPreferences { get; set; }
|
||||
|
||||
public DbSet<MusicalTendency> MusicalTendency { get; set; }
|
||||
|
||||
public DbSet<LocationType> LocationType { get; set; }
|
||||
|
||||
public DbSet<Instrument> Instrument { get; set; }
|
||||
public DbSet<DjSettings> DjSettings { get; set; }
|
||||
public DbSet<Instrumentation> Instrumentation { get; set; }
|
||||
public DbSet<FormationSettings> FormationSettings { get; set; }
|
||||
public DbSet<GeneralSettings> GeneralSettings { get; set; }
|
||||
public DbSet<CoWorking> WorkflowProviders { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ using System.ComponentModel.DataAnnotations.Schema;
|
|||
|
||||
namespace Yavsc.Models
|
||||
{
|
||||
using Interfaces;
|
||||
|
||||
public partial class AccountBalance: IAccountBalance {
|
||||
[Key]
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ namespace Yavsc.Models.Billing
|
|||
{
|
||||
using Interfaces;
|
||||
using Models.Booking;
|
||||
using Yavsc.Models.Workflow;
|
||||
|
||||
public partial class Estimate : IEstimate
|
||||
{
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
|
|
@ -61,8 +63,13 @@ namespace Yavsc.Models.Billing
|
|||
[Required]
|
||||
public string OwnerId { get; set; }
|
||||
|
||||
[ForeignKey("OwnerId")]
|
||||
public virtual PerformerProfile Owner { get; set; }
|
||||
|
||||
[Required]
|
||||
public string ClientId { get; set; }
|
||||
[ForeignKey("ClientId")]
|
||||
public virtual ApplicationUser Client { get; set; }
|
||||
|
||||
public string CommandType
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ namespace Yavsc.Models.Billing
|
|||
{
|
||||
public class ExceptionSIREN {
|
||||
|
||||
[Key]
|
||||
[Key,MinLength(9)]
|
||||
public string SIREN { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -8,7 +8,8 @@ using Yavsc.Models.Workflow;
|
|||
namespace Yavsc.Models.Billing
|
||||
{
|
||||
|
||||
public class NominativeServiceCommand : Query<Service> {
|
||||
public class NominativeServiceCommand<T> : Query<T> where T:Service
|
||||
{
|
||||
|
||||
public string ClientId { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ using System;
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
using Yavsc.Interfaces;
|
||||
|
||||
namespace Yavsc.Models
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ using System;
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Models.Billing;
|
||||
using Yavsc.Models.Relationship;
|
||||
|
||||
namespace Yavsc.Models.Booking
|
||||
{
|
||||
|
|
@ -9,7 +10,7 @@ namespace Yavsc.Models.Booking
|
|||
/// Query, for a date, with a given perfomer, at this given place.
|
||||
/// </summary>
|
||||
|
||||
public class BookQuery : NominativeServiceCommand {
|
||||
public class BookQuery : NominativeServiceCommand<RendezVous> {
|
||||
/// <summary>
|
||||
/// The command identifier
|
||||
/// </summary>
|
||||
|
|
@ -25,7 +26,13 @@ namespace Yavsc.Models.Booking
|
|||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
|
||||
public LocationType LocationType {
|
||||
set;
|
||||
get;
|
||||
}
|
||||
public string Reason { get; set; }
|
||||
|
||||
public BookQuery()
|
||||
{
|
||||
}
|
||||
|
|
|
|||
15
Yavsc/Models/Booking/Instrument.cs
Normal file
15
Yavsc/Models/Booking/Instrument.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Booking
|
||||
{
|
||||
public class Instrument
|
||||
{
|
||||
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id {get; set; }
|
||||
|
||||
[MaxLength(255),Required]
|
||||
public string Name { get ; set; }
|
||||
}
|
||||
}
|
||||
20
Yavsc/Models/Booking/InstrumentRating.cs
Normal file
20
Yavsc/Models/Booking/InstrumentRating.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Models.Workflow;
|
||||
|
||||
namespace Yavsc.Models.Booking
|
||||
{
|
||||
public class InstrumentRating
|
||||
{
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id {get; set; }
|
||||
public Instrument Instrument { get; set; }
|
||||
public int Rate { get; set; }
|
||||
|
||||
public string OwnerId { get; set; }
|
||||
|
||||
[ForeignKey("OwnerId")]
|
||||
public virtual PerformerProfile Profile { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
26
Yavsc/Models/Booking/MusicalPreference.cs
Normal file
26
Yavsc/Models/Booking/MusicalPreference.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Models.Workflow;
|
||||
|
||||
namespace Yavsc.Models.Booking {
|
||||
|
||||
public class MusicalPreference {
|
||||
|
||||
[Key]
|
||||
public string OwnerProfileId
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
|
||||
public int Rate { get; set; }
|
||||
|
||||
[Required]
|
||||
public long TendencyId {get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
21
Yavsc/Models/Booking/MusicalTendency.cs
Normal file
21
Yavsc/Models/Booking/MusicalTendency.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
|
||||
namespace Yavsc.Models.Booking {
|
||||
|
||||
|
||||
|
||||
public class MusicalTendency {
|
||||
|
||||
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id {get; set; }
|
||||
|
||||
[MaxLength(255),Required]
|
||||
public string Name { get ; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
24
Yavsc/Models/Booking/Profiles/DjSettings.cs
Normal file
24
Yavsc/Models/Booking/Profiles/DjSettings.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Models.Workflow;
|
||||
using YavscLib;
|
||||
|
||||
namespace Yavsc.Models.Booking.Profiles
|
||||
{
|
||||
public class DjSettings : ISpecializationSettings
|
||||
{
|
||||
|
||||
public string SoundCloudId { get; set; }
|
||||
|
||||
public virtual List<MusicalPreference> SoundColor { get; set; }
|
||||
|
||||
[Key]
|
||||
public string UserId
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
19
Yavsc/Models/Booking/Profiles/FormationSettings.cs
Normal file
19
Yavsc/Models/Booking/Profiles/FormationSettings.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Booking.Profiles
|
||||
{
|
||||
using Models.Workflow;
|
||||
using YavscLib;
|
||||
public class FormationSettings : ISpecializationSettings
|
||||
{
|
||||
public virtual List<CoWorking> CoWorking { get; set; }
|
||||
|
||||
[Key]
|
||||
public string UserId
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
}
|
||||
}
|
||||
18
Yavsc/Models/Booking/Profiles/GeneralSettings.cs
Normal file
18
Yavsc/Models/Booking/Profiles/GeneralSettings.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Models.Workflow;
|
||||
using YavscLib;
|
||||
|
||||
namespace Yavsc.Models.Booking.Profiles
|
||||
{
|
||||
public class GeneralSettings : ISpecializationSettings
|
||||
{
|
||||
public virtual List<MusicalPreference> SoundColor { get; set; }
|
||||
[Key]
|
||||
public string UserId
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
}
|
||||
}
|
||||
25
Yavsc/Models/Booking/Profiles/Instrumentation.cs
Normal file
25
Yavsc/Models/Booking/Profiles/Instrumentation.cs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Models.Workflow;
|
||||
using YavscLib;
|
||||
|
||||
namespace Yavsc.Models.Booking.Profiles
|
||||
{
|
||||
public class Instrumentation : ISpecializationSettings
|
||||
{
|
||||
public string UserId
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
[ForeignKeyAttribute("UserId")]
|
||||
public virtual PerformerProfile User { get; set; }
|
||||
public long InstrumentId { get; set; }
|
||||
|
||||
[ForeignKeyAttribute("InstrumentId")]
|
||||
public virtual Instrument Tool { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Model.Chat
|
||||
namespace Yavsc.Models.Chat
|
||||
{
|
||||
using YavscLib;
|
||||
|
||||
public class Connection
|
||||
public class Connection : IConnection
|
||||
{
|
||||
[JsonIgnore]
|
||||
public string ApplicationUserId { get; set; }
|
||||
|
|
@ -19,4 +19,4 @@ namespace Yavsc.Model.Chat
|
|||
public bool Connected { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,9 @@ using Microsoft.AspNet.Identity.EntityFramework;
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Models.Identity;
|
||||
using Yavsc.Model.Chat;
|
||||
using Yavsc.Models.Chat;
|
||||
using Yavsc.Model.Bank;
|
||||
using Yavsc.Models.Access;
|
||||
|
||||
namespace Yavsc.Models
|
||||
{
|
||||
|
|
@ -87,5 +88,7 @@ namespace Yavsc.Models
|
|||
|
||||
public long DiskQuota { get; set; } = 512*1024*1024;
|
||||
public long DiskUsage { get; set; } = 0;
|
||||
|
||||
public virtual List<BlackListed> BlackList { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ using System;
|
|||
|
||||
namespace Yavsc.Model
|
||||
{
|
||||
using Models.Messaging;
|
||||
|
||||
public class BookQueryProviderInfo
|
||||
{
|
||||
|
|
@ -12,5 +13,8 @@ namespace Yavsc.Model
|
|||
|
||||
public DateTime EventDate { get; set; }
|
||||
public decimal? Previsional { get; set; }
|
||||
|
||||
public string Reason { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
namespace Yavsc.Model
|
||||
namespace Yavsc.Models.Messaging
|
||||
{
|
||||
public class ClientProviderInfo
|
||||
{
|
||||
|
|
@ -8,10 +8,8 @@ namespace Yavsc.Model
|
|||
public string Avatar { get; set; }
|
||||
[Key]
|
||||
public string UserId { get; set; }
|
||||
public int Rate { get; set; }
|
||||
public string EMail { get; set; }
|
||||
public string Phone { get; set; }
|
||||
public Location BillingAddress { get; set; }
|
||||
public string ChatHubConnectionId { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
54
Yavsc/Models/Messaging/EstimationEvent.cs
Normal file
54
Yavsc/Models/Messaging/EstimationEvent.cs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
using System.Linq;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Yavsc.Helpers;
|
||||
using Yavsc.Models.Billing;
|
||||
|
||||
namespace Yavsc.Models.Messaging
|
||||
{
|
||||
public class EstimationEvent: IEvent
|
||||
{
|
||||
public EstimationEvent(ApplicationDbContext context, Estimate estimate, IStringLocalizer SR)
|
||||
{
|
||||
Estimation = estimate;
|
||||
var perfer = context.Performers.FirstOrDefault(
|
||||
p => p.PerformerId == estimate.OwnerId
|
||||
);
|
||||
// Use estimate.OwnerId;
|
||||
ProviderInfo = new ProviderClientInfo {
|
||||
Rate = perfer.Rate,
|
||||
UserName = perfer.Performer.UserName,
|
||||
Avatar = perfer.Performer.Avatar,
|
||||
UserId = perfer.PerformerId
|
||||
};
|
||||
((IEvent)this).Sender = perfer.Performer.UserName;
|
||||
((IEvent)this).Message = string.Format(SR["EstimationMessageToClient"],perfer.Performer.UserName,
|
||||
estimate.Title,estimate.GetTotal());
|
||||
}
|
||||
ProviderClientInfo ProviderInfo { get; set; }
|
||||
Estimate Estimation { get; set; }
|
||||
|
||||
private string subtopic = null;
|
||||
string IEvent.Topic
|
||||
{
|
||||
get
|
||||
{
|
||||
return "/topic/estimate"+subtopic!=null?"/"+subtopic:"";
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
subtopic = value;
|
||||
}
|
||||
}
|
||||
|
||||
string IEvent.Sender
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
string IEvent.Message
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Yavsc/Models/Messaging/ProviderClientInfo.cs
Normal file
8
Yavsc/Models/Messaging/ProviderClientInfo.cs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
namespace Yavsc.Models.Messaging
|
||||
{
|
||||
public class ProviderClientInfo : ClientProviderInfo
|
||||
{
|
||||
public int Rate { get; set; }
|
||||
}
|
||||
}
|
||||
13
Yavsc/Models/Relationship/LocationType.cs
Normal file
13
Yavsc/Models/Relationship/LocationType.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Relationship
|
||||
{
|
||||
public class LocationType
|
||||
{
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -18,6 +18,15 @@ namespace Yavsc.Models
|
|||
[StringLength(512),Required()]
|
||||
public string Name {get; set;}
|
||||
|
||||
[StringLength(512)]
|
||||
public string ParentCode { get; set; }
|
||||
|
||||
[ForeignKey("ParentCode")]
|
||||
public virtual Activity Parent { get; set; }
|
||||
|
||||
[InverseProperty("Parent")]
|
||||
public virtual List<Activity> Children { get; set; }
|
||||
|
||||
public string Description {get; set;}
|
||||
/// <summary>
|
||||
/// Name to associate to a performer in this activity domain
|
||||
|
|
@ -36,5 +45,16 @@ namespace Yavsc.Models
|
|||
/// <returns></returns>
|
||||
string ModeratorGroupName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// indice de recherche de cette activité
|
||||
/// rendu par le système.
|
||||
/// Valide entre 0 et 100,
|
||||
/// Il démarre à 0.
|
||||
/// </summary>
|
||||
[Range(0,100)]
|
||||
public int Rate { get; set; }
|
||||
|
||||
[DisplayAttribute(Name="SettingsClass")]
|
||||
public string SettingsClassName { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
21
Yavsc/Models/Workflow/CoWorking.cs
Normal file
21
Yavsc/Models/Workflow/CoWorking.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Workflow
|
||||
{
|
||||
public class CoWorking
|
||||
{
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id {get; set; }
|
||||
|
||||
public string PerformerId { get; set; }
|
||||
public string WorkingForId { get; set; }
|
||||
|
||||
[ForeignKey("PerformerId")]
|
||||
public virtual PerformerProfile Performer { get; set; }
|
||||
|
||||
[ForeignKey("WorkingForId")]
|
||||
public virtual ApplicationUser WorkingFor { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Models.Market;
|
||||
|
||||
namespace Yavsc.Models.Workflow
|
||||
{
|
||||
|
|
@ -12,10 +12,9 @@ namespace Yavsc.Models.Workflow
|
|||
[ForeignKey("PerformerId"),Display(Name="Performer")]
|
||||
public virtual ApplicationUser Performer { get; set; }
|
||||
|
||||
[Display(Name="Activity"),Required]
|
||||
public string ActivityCode { get; set; }
|
||||
|
||||
public Service Offer { get; set; }
|
||||
[InverseProperty("User")]
|
||||
[Display(Name="Activity")]
|
||||
public virtual List<UserActivity> Activity { get; set; }
|
||||
|
||||
[Required,StringLength(14),Display(Name="SIREN"),
|
||||
RegularExpression(@"^[0-9]{9,14}$", ErrorMessage = "Only numbers are allowed here")]
|
||||
|
|
@ -26,9 +25,6 @@ namespace Yavsc.Models.Workflow
|
|||
[Required,Display(Name="Organization address"),ForeignKey("OrganizationAddressId")]
|
||||
public virtual Location OrganizationAddress { get; set; }
|
||||
|
||||
[ForeignKey("ActivityCode"),Display(Name="Activity")]
|
||||
public virtual Activity Activity { get; set; }
|
||||
|
||||
[Display(Name="Accept notifications on client query")]
|
||||
public bool AcceptNotifications { get; set; }
|
||||
|
||||
|
|
@ -55,7 +51,7 @@ namespace Yavsc.Models.Workflow
|
|||
|
||||
[NotMapped]
|
||||
public bool DoesBlog { get {
|
||||
return Performer?.Posts != null ? Performer.Posts.Count > 0 : false;
|
||||
return Performer.Posts?.Count > 0 ;
|
||||
} }
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yavsc.Models
|
||||
namespace Yavsc.Models.Process
|
||||
{
|
||||
public abstract class Action<TResult,TInput>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Yavsc.Models
|
||||
namespace Yavsc.Models.Process
|
||||
{
|
||||
public class Conjonction : List<IRequisition>, IRequisition
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Yavsc.Models
|
||||
namespace Yavsc.Models.Process
|
||||
{
|
||||
public class Disjonction : List<IRequisition>, IRequisition
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
namespace Yavsc.Models
|
||||
namespace Yavsc.Models.Process
|
||||
{
|
||||
public class ConstInputValue : NamedRequisition
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
namespace Yavsc.Models
|
||||
namespace Yavsc.Models.Process
|
||||
{
|
||||
public abstract class NamedRequisition : IRequisition
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
namespace Yavsc.Models
|
||||
namespace Yavsc.Models.Process
|
||||
{
|
||||
public class Negation<Exp> : IRequisition where Exp : IRequisition
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.Models
|
||||
namespace Yavsc.Models.Process
|
||||
{
|
||||
/// <summary>
|
||||
/// An abstract, identified rule
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace Yavsc.Models {
|
|||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// indice de recherche de cette capacité
|
||||
/// indice de recherche de ce talent
|
||||
/// rendu par le système.
|
||||
/// Valide entre 0 et 100,
|
||||
/// Il démarre à 0.
|
||||
|
|
|
|||
24
Yavsc/Models/Workflow/UserActivity.cs
Normal file
24
Yavsc/Models/Workflow/UserActivity.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Workflow
|
||||
{
|
||||
public class UserActivity
|
||||
{
|
||||
[Required]
|
||||
public string UserId { get; set; }
|
||||
|
||||
[ForeignKey("UserId")]
|
||||
public virtual PerformerProfile User { get; set; }
|
||||
|
||||
[Required]
|
||||
public string DoesCode { get; set; }
|
||||
|
||||
[ForeignKey("DoesCode")]
|
||||
public virtual Activity Does { get; set; }
|
||||
|
||||
[Range(0,100)]
|
||||
public int Weight { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue