yavsc/Yavsc/Models/Haircut/HairCutQuery.cs
2017-04-08 17:51:31 +02:00

46 lines
1.4 KiB
C#
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Billing;
using Yavsc.Models.Relationship;
namespace Yavsc.Models.Haircut
{
public class HairCutQuery : NominativeServiceCommand
{
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[Required]
public long PrestationId { get; set; }
[ForeignKey("PrestationId"),Required,Display(Name="Préstation")]
public virtual HairPrestation Prestation { get; set; }
[ForeignKey("LocationId")]
[Display(Name="Lieu du rendez-vous")]
[DisplayFormat(ConvertEmptyStringToNull = true, NullDisplayText = "[Pas de lieu spécifié]")]
public virtual Location Location { get; set; }
[Display(Name="Date et heure")]
[DisplayFormat(NullDisplayText = "[Pas de date ni heure]",ApplyFormatInEditMode=true, DataFormatString = "{0:d}")]
public DateTime? EventDate
{
get;
set;
}
public long? LocationId
{
get;
set;
}
[Display(Name="Informations complémentaires"),
StringLengthAttribute(512)]
[DisplayFormat(ConvertEmptyStringToNull = true, NullDisplayText = "[pas d'informations complémentaires]")]
public string AdditionalInfo { get; set; }
}
}