export de la commande coiffure

vnext
Paul Schneider 8 years ago
parent baf3ba2ed2
commit d5c6a2510b
7 changed files with 55 additions and 18 deletions

@ -4,10 +4,11 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Billing;
using Yavsc.Models.Relationship;
using YavscLib.HairCut;
namespace Yavsc.Models.Haircut
{
public class HairCutQuery : NominativeServiceCommand
public class HairCutQuery : NominativeServiceCommand, IHairCutQuery
{
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
@ -18,7 +19,7 @@ namespace Yavsc.Models.Haircut
[ForeignKey("PrestationId")]
public virtual HairPrestation Prestation { get; set; }
[Required]
[Required][ForeignKey("LocationId")]
public Location Location { get; set; }
@ -27,5 +28,12 @@ namespace Yavsc.Models.Haircut
get;
set;
}
public long LocationId
{
get;
set;
}
}
}

@ -16,7 +16,7 @@ namespace Yavsc.Models.Haircut
public long Id { get; set; }
[Display(Name="Longueur de cheveux")]
public HairLength Length { get; set; }
public Haircut.HairLength Length { get; set; }
[Display(Name="Pour qui")]
public HairCutGenders Gender { get; set; }

@ -19,5 +19,13 @@
<Content Include="Startup\Startup.cs" />
<Content Include="Controllers\SIRENExceptionsController.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>
</Project>

@ -0,0 +1,10 @@
namespace YavscLib.HairCut
{
public interface IHairCutQuery
{
long Id { get; set; }
long PrestationId { get; set; }
long LocationId { get; set; }
}
}

@ -0,0 +1,9 @@
namespace YavscLib.HairCut
{
public interface IPrestation
{
long Id { get; set; }
int Length { get; set; }
}
}

@ -110,6 +110,8 @@
</ItemGroup>
<ItemGroup>
<Content Include="project.json" />
<Content Include="HairCut\IHairCutQuery.cs" />
<Content Include="HairCut\IPrestation.cs" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

Loading…