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

57 lines
1.5 KiB
C#
Raw Normal View History

2017-02-27 19:28:32 +01:00
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
2017-03-23 02:17:30 +01:00
using Newtonsoft.Json;
2017-02-11 15:46:26 +01:00
2017-02-12 03:53:33 +01:00
namespace Yavsc.Models.Haircut
2017-02-11 15:46:26 +01:00
{
2017-03-23 00:44:27 +01:00
public class HairPrestation
{
2017-03-01 10:11:20 +01:00
// Homme ou enfant => Coupe seule
2017-03-23 00:44:27 +01:00
// Couleur => Shampoing
2017-03-02 11:35:38 +01:00
// Forfaits : Coupe + Technique
// pas de coupe => technique
2017-03-01 10:11:20 +01:00
2017-02-27 19:28:32 +01:00
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[Display(Name="Longueur de cheveux")]
2017-03-23 02:17:30 +01:00
public HairLength Length { get; set; }
2017-02-27 19:28:32 +01:00
[Display(Name="Pour qui")]
2017-03-23 00:44:27 +01:00
public HairCutGenders Gender { get; set; }
2017-02-27 19:28:32 +01:00
[Display(Name="Coupe")]
2017-03-23 00:44:27 +01:00
public bool Cut { get; set; }
2017-02-11 15:46:26 +01:00
2017-02-27 19:28:32 +01:00
[Display(Name="Coiffage")]
2017-03-23 00:44:27 +01:00
public HairDressings Dressing { get; set; }
2017-02-27 19:28:32 +01:00
2017-02-28 14:01:24 +01:00
[Display(Name="Technique")]
2017-03-23 00:44:27 +01:00
public HairTechnos Tech { get; set; }
2017-02-27 19:28:32 +01:00
[Display(Name="Shampoing")]
2017-03-23 00:44:27 +01:00
public bool Shampoo { get; set; }
2017-02-27 19:28:32 +01:00
2017-04-09 02:47:52 +02:00
[Display(Name="Couleurs"),JsonIgnore,InverseProperty("Prestation")]
2017-03-23 00:44:27 +01:00
2017-04-09 02:47:52 +02:00
public virtual List<HairTaintInstance> Taints { get; set; }
2017-02-27 19:28:32 +01:00
[Display(Name="Soins")]
2017-03-23 00:44:27 +01:00
public bool Cares { get; set; }
2017-03-23 02:17:30 +01:00
2017-02-11 15:46:26 +01:00
}
2017-04-09 02:47:52 +02:00
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; }
}
2017-03-23 00:44:27 +01:00
}