export de la commande coiffure
This commit is contained in:
@ -4,10 +4,11 @@ using System.ComponentModel.DataAnnotations;
|
|||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using Yavsc.Models.Billing;
|
using Yavsc.Models.Billing;
|
||||||
using Yavsc.Models.Relationship;
|
using Yavsc.Models.Relationship;
|
||||||
|
using YavscLib.HairCut;
|
||||||
|
|
||||||
namespace Yavsc.Models.Haircut
|
namespace Yavsc.Models.Haircut
|
||||||
{
|
{
|
||||||
public class HairCutQuery : NominativeServiceCommand
|
public class HairCutQuery : NominativeServiceCommand, IHairCutQuery
|
||||||
{
|
{
|
||||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
@ -18,7 +19,7 @@ namespace Yavsc.Models.Haircut
|
|||||||
[ForeignKey("PrestationId")]
|
[ForeignKey("PrestationId")]
|
||||||
public virtual HairPrestation Prestation { get; set; }
|
public virtual HairPrestation Prestation { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required][ForeignKey("LocationId")]
|
||||||
|
|
||||||
public Location Location { get; set; }
|
public Location Location { get; set; }
|
||||||
|
|
||||||
@ -27,5 +28,12 @@ namespace Yavsc.Models.Haircut
|
|||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public long LocationId
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
|
||||||
|
set;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,4 +13,4 @@ namespace Yavsc.Models.Haircut
|
|||||||
[Display(Name="Longs")]
|
[Display(Name="Longs")]
|
||||||
Long
|
Long
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,10 @@ using System.ComponentModel.DataAnnotations.Schema;
|
|||||||
|
|
||||||
namespace Yavsc.Models.Haircut
|
namespace Yavsc.Models.Haircut
|
||||||
{
|
{
|
||||||
public class HairPrestation
|
public class HairPrestation
|
||||||
{
|
{
|
||||||
// Homme ou enfant => Coupe seule
|
// Homme ou enfant => Coupe seule
|
||||||
// Couleur => Shampoing
|
// Couleur => Shampoing
|
||||||
// Forfaits : Coupe + Technique
|
// Forfaits : Coupe + Technique
|
||||||
// pas de coupe => technique
|
// pas de coupe => technique
|
||||||
|
|
||||||
@ -16,30 +16,30 @@ namespace Yavsc.Models.Haircut
|
|||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
|
|
||||||
[Display(Name="Longueur de cheveux")]
|
[Display(Name="Longueur de cheveux")]
|
||||||
public HairLength Length { get; set; }
|
public Haircut.HairLength Length { get; set; }
|
||||||
|
|
||||||
[Display(Name="Pour qui")]
|
[Display(Name="Pour qui")]
|
||||||
public HairCutGenders Gender { get; set; }
|
public HairCutGenders Gender { get; set; }
|
||||||
|
|
||||||
[Display(Name="Coupe")]
|
[Display(Name="Coupe")]
|
||||||
public bool Cut { get; set; }
|
public bool Cut { get; set; }
|
||||||
|
|
||||||
[Display(Name="Coiffage")]
|
[Display(Name="Coiffage")]
|
||||||
|
|
||||||
public HairDressings Dressing { get; set; }
|
public HairDressings Dressing { get; set; }
|
||||||
|
|
||||||
[Display(Name="Technique")]
|
[Display(Name="Technique")]
|
||||||
public HairTechnos Tech { get; set; }
|
public HairTechnos Tech { get; set; }
|
||||||
|
|
||||||
[Display(Name="Shampoing")]
|
[Display(Name="Shampoing")]
|
||||||
public bool Shampoo { get; set; }
|
public bool Shampoo { get; set; }
|
||||||
|
|
||||||
[Display(Name="Couleurs")]
|
[Display(Name="Couleurs")]
|
||||||
|
|
||||||
public virtual List<HairTaint> Taints { get; set; }
|
public virtual List<HairTaint> Taints { get; set; }
|
||||||
|
|
||||||
[Display(Name="Soins")]
|
[Display(Name="Soins")]
|
||||||
public bool Cares { get; set; }
|
public bool Cares { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,5 +19,13 @@
|
|||||||
<Content Include="Startup\Startup.cs" />
|
<Content Include="Startup\Startup.cs" />
|
||||||
<Content Include="Controllers\SIRENExceptionsController.cs" />
|
<Content Include="Controllers\SIRENExceptionsController.cs" />
|
||||||
<Content Include="Startup\Startup.OAuth.cs" />
|
<Content Include="Startup\Startup.OAuth.cs" />
|
||||||
|
<Content Include="ApiControllers\HairCutController.cs" />
|
||||||
|
<Content Include="Models\Haircut\HairCutQuery.cs" />
|
||||||
|
<Content Include="Models\ApplicationDbContext.cs" />
|
||||||
|
<Content Include="Models\Workflow\Query.cs" />
|
||||||
|
<Content Include="Models\Billing\NominativeServiceCommand.cs" />
|
||||||
|
<Content Include="Models\Relationship\Location.cs" />
|
||||||
|
<Content Include="Models\Haircut\HairPrestation.cs" />
|
||||||
|
<Content Include="Models\Haircut\HairLength.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
10
YavscLib/HairCut/IHairCutQuery.cs
Normal file
10
YavscLib/HairCut/IHairCutQuery.cs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
namespace YavscLib.HairCut
|
||||||
|
{
|
||||||
|
public interface IHairCutQuery
|
||||||
|
{
|
||||||
|
long Id { get; set; }
|
||||||
|
long PrestationId { get; set; }
|
||||||
|
|
||||||
|
long LocationId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
9
YavscLib/HairCut/IPrestation.cs
Normal file
9
YavscLib/HairCut/IPrestation.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
namespace YavscLib.HairCut
|
||||||
|
{
|
||||||
|
public interface IPrestation
|
||||||
|
{
|
||||||
|
long Id { get; set; }
|
||||||
|
int Length { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -110,6 +110,8 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="project.json" />
|
<Content Include="project.json" />
|
||||||
|
<Content Include="HairCut\IHairCutQuery.cs" />
|
||||||
|
<Content Include="HairCut\IPrestation.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
|
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
|
Reference in New Issue
Block a user