yavsc/Yavsc.Server/Models/HairCut/HairPrestation.cs

58 lines
1.5 KiB
C#

8 years ago
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
8 years ago
using Newtonsoft.Json;
8 years ago
8 years ago
namespace Yavsc.Models.Haircut
8 years ago
{
public class HairPrestation
{
8 years ago
// Homme ou enfant => Coupe seule
// Couleur => Shampoing
// Forfaits : Coupe + Technique
// pas de coupe => technique
8 years ago
8 years ago
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[Display(Name="Longueur de cheveux")]
8 years ago
public HairLength Length { get; set; }
8 years ago
[Display(Name="Pour qui")]
public HairCutGenders Gender { get; set; }
8 years ago
[Display(Name="Coupe")]
public bool Cut { get; set; }
8 years ago
8 years ago
[Display(Name="Coiffage")]
public HairDressings Dressing { get; set; }
8 years ago
[Display(Name="Technique")]
public HairTechnos Tech { get; set; }
8 years ago
[Display(Name="Shampoing")]
public bool Shampoo { get; set; }
8 years ago
[Display(Name="Couleurs"),JsonIgnore,InverseProperty("Prestation")]
public virtual List<HairTaintInstance> Taints { get; set; }
8 years ago
[Display(Name="Soins")]
public bool Cares { get; set; }
8 years ago
8 years ago
}
public class HairTaintInstance {
public long TaintId { get; set; }
[ForeignKey("TaintId")]
public virtual HairTaint Taint { get; set; }
public long PrestationId { get; set; }
[ForeignKey("PrestationId")]
public virtual HairPrestation Prestation { get; set; }
}
}