.
This commit is contained in:
@ -5,6 +5,7 @@ using Microsoft.AspNet.Authorization;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.Models.Billing;
|
||||
|
||||
@ -15,10 +16,11 @@ namespace Yavsc.Controllers
|
||||
public class EstimateApiController : Controller
|
||||
{
|
||||
private ApplicationDbContext _context;
|
||||
|
||||
public EstimateApiController(ApplicationDbContext context)
|
||||
private ILogger _logger;
|
||||
public EstimateApiController(ApplicationDbContext context, ILoggerFactory loggerFactory)
|
||||
{
|
||||
_context = context;
|
||||
_logger = loggerFactory.CreateLogger<EstimateApiController>();
|
||||
}
|
||||
bool UserIsAdminOrThis(string uid)
|
||||
{
|
||||
@ -39,7 +41,7 @@ namespace Yavsc.Controllers
|
||||
else if (!UserIsAdminOrThis(ownerId)) // throw new Exception("Not authorized") ;
|
||||
// or just do nothing
|
||||
return new HttpStatusCodeResult(StatusCodes.Status403Forbidden);
|
||||
return Ok(_context.Estimates.Where(e=>e.OwnerId == ownerId));
|
||||
return Ok(_context.Estimates.Include(e=>e.Bill).Where(e=>e.OwnerId == ownerId));
|
||||
}
|
||||
// GET: api/Estimate/5
|
||||
[HttpGet("{id}", Name = "GetEstimate")]
|
||||
@ -50,7 +52,7 @@ namespace Yavsc.Controllers
|
||||
return HttpBadRequest(ModelState);
|
||||
}
|
||||
|
||||
Estimate estimate = _context.Estimates.Single(m => m.Id == id);
|
||||
Estimate estimate = _context.Estimates.Include(e=>e.Bill).Single(m => m.Id == id);
|
||||
|
||||
if (estimate == null)
|
||||
{
|
||||
@ -84,9 +86,9 @@ namespace Yavsc.Controllers
|
||||
return HttpBadRequest(ModelState);
|
||||
}
|
||||
}
|
||||
|
||||
var entry = _context.Attach(estimate);
|
||||
estimate.LatestValidationDate = DateTime.Now;
|
||||
_context.Entry(estimate).State = EntityState.Modified;
|
||||
|
||||
try
|
||||
{
|
||||
_context.SaveChanges();
|
||||
@ -103,7 +105,7 @@ namespace Yavsc.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
return new HttpStatusCodeResult(StatusCodes.Status204NoContent);
|
||||
return Ok( new { Id = estimate.Id, LatestValidationDate = estimate.LatestValidationDate });
|
||||
}
|
||||
|
||||
// POST: api/Estimate
|
||||
@ -125,7 +127,13 @@ namespace Yavsc.Controllers
|
||||
}
|
||||
estimate.LatestValidationDate = DateTime.Now;
|
||||
_context.Estimates.Add(estimate);
|
||||
foreach (var l in estimate.Bill) _context.Attach<CommandLine>(l);
|
||||
/* _context.AttachRange(estimate.Bill);
|
||||
_context.Attach(estimate);
|
||||
_context.Entry(estimate).State = EntityState.Added;
|
||||
foreach (var line in estimate.Bill)
|
||||
_context.Entry(line).State = EntityState.Added;
|
||||
// foreach (var l in estimate.Bill) _context.Attach<CommandLine>(l);
|
||||
*/
|
||||
try
|
||||
{
|
||||
_context.SaveChanges();
|
||||
@ -141,8 +149,7 @@ namespace Yavsc.Controllers
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
return CreatedAtRoute("GetEstimate", new { Id = estimate.Id }, estimate);
|
||||
return Ok( new { Id = estimate.Id, Bill = estimate.Bill , LatestValidationDate = estimate.LatestValidationDate });
|
||||
}
|
||||
|
||||
// DELETE: api/Estimate/5
|
||||
@ -154,7 +161,7 @@ namespace Yavsc.Controllers
|
||||
return HttpBadRequest(ModelState);
|
||||
}
|
||||
|
||||
Estimate estimate = _context.Estimates.Single(m => m.Id == id);
|
||||
Estimate estimate = _context.Estimates.Include(e=>e.Bill).Single(m => m.Id == id);
|
||||
|
||||
if (estimate == null)
|
||||
{
|
||||
|
@ -84,6 +84,7 @@ namespace Yavsc.Controllers
|
||||
: message == ManageMessageId.ChangeNameSuccess ? "Your name was updated."
|
||||
: message == ManageMessageId.SetActivitySuccess ? "Your activity was set."
|
||||
: message == ManageMessageId.AvatarUpdateSuccess ? "Your avatar was updated."
|
||||
: message == ManageMessageId.IdentityUpdateSuccess ? "Your identity was updated."
|
||||
: "";
|
||||
|
||||
var user = await GetCurrentUserAsync();
|
||||
@ -101,7 +102,10 @@ namespace Yavsc.Controllers
|
||||
Balance = user.AccountBalance,
|
||||
ActiveCommandCount = _dbContext.BookQueries.Count(x => (x.ClientId == user.Id) && (x.EventDate > DateTime.Now)),
|
||||
HasDedicatedCalendar = !string.IsNullOrEmpty(user.DedicatedGoogleCalendar),
|
||||
Roles = await _userManager.GetRolesAsync(user)
|
||||
Roles = await _userManager.GetRolesAsync(user),
|
||||
PostalAddress = user.PostalAddress?.Address,
|
||||
FullName = user.FullName,
|
||||
Avatar = user.Avatar
|
||||
};
|
||||
if (_dbContext.Performers.Any(x => x.PerformerId == user.Id))
|
||||
{
|
||||
@ -458,6 +462,12 @@ namespace Yavsc.Controllers
|
||||
return RedirectToAction(nameof(ManageLogins), new { Message = message });
|
||||
}
|
||||
|
||||
[HttpGet, Authorize]
|
||||
public IActionResult SetAvatar()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
[HttpGet, Authorize]
|
||||
public IActionResult SetActivity()
|
||||
{
|
||||
@ -496,7 +506,7 @@ namespace Yavsc.Controllers
|
||||
);
|
||||
if (exSiren != null)
|
||||
{
|
||||
_logger.LogInformation("Exception SIREN:"+exSiren);
|
||||
_logger.LogInformation("Exception SIREN:" + exSiren);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -535,7 +545,7 @@ namespace Yavsc.Controllers
|
||||
|
||||
// Give this user the Performer role
|
||||
if (!User.IsInRole("Performer"))
|
||||
await _userManager.AddToRoleAsync(user,"Performer");
|
||||
await _userManager.AddToRoleAsync(user, "Performer");
|
||||
var message = ManageMessageId.SetActivitySuccess;
|
||||
|
||||
return RedirectToAction(nameof(Index), new { Message = message });
|
||||
@ -560,7 +570,7 @@ namespace Yavsc.Controllers
|
||||
_dbContext.Performers.First(x => x.PerformerId == uid)
|
||||
);
|
||||
_dbContext.SaveChanges();
|
||||
await _userManager.RemoveFromRoleAsync(user,"Performer");
|
||||
await _userManager.RemoveFromRoleAsync(user, "Performer");
|
||||
}
|
||||
var message = ManageMessageId.UnsetActivitySuccess;
|
||||
return RedirectToAction(nameof(Index), new { Message = message });
|
||||
@ -602,6 +612,7 @@ namespace Yavsc.Controllers
|
||||
SetActivitySuccess,
|
||||
UnsetActivitySuccess,
|
||||
AvatarUpdateSuccess,
|
||||
IdentityUpdateSuccess,
|
||||
Error
|
||||
}
|
||||
|
||||
|
@ -32,9 +32,10 @@ namespace Yavsc
|
||||
return app;
|
||||
}
|
||||
|
||||
public static void UseSignalR(this IApplicationBuilder app)
|
||||
public static void UseSignalR(this IApplicationBuilder app, string path = "/signalr")
|
||||
{
|
||||
app.UseAppBuilder(appBuilder => appBuilder.MapSignalR(
|
||||
path,
|
||||
new HubConfiguration() {
|
||||
EnableDetailedErrors = true,
|
||||
EnableJSONP = true
|
||||
|
755
Yavsc/Migrations/20161020212947_userAddress.Designer.cs
generated
Normal file
755
Yavsc/Migrations/20161020212947_userAddress.Designer.cs
generated
Normal file
@ -0,0 +1,755 @@
|
||||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Metadata;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20161020212947_userAddress")]
|
||||
partial class userAddress
|
||||
{
|
||||
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.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<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
|
||||
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();
|
||||
|
||||
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<DateTime>("ClientApprouvalDate");
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("CommandType");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<DateTime>("LatestValidationDate");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int?>("Status");
|
||||
|
||||
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<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.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("Yavsc.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
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");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
262
Yavsc/Migrations/20161020212947_userAddress.cs
Normal file
262
Yavsc/Migrations/20161020212947_userAddress.cs
Normal file
@ -0,0 +1,262 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class userAddress : 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_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: "FullName",
|
||||
table: "AspNetUsers",
|
||||
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_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_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: "FullName", table: "AspNetUsers");
|
||||
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_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);
|
||||
}
|
||||
}
|
||||
}
|
755
Yavsc/Migrations/20161021153306_estimateLines.Designer.cs
generated
Normal file
755
Yavsc/Migrations/20161021153306_estimateLines.Designer.cs
generated
Normal file
@ -0,0 +1,755 @@
|
||||
using System;
|
||||
using Microsoft.Data.Entity;
|
||||
using Microsoft.Data.Entity.Infrastructure;
|
||||
using Microsoft.Data.Entity.Metadata;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
[DbContext(typeof(ApplicationDbContext))]
|
||||
[Migration("20161021153306_estimateLines")]
|
||||
partial class estimateLines
|
||||
{
|
||||
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.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<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
|
||||
b.Property<string>("DedicatedGoogleCalendar");
|
||||
|
||||
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();
|
||||
|
||||
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<DateTime>("ClientApprouvalDate");
|
||||
|
||||
b.Property<string>("ClientId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<long?>("CommandId");
|
||||
|
||||
b.Property<string>("CommandType");
|
||||
|
||||
b.Property<string>("Description");
|
||||
|
||||
b.Property<DateTime>("LatestValidationDate");
|
||||
|
||||
b.Property<string>("OwnerId")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<int?>("Status");
|
||||
|
||||
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<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.Models.AccountBalance", b =>
|
||||
{
|
||||
b.HasOne("Yavsc.Models.ApplicationUser")
|
||||
.WithOne()
|
||||
.HasForeignKey("Yavsc.Models.AccountBalance", "UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
|
||||
{
|
||||
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");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
281
Yavsc/Migrations/20161021153306_estimateLines.cs
Normal file
281
Yavsc/Migrations/20161021153306_estimateLines.cs
Normal file
@ -0,0 +1,281 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Data.Entity.Migrations;
|
||||
|
||||
namespace Yavsc.Migrations
|
||||
{
|
||||
public partial class estimateLines : 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.AlterColumn<long>(
|
||||
name: "EstimateId",
|
||||
table: "CommandLine",
|
||||
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_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.AlterColumn<long>(
|
||||
name: "EstimateId",
|
||||
table: "CommandLine",
|
||||
nullable: true);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
|
||||
table: "AspNetRoleClaims",
|
||||
column: "RoleId",
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserClaims",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserLogins",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
|
||||
table: "AspNetUserRoles",
|
||||
column: "RoleId",
|
||||
principalTable: "AspNetRoles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
|
||||
table: "AspNetUserRoles",
|
||||
column: "UserId",
|
||||
principalTable: "AspNetUsers",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_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);
|
||||
}
|
||||
}
|
||||
}
|
@ -103,7 +103,8 @@ namespace Yavsc.Migrations
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired();
|
||||
.IsRequired()
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<double>("Latitude");
|
||||
|
||||
@ -149,7 +150,8 @@ namespace Yavsc.Migrations
|
||||
|
||||
b.Property<int>("AccessFailedCount");
|
||||
|
||||
b.Property<string>("Avatar");
|
||||
b.Property<string>("Avatar")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsConcurrencyToken();
|
||||
@ -161,6 +163,9 @@ namespace Yavsc.Migrations
|
||||
|
||||
b.Property<bool>("EmailConfirmed");
|
||||
|
||||
b.Property<string>("FullName")
|
||||
.HasAnnotation("MaxLength", 512);
|
||||
|
||||
b.Property<bool>("LockoutEnabled");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd");
|
||||
@ -271,7 +276,7 @@ namespace Yavsc.Migrations
|
||||
b.Property<string>("Description")
|
||||
.IsRequired();
|
||||
|
||||
b.Property<long?>("EstimateId");
|
||||
b.Property<long>("EstimateId");
|
||||
|
||||
b.Property<long?>("EstimateTemplateId");
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
using Yavsc.Models.Market;
|
||||
|
||||
namespace Yavsc.Models.Billing
|
||||
@ -11,11 +12,16 @@ namespace Yavsc.Models.Billing
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[Required,MaxLength(512)]
|
||||
public string Description { get; set; }
|
||||
public BaseProduct Article { get; set; }
|
||||
public int Count { get; set; }
|
||||
public decimal UnitaryCost { get; set; }
|
||||
|
||||
public long EstimateId { get; set; }
|
||||
|
||||
[JsonIgnore,NotMapped,ForeignKey("EstimateId")]
|
||||
virtual public Estimate Estimate { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -24,7 +24,9 @@ namespace Yavsc.Models.Billing
|
||||
public string Description { get; set; }
|
||||
public int? Status { get; set; }
|
||||
public string Title { get; set; }
|
||||
public List<CommandLine> Bill { get; set; }
|
||||
|
||||
[InverseProperty("Estimate")]
|
||||
public virtual List<CommandLine> Bill { get; set; }
|
||||
/// <summary>
|
||||
/// List of attached graphic files
|
||||
/// to this estimate, as relative pathes to
|
||||
|
@ -18,7 +18,13 @@ namespace Yavsc.Models
|
||||
/// <see>Startup.UserFilesOptions</see>
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[MaxLength(512)]
|
||||
public string Avatar { get; set; }
|
||||
|
||||
[MaxLength(512)]
|
||||
public string FullName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// WIP Paypal
|
||||
/// </summary>
|
||||
|
@ -31,8 +31,8 @@ namespace Yavsc
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
[Required(),
|
||||
Display(Name="Address")]
|
||||
Display(Name="Address"),
|
||||
MaxLength(512)]
|
||||
public string Address { get; set; }
|
||||
|
||||
}
|
||||
}
|
@ -214,6 +214,7 @@
|
||||
<data name="Forgot your password?"><value>Mot de passe perdu?</value></data>
|
||||
<data name="Forgot Password Confirmation."><value>Confirmation mot de passe perdu.</value></data>
|
||||
<data name="from"><value>provenant de</value></data>
|
||||
<data name="Full name"><value>Nom complet</value></data>
|
||||
<data name="GCM Notification sending failed"><value>L'envoi du message push a échoué</value></data>
|
||||
<data name="GCM Notifications sent"><value>Message push envoyé</value></data>
|
||||
<data name="GoogleDidntGeoLocalized"><value>Google n'a pas pu identifier ce lieu</value></data>
|
||||
@ -227,6 +228,8 @@
|
||||
<data name="I understood"><value>J'ai compris</value></data>
|
||||
<data name="Icon"><value>Icône</value></data>
|
||||
<data name="Icons made by"><value>Les icônes fabriqués par</value></data>
|
||||
<data name="Identity"><value>Identité</value></data>
|
||||
|
||||
<data name="ImgLocator"><value>URI de l'image</value></data>
|
||||
<data name="ImportException"><value>Exception à l'import</value></data>
|
||||
<data name="InternalServerError"><value>Erreur serveur interne</value></data>
|
||||
|
@ -314,7 +314,7 @@ namespace Yavsc
|
||||
name: "default",
|
||||
template: "{controller=Home}/{action=Index}/{id?}");
|
||||
});
|
||||
app.UseSignalR();
|
||||
app.UseSignalR("/api/signalr");
|
||||
}
|
||||
|
||||
// Entry point for the application.
|
||||
|
@ -8,6 +8,8 @@ namespace Yavsc.ViewModels.Manage
|
||||
{
|
||||
public string UserName {get; set; }
|
||||
|
||||
public string Avatar { get; set; }
|
||||
|
||||
public bool HasPassword { get; set; }
|
||||
|
||||
public IList<UserLoginInfo> Logins { get; set; }
|
||||
@ -29,5 +31,9 @@ namespace Yavsc.ViewModels.Manage
|
||||
public bool HasDedicatedCalendar { get; set; }
|
||||
|
||||
public IEnumerable<string> Roles { get; set; }
|
||||
|
||||
public string FullName { get; set; }
|
||||
|
||||
public string PostalAddress { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
<!--Reference the SignalR library. -->
|
||||
<script src="~/js/jquery.signalR-2.2.1.min.js"></script>
|
||||
<!--Reference the autogenerated SignalR hub script. -->
|
||||
<script src="~/signalr/hubs"></script>
|
||||
<script src="~/api/signalr/hubs"></script>
|
||||
<!--SignalR script to update the chat page and send messages.-->
|
||||
<script>
|
||||
$(function () {
|
||||
|
@ -32,6 +32,24 @@
|
||||
<dd>
|
||||
@Model.Logins.Count [<a asp-controller="Manage" asp-action="ManageLogins">@SR["Manage"]</a>]
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<dt>@SR["Full name"]:</dt>
|
||||
<dd>@Model.FullName [<a asp-controller="Manage" asp-action="SetFullName"
|
||||
>@SR[@Model.FullName==null?"Set":"Modify"]</a>]</dd>
|
||||
|
||||
<dt>@SR["Address"]:</dt>
|
||||
<dd>@Model.PostalAddress
|
||||
[<a asp-controller="Manage" asp-action="SetAddress"
|
||||
>@SR[@Model.PostalAddress==null?"Set":"Modify"]</a>]
|
||||
</dd>
|
||||
|
||||
<dt>@SR["Avatar"]:</dt>
|
||||
<dd>@Model.Avatar
|
||||
[<a asp-controller="Manage" asp-action="SetAvatar"
|
||||
>@SR[@Model.Avatar==null?"Set":"Modify"]</a>]
|
||||
</dd>
|
||||
|
||||
<dt>@SR["Activity"]:</dt>
|
||||
<dd>@Model.Activity?.Name
|
||||
|
Reference in New Issue
Block a user