une commande de coupe de cheveux
This commit is contained in:
parent
27b26f0545
commit
c001994d50
38 changed files with 3137 additions and 196 deletions
|
|
@ -27,6 +27,7 @@ namespace Yavsc.Models
|
|||
using Workflow.Profiles;
|
||||
using Drawing;
|
||||
using Yavsc.Attributes;
|
||||
using Yavsc.Models.Bank;
|
||||
|
||||
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
|
||||
{
|
||||
|
|
@ -47,12 +48,12 @@ namespace Yavsc.Models
|
|||
builder.Entity<CircleAuthorizationToBlogPost>().HasKey(a=> new { a.CircleId, a.BlogPostId});
|
||||
builder.Entity<CircleMember>().HasKey(c=> new { MemberId = c.MemberId, CircleId = c.CircleId });
|
||||
builder.Entity<DimissClicked>().HasKey(c=>new { uid = c.UserId, notid = c.NotificationId});
|
||||
|
||||
|
||||
foreach (var et in builder.Model.GetEntityTypes()) {
|
||||
if (et.ClrType.GetInterface("IBaseTrackedEntity")!=null)
|
||||
et.FindProperty("DateCreated").IsReadOnlyAfterSave = true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
public DbSet<TSettings> GetDbSet<TSettings>() where TSettings : class, ISpecializationSettings
|
||||
|
||||
|
|
@ -75,7 +76,7 @@ namespace Yavsc.Models
|
|||
}
|
||||
|
||||
public DbSet<Client> Applications { get; set; }
|
||||
|
||||
|
||||
public DbSet<RefreshToken> RefreshTokens { get; set; }
|
||||
/// <summary>
|
||||
/// Activities referenced on this site
|
||||
|
|
@ -115,6 +116,7 @@ namespace Yavsc.Models
|
|||
/// <returns></returns>
|
||||
public DbSet<RdvQuery> RdvQueries { get; set; }
|
||||
public DbSet<HairCutQuery> HairCutQueries { get; set; }
|
||||
public DbSet<HairPrestation> HairPrestation { get; set; }
|
||||
public DbSet<HairMultiCutQuery> HairMultiCutQueries { get; set; }
|
||||
public DbSet<PerformerProfile> Performers { get; set; }
|
||||
public DbSet<Estimate> Estimates { get; set; }
|
||||
|
|
@ -128,7 +130,7 @@ namespace Yavsc.Models
|
|||
/// </summary>
|
||||
/// <returns>tokens</returns>
|
||||
public DbSet<OAuth2Tokens> Tokens { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// References all declared external GCM devices
|
||||
/// </summary>
|
||||
|
|
@ -237,24 +239,24 @@ namespace Yavsc.Models
|
|||
|
||||
public DbSet<Instrument> Instrument { get; set; }
|
||||
|
||||
[ActivitySettings]
|
||||
[ActivitySettings]
|
||||
public DbSet<DjSettings> DjSettings { get; set; }
|
||||
|
||||
|
||||
[ActivitySettings]
|
||||
public DbSet<Instrumentation> Instrumentation { get; set; }
|
||||
|
||||
[ActivitySettings]
|
||||
public DbSet<FormationSettings> FormationSettings { get; set; }
|
||||
|
||||
|
||||
[ActivitySettings]
|
||||
public DbSet<GeneralSettings> GeneralSettings { get; set; }
|
||||
public DbSet<CoWorking> WorkflowProviders { get; set; }
|
||||
|
||||
private void AddTimestamps(string currentUsername)
|
||||
{
|
||||
var entities =
|
||||
var entities =
|
||||
ChangeTracker.Entries()
|
||||
.Where(x => x.Entity.GetType().GetInterface("IBaseTrackedEntity")!=null
|
||||
.Where(x => x.Entity.GetType().GetInterface("IBaseTrackedEntity")!=null
|
||||
&& (x.State == EntityState.Added || x.State == EntityState.Modified));
|
||||
|
||||
|
||||
|
|
@ -279,7 +281,7 @@ namespace Yavsc.Models
|
|||
AddTimestamps(userId);
|
||||
return await base.SaveChangesAsync();
|
||||
}
|
||||
|
||||
|
||||
public DbSet<Circle> Circle { get; set; }
|
||||
|
||||
public DbSet<CircleAuthorizationToBlogPost> BlogACL { get; set; }
|
||||
|
|
@ -298,11 +300,10 @@ namespace Yavsc.Models
|
|||
|
||||
public DbSet<DimissClicked> DimissClicked { get; set; }
|
||||
|
||||
public DbSet<HairPrestation> HairPrestation { get; set; }
|
||||
|
||||
[ActivitySettings]
|
||||
public DbSet<BrusherProfile> BrusherProfile { get; set; }
|
||||
|
||||
|
||||
public DbSet<BankIdentity> BankIdentity { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,20 +16,20 @@ namespace Yavsc.Models.Haircut
|
|||
[Required]
|
||||
public long PrestationId { get; set; }
|
||||
|
||||
[ForeignKey("PrestationId")]
|
||||
[ForeignKey("PrestationId"),Required]
|
||||
public virtual HairPrestation Prestation { get; set; }
|
||||
|
||||
[Required][ForeignKey("LocationId")]
|
||||
[ForeignKey("LocationId")]
|
||||
|
||||
public Location Location { get; set; }
|
||||
public virtual Location Location { get; set; }
|
||||
|
||||
public DateTime EventDate
|
||||
public DateTime? EventDate
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public long LocationId
|
||||
public long? LocationId
|
||||
{
|
||||
get;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Models.Billing;
|
||||
|
|
@ -6,11 +7,27 @@ using Yavsc.Models.Relationship;
|
|||
|
||||
namespace Yavsc.Models.Haircut
|
||||
{
|
||||
public class HairPrestationCollectionItem {
|
||||
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
public long PrestationId { get; set; }
|
||||
[ForeignKeyAttribute("PrestationId")]
|
||||
public virtual HairPrestation Prestation { get; set; }
|
||||
|
||||
public long QueryId { get; set; }
|
||||
|
||||
[ForeignKeyAttribute("QueryId")]
|
||||
public virtual HairMultiCutQuery Query { get; set; }
|
||||
}
|
||||
|
||||
public class HairMultiCutQuery : NominativeServiceCommand
|
||||
{
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
HairPrestation [] Prestations { get; set; }
|
||||
|
||||
[InversePropertyAttribute("Query")]
|
||||
public virtual List<HairPrestationCollectionItem> Prestations { get; set; }
|
||||
|
||||
public Location Location { get; set; }
|
||||
|
||||
|
|
@ -20,4 +37,4 @@ namespace Yavsc.Models.Haircut
|
|||
set;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,9 @@ namespace Yavsc.Models
|
|||
/// Billing postal address
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[ForeignKeyAttribute("PostalAddressId")]
|
||||
public virtual Location PostalAddress { get; set; }
|
||||
public long? PostalAddressId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// User's Google calendar
|
||||
|
|
@ -92,7 +94,7 @@ namespace Yavsc.Models
|
|||
public long DiskQuota { get; set; } = 512*1024*1024;
|
||||
public long DiskUsage { get; set; } = 0;
|
||||
|
||||
[JsonIgnore]
|
||||
[JsonIgnore][InverseProperty("Owner")]
|
||||
public virtual List<BlackListed> BlackList { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,12 +12,12 @@ namespace Yavsc.Models
|
|||
|
||||
public long Id { get; set; }
|
||||
|
||||
public DateTime EventDate { get; set; }
|
||||
public DateTime? EventDate { get; set; }
|
||||
public decimal? Previsional { get; set; }
|
||||
|
||||
public string Reason { get; set; }
|
||||
|
||||
public string ActivityCode { get; set; }
|
||||
public string ActivityCode { get; set; }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue