period
This commit is contained in:
parent
ffd744d86e
commit
259b0b15b5
19 changed files with 2664 additions and 41 deletions
|
|
@ -7,6 +7,7 @@ using Microsoft.AspNet.Identity.EntityFramework;
|
|||
using Microsoft.Data.Entity;
|
||||
using System.Threading;
|
||||
using Yavsc.Models.Haircut;
|
||||
using Yavsc.Models.Calendar;
|
||||
|
||||
namespace Yavsc.Models
|
||||
{
|
||||
|
|
@ -29,6 +30,7 @@ namespace Yavsc.Models
|
|||
using Attributes;
|
||||
using Bank;
|
||||
using Payment;
|
||||
using Yavsc.Models.Calendar;
|
||||
|
||||
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
|
||||
{
|
||||
|
|
@ -51,6 +53,7 @@ namespace Yavsc.Models
|
|||
builder.Entity<DimissClicked>().HasKey(c=>new { uid = c.UserId, notid = c.NotificationId});
|
||||
builder.Entity<HairTaintInstance>().HasKey(ti=>new { ti.TaintId, ti.PrestationId } );
|
||||
builder.Entity<HyperLink>().HasKey(l=>new { l.HRef, l.Method });
|
||||
builder.Entity<Period>().HasKey(l=>new { l.Start, l.End });
|
||||
|
||||
foreach (var et in builder.Model.GetEntityTypes()) {
|
||||
if (et.ClrType.GetInterface("IBaseTrackedEntity")!=null)
|
||||
|
|
@ -312,5 +315,7 @@ namespace Yavsc.Models
|
|||
public DbSet<PayPalPayment> PayPalPayments { get; set; }
|
||||
|
||||
public DbSet<HyperLink> Links { get; set; }
|
||||
|
||||
public DbSet<Period> Period { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
9
Yavsc/Models/Calendar/Availability.cs
Normal file
9
Yavsc/Models/Calendar/Availability.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Yavsc.Models.Calendar
|
||||
{
|
||||
public class Availability: List<Period>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -32,13 +32,13 @@ namespace Yavsc.Models.Calendar
|
|||
/// Gets or sets the start.
|
||||
/// </summary>
|
||||
/// <value>The start.</value>
|
||||
[Required]
|
||||
[Required,Display(Name="Début")]
|
||||
public DateTime Start { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the end.
|
||||
/// </summary>
|
||||
/// <value>The end.</value>
|
||||
[Required]
|
||||
[Required,Display(Name="Fin")]
|
||||
public DateTime End { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ namespace Yavsc.Models.Haircut
|
|||
{
|
||||
using Workflow;
|
||||
using Relationship;
|
||||
using Calendar;
|
||||
|
||||
public class BrusherProfile : ISpecializationSettings
|
||||
{
|
||||
|
|
@ -20,7 +21,6 @@ namespace Yavsc.Models.Haircut
|
|||
get; set;
|
||||
}
|
||||
|
||||
|
||||
[JsonIgnore,ForeignKey("UserId")]
|
||||
public virtual PerformerProfile BaseProfile { get; set; }
|
||||
|
||||
|
|
@ -35,14 +35,10 @@ namespace Yavsc.Models.Haircut
|
|||
/// StartOfTheDay In munutes
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Display(Name="Début de la journée")]
|
||||
public int StartOfTheDay { get; set;}
|
||||
/// <summary>
|
||||
/// End Of The Day, In munutes
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Display(Name="Fin de la journée")]
|
||||
public int EndOfTheDay { get; set;}
|
||||
|
||||
[DisplayFormat(ConvertEmptyStringToNull = true, NullDisplayText = "[Pas de lieu spécifié]")]
|
||||
[Display(Name="Disponibilités")]
|
||||
public virtual Availability Availability { get; set; }
|
||||
|
||||
[Display(Name="Coupe femme cheveux longs"),DisplayFormat(DataFormatString="{0:C}")]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue